Chore: Remove unused #if statement (TrinityCore, Mangos, AzerothCore, TBC, Classic, Mists, Cata) (#217)
This commit is contained in:
@@ -116,14 +116,8 @@ bool Eluna::OnAreaTrigger(Player* pPlayer, AreaTriggerEntry const* pTrigger)
|
||||
{
|
||||
START_HOOK_WITH_RETVAL(TRIGGER_EVENT_ON_TRIGGER, false);
|
||||
Push(pPlayer);
|
||||
#ifdef TRINITY
|
||||
Push(pTrigger->ID);
|
||||
#elif AZEROTHCORE
|
||||
Push(pTrigger->entry);
|
||||
#else
|
||||
Push(pTrigger->id);
|
||||
|
||||
#endif
|
||||
|
||||
return CallAllFunctionsBool(ServerEventBindings, key);
|
||||
}
|
||||
|
||||
@@ -140,22 +134,10 @@ void Eluna::OnChange(Weather* /*weather*/, uint32 zone, WeatherState state, floa
|
||||
// Auction House
|
||||
void Eluna::OnAdd(AuctionHouseObject* /*ah*/, AuctionEntry* entry)
|
||||
{
|
||||
#ifdef AZEROTHCORE
|
||||
Player* owner = eObjectAccessor()FindPlayer(entry->owner);
|
||||
#else
|
||||
Player* owner = eObjectAccessor()FindPlayer(MAKE_NEW_GUID(entry->owner, 0, HIGHGUID_PLAYER));
|
||||
#endif
|
||||
|
||||
#ifdef TRINITY
|
||||
Item* item = eAuctionMgr->GetAItem(entry->itemGUIDLow);
|
||||
uint32 expiretime = entry->expire_time;
|
||||
#elif AZEROTHCORE
|
||||
Item* item = eAuctionMgr->GetAItem(entry->item_guid);
|
||||
uint32 expiretime = entry->expire_time;
|
||||
#else
|
||||
Item* item = eAuctionMgr->GetAItem(entry->itemGuidLow);
|
||||
uint32 expiretime = entry->expireTime;
|
||||
#endif
|
||||
|
||||
if (!owner || !item)
|
||||
return;
|
||||
@@ -174,23 +156,10 @@ void Eluna::OnAdd(AuctionHouseObject* /*ah*/, AuctionEntry* entry)
|
||||
|
||||
void Eluna::OnRemove(AuctionHouseObject* /*ah*/, AuctionEntry* entry)
|
||||
{
|
||||
#ifdef AZEROTHCORE
|
||||
Player* owner = eObjectAccessor()FindPlayer(entry->owner);
|
||||
#else
|
||||
Player* owner = eObjectAccessor()FindPlayer(MAKE_NEW_GUID(entry->owner, 0, HIGHGUID_PLAYER));
|
||||
#endif
|
||||
|
||||
#ifdef TRINITY
|
||||
Item* item = eAuctionMgr->GetAItem(entry->itemGUIDLow);
|
||||
uint32 expiretime = entry->expire_time;
|
||||
#elif AZEROTHCORE
|
||||
Item* item = eAuctionMgr->GetAItem(entry->item_guid);
|
||||
uint32 expiretime = entry->expire_time;
|
||||
#else
|
||||
Item* item = eAuctionMgr->GetAItem(entry->itemGuidLow);
|
||||
uint32 expiretime = entry->expireTime;
|
||||
#endif
|
||||
|
||||
|
||||
if (!owner || !item)
|
||||
return;
|
||||
@@ -209,23 +178,10 @@ void Eluna::OnRemove(AuctionHouseObject* /*ah*/, AuctionEntry* entry)
|
||||
|
||||
void Eluna::OnSuccessful(AuctionHouseObject* /*ah*/, AuctionEntry* entry)
|
||||
{
|
||||
#ifdef AZEROTHCORE
|
||||
Player* owner = eObjectAccessor()FindPlayer(entry->owner);
|
||||
#else
|
||||
Player* owner = eObjectAccessor()FindPlayer(MAKE_NEW_GUID(entry->owner, 0, HIGHGUID_PLAYER));
|
||||
#endif
|
||||
|
||||
#ifdef TRINITY
|
||||
Item* item = eAuctionMgr->GetAItem(entry->itemGUIDLow);
|
||||
uint32 expiretime = entry->expire_time;
|
||||
#elif AZEROTHCORE
|
||||
Item* item = eAuctionMgr->GetAItem(entry->item_guid);
|
||||
uint32 expiretime = entry->expire_time;
|
||||
#else
|
||||
Item* item = eAuctionMgr->GetAItem(entry->itemGuidLow);
|
||||
uint32 expiretime = entry->expireTime;
|
||||
#endif
|
||||
|
||||
|
||||
if (!owner || !item)
|
||||
return;
|
||||
@@ -244,23 +200,10 @@ void Eluna::OnSuccessful(AuctionHouseObject* /*ah*/, AuctionEntry* entry)
|
||||
|
||||
void Eluna::OnExpire(AuctionHouseObject* /*ah*/, AuctionEntry* entry)
|
||||
{
|
||||
#ifdef AZEROTHCORE
|
||||
Player* owner = eObjectAccessor()FindPlayer(entry->owner);
|
||||
#else
|
||||
Player* owner = eObjectAccessor()FindPlayer(MAKE_NEW_GUID(entry->owner, 0, HIGHGUID_PLAYER));
|
||||
#endif
|
||||
|
||||
#ifdef TRINITY
|
||||
Item* item = eAuctionMgr->GetAItem(entry->itemGUIDLow);
|
||||
uint32 expiretime = entry->expire_time;
|
||||
#elif AZEROTHCORE
|
||||
Item* item = eAuctionMgr->GetAItem(entry->item_guid);
|
||||
uint32 expiretime = entry->expire_time;
|
||||
#else
|
||||
Item* item = eAuctionMgr->GetAItem(entry->itemGuidLow);
|
||||
uint32 expiretime = entry->expireTime;
|
||||
#endif
|
||||
|
||||
|
||||
if (!owner || !item)
|
||||
return;
|
||||
@@ -284,17 +227,11 @@ void Eluna::OnOpenStateChange(bool open)
|
||||
CallAllFunctions(ServerEventBindings, key);
|
||||
}
|
||||
|
||||
#ifndef AZEROTHCORE
|
||||
void Eluna::OnConfigLoad(bool reload)
|
||||
#else
|
||||
void Eluna::OnConfigLoad(bool reload, bool isBefore)
|
||||
#endif
|
||||
{
|
||||
START_HOOK(WORLD_EVENT_ON_CONFIG_LOAD);
|
||||
Push(reload);
|
||||
#ifdef AZEROTHCORE
|
||||
Push(isBefore);
|
||||
#endif
|
||||
CallAllFunctions(ServerEventBindings, key);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user