mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Chore: Remove unused #if statement (TrinityCore, Mangos, AzerothCore, TBC, Classic, Mists, Cata) (#217)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user