mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
Implemented ObjectGuid support for AzerothCore.
This commit is contained in:
@@ -140,19 +140,23 @@ 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_guidlow);
|
||||
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;
|
||||
|
||||
@@ -170,12 +174,17 @@ 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_guidlow);
|
||||
Item* item = eAuctionMgr->GetAItem(entry->item_guid);
|
||||
uint32 expiretime = entry->expire_time;
|
||||
#else
|
||||
Item* item = eAuctionMgr->GetAItem(entry->itemGuidLow);
|
||||
@@ -200,12 +209,17 @@ 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_guidlow);
|
||||
Item* item = eAuctionMgr->GetAItem(entry->item_guid);
|
||||
uint32 expiretime = entry->expire_time;
|
||||
#else
|
||||
Item* item = eAuctionMgr->GetAItem(entry->itemGuidLow);
|
||||
@@ -230,12 +244,17 @@ 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_guidlow);
|
||||
Item* item = eAuctionMgr->GetAItem(entry->item_guid);
|
||||
uint32 expiretime = entry->expire_time;
|
||||
#else
|
||||
Item* item = eAuctionMgr->GetAItem(entry->itemGuidLow);
|
||||
|
||||
Reference in New Issue
Block a user