AZEROTHCORE compatibility (#271)
* Done Compatible AZEROTHCORE. * Fix TC build * Try fix whitespace (trailing and tabs2spaces) * Remove undefs and TC_LOG defines * Revert indentation change * Indentation and style change * Add more possible SQL types to query * change bg hooks OnBGEnd parameter type.
This commit is contained in:
@@ -79,18 +79,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);
|
||||
#ifndef TRINITY
|
||||
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();
|
||||
#else
|
||||
#if defined TRINITY || AZEROTHCORE
|
||||
if (GameObject* target = targets.GetGOTarget())
|
||||
Push(target);
|
||||
else if (Item* target = targets.GetItemTarget())
|
||||
@@ -103,6 +92,17 @@ 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