use auctionHouseEntry for all auctions hooks add buyout, etime to AUCTION_EVENT_ON_ADD

Signed-off-by: Salja <salja8840@gmail.com>
This commit is contained in:
Salja
2015-01-25 23:22:45 +01:00
parent 734f720aca
commit 81b049cdcd
4 changed files with 21 additions and 19 deletions

View File

@@ -82,47 +82,49 @@ void Eluna::OnChange(Weather* weather, uint32 zone, WeatherState state, float gr
}
// Auction House
void Eluna::OnAdd(AuctionHouseObject* ah, Player* pPlayer, Item* pItem)
void Eluna::OnAdd(AuctionHouseEntry const* auctionHouseEntry, Player* pPlayer, Item* pItem, uint32 buyout, uint32 etime)
{
if (!ServerEventBindings->HasEvents(AUCTION_EVENT_ON_ADD))
return;
LOCK_ELUNA;
Push(ah);
Push(auctionHouseEntry);
Push(pPlayer);
Push(pItem);
Push(buyout);
Push(etime);
CallAllFunctions(ServerEventBindings, AUCTION_EVENT_ON_ADD);
}
void Eluna::OnRemove(AuctionHouseObject* ah, Player* pPlayer, Item* pItem)
void Eluna::OnRemove(AuctionHouseEntry const* auctionHouseEntry, Player* pPlayer, Item* pItem)
{
if (!ServerEventBindings->HasEvents(AUCTION_EVENT_ON_REMOVE))
return;
LOCK_ELUNA;
Push(ah);
Push(auctionHouseEntry);
Push(pPlayer);
Push(pItem);
CallAllFunctions(ServerEventBindings, AUCTION_EVENT_ON_REMOVE);
}
void Eluna::OnSuccessful(AuctionHouseObject* ah)
void Eluna::OnSuccessful(AuctionHouseEntry const* auctionHouseEntry)
{
if (!ServerEventBindings->HasEvents(AUCTION_EVENT_ON_SUCCESSFUL))
return;
LOCK_ELUNA;
Push(ah);
Push(auctionHouseEntry);
CallAllFunctions(ServerEventBindings, AUCTION_EVENT_ON_SUCCESSFUL);
}
void Eluna::OnExpire(AuctionHouseObject* ah)
void Eluna::OnExpire(AuctionHouseEntry const* auctionHouseEntry)
{
if (!ServerEventBindings->HasEvents(AUCTION_EVENT_ON_EXPIRE))
return;
LOCK_ELUNA;
Push(ah);
Push(auctionHouseEntry);
CallAllFunctions(ServerEventBindings, AUCTION_EVENT_ON_EXPIRE);
}