AzerothCore 3.3.5a
OpenSource WoW Emulator
|
#include "AuctionHouseMgr.h"
Public Member Functions | |
uint8 | GetHouseId () const |
uint32 | GetAuctionCut () const |
uint32 | GetAuctionOutBid () const |
the sum of outbid is (1% from current bid)*5, if bid is very small, it is 1c | |
bool | BuildAuctionInfo (WorldPacket &data) const |
void | DeleteFromDB (CharacterDatabaseTransaction trans) const |
void | SaveToDB (CharacterDatabaseTransaction trans) const |
bool | LoadFromDB (Field *fields) |
std::string | BuildAuctionMailSubject (MailAuctionAnswers response) const |
Static Public Member Functions | |
static std::string | BuildAuctionMailBody (ObjectGuid guid, uint32 bid, uint32 buyout, uint32 deposit=0, uint32 cut=0, uint32 moneyDelay=0, uint32 eta=0) |
Public Attributes | |
uint32 | Id |
uint8 | houseId |
ObjectGuid | item_guid |
uint32 | item_template |
uint32 | itemCount |
ObjectGuid | owner |
uint32 | startbid |
uint32 | bid |
uint32 | buyout |
time_t | expire_time |
ObjectGuid | bidder |
uint32 | deposit |
AuctionHouseEntry const * | auctionHouseEntry |
bool AuctionEntry::BuildAuctionInfo | ( | WorldPacket & | data | ) | const |
References bid, bidder, buyout, expire_time, GetAuctionOutBid(), Item::GetCount(), Item::GetEnchantmentCharges(), Item::GetEnchantmentDuration(), Item::GetEnchantmentId(), Object::GetEntry(), GameTime::GetGameTime(), Item::GetItemRandomPropertyId(), Item::GetItemSuffixFactor(), Item::GetSpellCharges(), Id, IN_MILLISECONDS, item_guid, LOG_ERROR, MAX_INSPECTED_ENCHANTMENT_SLOT, owner, sAuctionMgr, startbid, and ObjectGuid::ToString().
Referenced by AuctionHouseObject::BuildListOwnerItems(), and WorldSession::HandleAuctionListBidderItems().
|
static |
References bid, buyout, deposit, and ObjectGuid::GetRawValue().
Referenced by WorldSession::HandleAuctionRemoveItem(), AuctionHouseMgr::SendAuctionCancelledToBidderMail(), AuctionHouseMgr::SendAuctionExpiredMail(), AuctionHouseMgr::SendAuctionOutbiddedMail(), AuctionHouseMgr::SendAuctionSalePendingMail(), AuctionHouseMgr::SendAuctionSuccessfulMail(), and AuctionHouseMgr::SendAuctionWonMail().
std::string AuctionEntry::BuildAuctionMailSubject | ( | MailAuctionAnswers | response | ) | const |
References Id, item_template, and itemCount.
Referenced by WorldSession::HandleAuctionRemoveItem(), AuctionHouseMgr::SendAuctionCancelledToBidderMail(), AuctionHouseMgr::SendAuctionExpiredMail(), AuctionHouseMgr::SendAuctionOutbiddedMail(), AuctionHouseMgr::SendAuctionSalePendingMail(), AuctionHouseMgr::SendAuctionSuccessfulMail(), and AuctionHouseMgr::SendAuctionWonMail().
void AuctionEntry::DeleteFromDB | ( | CharacterDatabaseTransaction | trans | ) | const |
References CHAR_DEL_AUCTION, CharacterDatabase, Id, and PreparedStatementBase::SetData().
Referenced by WorldSession::HandleAuctionPlaceBid(), WorldSession::HandleAuctionRemoveItem(), AuctionHouseMgr::LoadAuctions(), and AuctionHouseObject::Update().
uint32 AuctionEntry::GetAuctionCut | ( | ) | const |
References auctionHouseEntry, bid, CalculatePct(), AuctionHouseEntry::cutPercent, RATE_AUCTION_CUT, and sWorld.
Referenced by WorldSession::HandleAuctionRemoveItem(), AuctionHouseMgr::SendAuctionOutbiddedMail(), AuctionHouseMgr::SendAuctionSalePendingMail(), and AuctionHouseMgr::SendAuctionSuccessfulMail().
uint32 AuctionEntry::GetAuctionOutBid | ( | ) | const |
the sum of outbid is (1% from current bid)*5, if bid is very small, it is 1c
References bid, and CalculatePct().
Referenced by BuildAuctionInfo(), WorldSession::HandleAuctionPlaceBid(), and AuctionHouseMgr::SendAuctionOutbiddedMail().
|
inline |
References houseId.
Referenced by WorldSession::HandleAuctionSellItem(), AuctionHouseMgr::SendAuctionOutbiddedMail(), and AuctionHouseMgr::SendAuctionWonMail().
bool AuctionEntry::LoadFromDB | ( | Field * | fields | ) |
References auctionHouseEntry, bid, bidder, buyout, deposit, expire_time, Field::Get(), AuctionHouseMgr::GetAuctionHouseEntryFromHouse(), houseId, Id, item_guid, item_template, itemCount, LOG_ERROR, owner, sAuctionMgr, startbid, and ObjectGuid::ToString().
Referenced by AuctionHouseMgr::LoadAuctions().
void AuctionEntry::SaveToDB | ( | CharacterDatabaseTransaction | trans | ) | const |
References bid, bidder, buyout, CHAR_INS_AUCTION, CharacterDatabase, deposit, expire_time, ObjectGuid::GetCounter(), houseId, Id, item_guid, owner, PreparedStatementBase::SetData(), and startbid.
Referenced by WorldSession::HandleAuctionSellItem().
AuctionHouseEntry const* AuctionEntry::auctionHouseEntry |
Referenced by GetAuctionCut(), WorldSession::HandleAuctionSellItem(), and LoadFromDB().
uint32 AuctionEntry::bid |
Referenced by BuildAuctionInfo(), BuildAuctionMailBody(), GetAuctionCut(), GetAuctionOutBid(), WorldSession::HandleAuctionPlaceBid(), WorldSession::HandleAuctionSellItem(), LoadFromDB(), SaveToDB(), AuctionHouseMgr::SendAuctionCancelledToBidderMail(), AuctionHouseMgr::SendAuctionOutbiddedMail(), WorldSession::SendAuctionOwnerNotification(), AuctionHouseMgr::SendAuctionSalePendingMail(), AuctionHouseMgr::SendAuctionSuccessfulMail(), AuctionHouseMgr::SendAuctionWonMail(), and SortAuction().
ObjectGuid AuctionEntry::bidder |
Referenced by BuildAuctionInfo(), AuctionHouseObject::BuildListBidderItems(), WorldSession::HandleAuctionPlaceBid(), WorldSession::HandleAuctionRemoveItem(), WorldSession::HandleAuctionSellItem(), LoadFromDB(), SaveToDB(), AuctionHouseMgr::SendAuctionCancelledToBidderMail(), AuctionHouseMgr::SendAuctionOutbiddedMail(), AuctionHouseMgr::SendAuctionSalePendingMail(), AuctionHouseMgr::SendAuctionSuccessfulMail(), AuctionHouseMgr::SendAuctionWonMail(), and AuctionHouseObject::Update().
uint32 AuctionEntry::buyout |
Referenced by BuildAuctionInfo(), BuildAuctionMailBody(), WorldSession::HandleAuctionPlaceBid(), WorldSession::HandleAuctionRemoveItem(), WorldSession::HandleAuctionSellItem(), LoadFromDB(), SaveToDB(), AuctionHouseMgr::SendAuctionCancelledToBidderMail(), AuctionHouseMgr::SendAuctionExpiredMail(), AuctionHouseMgr::SendAuctionOutbiddedMail(), AuctionHouseMgr::SendAuctionSalePendingMail(), AuctionHouseMgr::SendAuctionSuccessfulMail(), AuctionHouseMgr::SendAuctionWonMail(), and SortAuction().
uint32 AuctionEntry::deposit |
Referenced by BuildAuctionMailBody(), WorldSession::HandleAuctionRemoveItem(), WorldSession::HandleAuctionSellItem(), LoadFromDB(), SaveToDB(), AuctionHouseMgr::SendAuctionCancelledToBidderMail(), AuctionHouseMgr::SendAuctionExpiredMail(), AuctionHouseMgr::SendAuctionOutbiddedMail(), AuctionHouseMgr::SendAuctionSalePendingMail(), and AuctionHouseMgr::SendAuctionSuccessfulMail().
time_t AuctionEntry::expire_time |
uint8 AuctionEntry::houseId |
Referenced by GetHouseId(), WorldSession::HandleAuctionSellItem(), AuctionHouseMgr::LoadAuctions(), LoadFromDB(), and SaveToDB().
uint32 AuctionEntry::Id |
Referenced by AuctionHouseObject::AddAuction(), BuildAuctionInfo(), BuildAuctionMailSubject(), DeleteFromDB(), WorldSession::HandleAuctionPlaceBid(), WorldSession::HandleAuctionRemoveItem(), WorldSession::HandleAuctionSellItem(), LoadFromDB(), AuctionHouseObject::RemoveAuction(), SaveToDB(), AuctionHouseMgr::SendAuctionOutbiddedMail(), WorldSession::SendAuctionOwnerNotification(), and AuctionHouseMgr::SendAuctionWonMail().
ObjectGuid AuctionEntry::item_guid |
Referenced by BuildAuctionInfo(), AuctionHouseObject::BuildListAuctionItems(), WorldSession::HandleAuctionPlaceBid(), WorldSession::HandleAuctionRemoveItem(), WorldSession::HandleAuctionSellItem(), LoadFromDB(), SaveToDB(), AuctionHouseMgr::SendAuctionExpiredMail(), AuctionHouseMgr::SendAuctionWonMail(), and AuctionHouseObject::Update().
uint32 AuctionEntry::item_template |
uint32 AuctionEntry::itemCount |
ObjectGuid AuctionEntry::owner |
Referenced by BuildAuctionInfo(), AuctionHouseObject::BuildListOwnerItems(), WorldSession::HandleAuctionPlaceBid(), WorldSession::HandleAuctionRemoveItem(), WorldSession::HandleAuctionSellItem(), LoadFromDB(), SaveToDB(), AuctionHouseMgr::SendAuctionCancelledToBidderMail(), AuctionHouseMgr::SendAuctionExpiredMail(), AuctionHouseMgr::SendAuctionOutbiddedMail(), AuctionHouseMgr::SendAuctionSalePendingMail(), AuctionHouseMgr::SendAuctionSuccessfulMail(), AuctionHouseMgr::SendAuctionWonMail(), and SortAuction().
uint32 AuctionEntry::startbid |
Referenced by BuildAuctionInfo(), WorldSession::HandleAuctionSellItem(), LoadFromDB(), SaveToDB(), and SortAuction().