Chore: Remove unused #if statement (TrinityCore, Mangos, AzerothCore, TBC, Classic, Mists, Cata) (#217)

This commit is contained in:
iThorgrim
2025-01-21 17:37:39 +01:00
committed by GitHub
parent 16173cb751
commit 2e89531b05
35 changed files with 60 additions and 2504 deletions

View File

@@ -74,11 +74,7 @@ bool Eluna::OnUse(Player* pPlayer, Item* pItem, SpellCastTargets const& targets)
data << guid;
data << ObjectGuid(uint64(0));
data << uint8(0);
#ifdef CMANGOS
pPlayer->GetSession()->SendPacket(data);
#else
pPlayer->GetSession()->SendPacket(&data);
#endif
return false;
}
@@ -87,7 +83,7 @@ bool Eluna::OnItemUse(Player* pPlayer, Item* pItem, SpellCastTargets const& targ
START_HOOK_WITH_RETVAL(ITEM_EVENT_ON_USE, pItem->GetEntry(), true);
Push(pPlayer);
Push(pItem);
#if defined TRINITY || AZEROTHCORE
if (GameObject* target = targets.GetGOTarget())
Push(target);
else if (Item* target = targets.GetItemTarget())
@@ -100,18 +96,6 @@ bool Eluna::OnItemUse(Player* pPlayer, Item* pItem, SpellCastTargets const& targ
Push(target);
else
Push();
#else
if (GameObject* target = targets.getGOTarget())
Push(target);
else if (Item* target = targets.getItemTarget())
Push(target);
else if (Corpse* target = pPlayer->GetMap()->GetCorpse(targets.getCorpseTargetGuid()))
Push(target);
else if (Unit* target = targets.getUnitTarget())
Push(target);
else
Push();
#endif
return CallAllFunctionsBool(ItemEventBindings, key, true);
}