![]() |
TrinityCore
|
#include <BlackMarketMgr.h>
Public Member Functions | |
| void | Update (time_t newTimeOfUpdate) |
| void | Initialize (int32 marketId, uint32 duration) |
| BlackMarketTemplate const * | GetTemplate () const |
| int32 | GetMarketId () const |
| uint64 | GetCurrentBid () const |
| void | SetCurrentBid (uint64 bid) |
| int32 | GetNumBids () const |
| void | SetNumBids (int32 numBids) |
| ObjectGuid::LowType | GetBidder () const |
| void | SetBidder (ObjectGuid::LowType bidder) |
| uint32 | GetSecondsRemaining () const |
| time_t | GetExpirationTime () const |
| bool | IsCompleted () const |
| void | DeleteFromDB (CharacterDatabaseTransaction trans) const |
| void | SaveToDB (CharacterDatabaseTransaction trans) const |
| bool | LoadFromDB (Field *fields) |
| uint64 | GetMinIncrement () const |
| bool | ValidateBid (uint64 bid) const |
| void | PlaceBid (uint64 bid, Player *player, CharacterDatabaseTransaction trans) |
| std::string | BuildAuctionMailSubject (BMAHMailAuctionAnswers response) const |
| std::string | BuildAuctionMailBody () |
| void | MailSent () |
| bool | GetMailSent () const |
Private Attributes | |
| int32 | _marketId = 0 |
| uint64 | _currentBid = 0 |
| int32 | _numBids = 0 |
| ObjectGuid::LowType | _bidder = 0 |
| uint32 | _secondsRemaining = 0 |
| bool | _mailSent = false |
Definition at line 70 of file BlackMarketMgr.h.
| std::string BlackMarketEntry::BuildAuctionMailBody | ( | ) |
Definition at line 519 of file BlackMarketMgr.cpp.
References _currentBid, GetTemplate(), and BlackMarketTemplate::SellerNPC.
Referenced by BlackMarketMgr::SendAuctionOutbidMail(), and BlackMarketMgr::SendAuctionWonMail().
| std::string BlackMarketEntry::BuildAuctionMailSubject | ( | BMAHMailAuctionAnswers | response | ) | const |
Definition at line 512 of file BlackMarketMgr.cpp.
References GetMarketId(), GetTemplate(), BlackMarketTemplate::Item, WorldPackets::Item::ItemInstance::ItemID, and BlackMarketTemplate::Quantity.
Referenced by BlackMarketMgr::SendAuctionOutbidMail(), and BlackMarketMgr::SendAuctionWonMail().
| void BlackMarketEntry::DeleteFromDB | ( | CharacterDatabaseTransaction | trans | ) | const |
Definition at line 463 of file BlackMarketMgr.cpp.
References _marketId, CHAR_DEL_BLACKMARKET_AUCTIONS, CharacterDatabase, and PreparedStatementBase::setInt32().
Referenced by BlackMarketMgr::LoadAuctions(), and BlackMarketMgr::RefreshAuctions().
|
inline |
Definition at line 90 of file BlackMarketMgr.h.
References _bidder.
Referenced by WorldSession::HandleBlackMarketBidOnItem(), BlackMarketMgr::SendAuctionOutbidMail(), BlackMarketMgr::SendAuctionWonMail(), and BlackMarketMgr::Update().
|
inline |
Definition at line 84 of file BlackMarketMgr.h.
References _currentBid.
Referenced by BlackMarketMgr::SendAuctionOutbidMail(), and BlackMarketMgr::SendAuctionWonMail().
| time_t BlackMarketEntry::GetExpirationTime | ( | ) | const |
Definition at line 413 of file BlackMarketMgr.cpp.
References GameTime::GetGameTime(), and GetSecondsRemaining().
Referenced by PlaceBid(), and SaveToDB().
|
inline |
Definition at line 109 of file BlackMarketMgr.h.
References _mailSent.
Referenced by BlackMarketMgr::SendAuctionWonMail().
|
inline |
Definition at line 82 of file BlackMarketMgr.h.
References _marketId.
Referenced by BlackMarketMgr::AddAuction(), BuildAuctionMailSubject(), and WorldSession::SendBlackMarketWonNotification().
|
inline |
Definition at line 101 of file BlackMarketMgr.h.
References _currentBid, and GOLD.
Referenced by ValidateBid().
|
inline |
Definition at line 87 of file BlackMarketMgr.h.
References _numBids.
| uint32 BlackMarketEntry::GetSecondsRemaining | ( | ) | const |
Definition at line 408 of file BlackMarketMgr.cpp.
References _secondsRemaining, GameTime::GetGameTime(), and sBlackMarketMgr.
Referenced by GetExpirationTime(), WorldSession::HandleBlackMarketBidOnItem(), IsCompleted(), and PlaceBid().
| BlackMarketTemplate const * BlackMarketEntry::GetTemplate | ( | ) | const |
Definition at line 403 of file BlackMarketMgr.cpp.
References _marketId, and sBlackMarketMgr.
Referenced by BuildAuctionMailBody(), BuildAuctionMailSubject(), BlackMarketMgr::SendAuctionOutbidMail(), and BlackMarketMgr::SendAuctionWonMail().
Definition at line 75 of file BlackMarketMgr.h.
References _marketId, and _secondsRemaining.
Referenced by BlackMarketMgr::RefreshAuctions().
| bool BlackMarketEntry::IsCompleted | ( | ) | const |
Definition at line 418 of file BlackMarketMgr.cpp.
References GetSecondsRemaining().
Referenced by BlackMarketMgr::LoadAuctions(), BlackMarketMgr::RefreshAuctions(), and BlackMarketMgr::Update().
| bool BlackMarketEntry::LoadFromDB | ( | Field * | fields | ) |
Definition at line 423 of file BlackMarketMgr.cpp.
References _bidder, _currentBid, _marketId, _numBids, _secondsRemaining, Field::GetInt32(), Field::GetInt64(), Field::GetUInt64(), sBlackMarketMgr, sCharacterCache, and TC_LOG_ERROR.
Referenced by BlackMarketMgr::LoadAuctions().
|
inline |
Definition at line 108 of file BlackMarketMgr.h.
References _mailSent.
Referenced by BlackMarketMgr::SendAuctionWonMail().
| void BlackMarketEntry::PlaceBid | ( | uint64 | bid, |
| Player * | player, | ||
| CharacterDatabaseTransaction | trans | ||
| ) |
Definition at line 484 of file BlackMarketMgr.cpp.
References _bidder, _currentBid, _marketId, _numBids, _secondsRemaining, CHAR_UPD_BLACKMARKET_AUCTIONS, CharacterDatabase, ObjectGuid::GetCounter(), GetExpirationTime(), BaseEntity::GetGUID(), GetSecondsRemaining(), MINUTE, Player::ModifyMoney(), sBlackMarketMgr, PreparedStatementBase::setInt32(), PreparedStatementBase::setInt64(), and PreparedStatementBase::setUInt64().
Referenced by WorldSession::HandleBlackMarketBidOnItem().
| void BlackMarketEntry::SaveToDB | ( | CharacterDatabaseTransaction | trans | ) | const |
Definition at line 450 of file BlackMarketMgr.cpp.
References _bidder, _currentBid, _marketId, _numBids, CHAR_INS_BLACKMARKET_AUCTIONS, CharacterDatabase, GetExpirationTime(), PreparedStatementBase::setInt32(), PreparedStatementBase::setInt64(), and PreparedStatementBase::setUInt64().
Referenced by BlackMarketMgr::RefreshAuctions().
|
inline |
Definition at line 91 of file BlackMarketMgr.h.
References _bidder.
|
inline |
Definition at line 85 of file BlackMarketMgr.h.
References _currentBid.
|
inline |
Definition at line 88 of file BlackMarketMgr.h.
References _numBids.
| void BlackMarketEntry::Update | ( | time_t | newTimeOfUpdate | ) |
Definition at line 398 of file BlackMarketMgr.cpp.
References _secondsRemaining, and sBlackMarketMgr.
Referenced by BlackMarketMgr::Update().
| bool BlackMarketEntry::ValidateBid | ( | uint64 | bid | ) | const |
Definition at line 470 of file BlackMarketMgr.cpp.
References _currentBid, BMAH_MAX_BID, and GetMinIncrement().
Referenced by WorldSession::HandleBlackMarketBidOnItem().
|
private |
Definition at line 115 of file BlackMarketMgr.h.
Referenced by GetBidder(), LoadFromDB(), PlaceBid(), SaveToDB(), and SetBidder().
|
private |
Definition at line 113 of file BlackMarketMgr.h.
Referenced by BuildAuctionMailBody(), GetCurrentBid(), GetMinIncrement(), LoadFromDB(), PlaceBid(), SaveToDB(), SetCurrentBid(), and ValidateBid().
|
private |
Definition at line 117 of file BlackMarketMgr.h.
Referenced by GetMailSent(), and MailSent().
|
private |
Definition at line 112 of file BlackMarketMgr.h.
Referenced by DeleteFromDB(), GetMarketId(), GetTemplate(), Initialize(), LoadFromDB(), PlaceBid(), and SaveToDB().
|
private |
Definition at line 114 of file BlackMarketMgr.h.
Referenced by GetNumBids(), LoadFromDB(), PlaceBid(), SaveToDB(), and SetNumBids().
|
private |
Definition at line 116 of file BlackMarketMgr.h.
Referenced by GetSecondsRemaining(), Initialize(), LoadFromDB(), PlaceBid(), and Update().