mirror of
https://github.com/azerothcore/mod-ale
synced 2025-11-29 15:38:17 +08:00
add player and item to auctionshouse hooks, not sure is better move back to player events ?
Signed-off-by: Salja <salja8840@gmail.com>
This commit is contained in:
4
Hooks.h
4
Hooks.h
@@ -136,8 +136,8 @@ namespace Hooks
|
||||
WEATHER_EVENT_ON_CHANGE = 25, // (event, zoneId, state, grade)
|
||||
|
||||
// Auction house
|
||||
AUCTION_EVENT_ON_ADD = 26, // (event, AHObject)
|
||||
AUCTION_EVENT_ON_REMOVE = 27, // (event, AHObject)
|
||||
AUCTION_EVENT_ON_ADD = 26, // (event, AHObject, player, item)
|
||||
AUCTION_EVENT_ON_REMOVE = 27, // (event, AHObject, player, item)
|
||||
AUCTION_EVENT_ON_SUCCESSFUL = 28, // (event, AHObject) // Not Implemented
|
||||
AUCTION_EVENT_ON_EXPIRE = 29, // (event, AHObject) // Not Implemented
|
||||
|
||||
|
||||
@@ -442,8 +442,8 @@ public:
|
||||
void OnChange(Weather* weather, uint32 zone, WeatherState state, float grade);
|
||||
|
||||
/* Auction House */
|
||||
void OnAdd(AuctionHouseObject* auctionHouse);
|
||||
void OnRemove(AuctionHouseObject* auctionHouse);
|
||||
void OnAdd(AuctionHouseObject* auctionHouse, Player* pPlayer, Item* pItem);
|
||||
void OnRemove(AuctionHouseObject* auctionHouse, Player* pPlayer, Item* pItem);
|
||||
void OnSuccessful(AuctionHouseObject* auctionHouse);
|
||||
void OnExpire(AuctionHouseObject* auctionHouse);
|
||||
|
||||
|
||||
@@ -82,23 +82,27 @@ void Eluna::OnChange(Weather* weather, uint32 zone, WeatherState state, float gr
|
||||
}
|
||||
|
||||
// Auction House
|
||||
void Eluna::OnAdd(AuctionHouseObject* ah)
|
||||
void Eluna::OnAdd(AuctionHouseObject* ah, Player* pPlayer, Item* pItem)
|
||||
{
|
||||
if (!ServerEventBindings->HasEvents(AUCTION_EVENT_ON_ADD))
|
||||
return;
|
||||
|
||||
LOCK_ELUNA;
|
||||
Push(ah);
|
||||
Push(pPlayer);
|
||||
Push(pItem);
|
||||
CallAllFunctions(ServerEventBindings, AUCTION_EVENT_ON_ADD);
|
||||
}
|
||||
|
||||
void Eluna::OnRemove(AuctionHouseObject* ah)
|
||||
void Eluna::OnRemove(AuctionHouseObject* ah, Player* pPlayer, Item* pItem)
|
||||
{
|
||||
if (!ServerEventBindings->HasEvents(AUCTION_EVENT_ON_REMOVE))
|
||||
return;
|
||||
|
||||
LOCK_ELUNA;
|
||||
Push(ah);
|
||||
Push(pPlayer);
|
||||
Push(pItem);
|
||||
CallAllFunctions(ServerEventBindings, AUCTION_EVENT_ON_REMOVE);
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user