TrinityCore
Loading...
Searching...
No Matches
BlackMarketEntry Class Reference

#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
 

Detailed Description

Definition at line 70 of file BlackMarketMgr.h.

Member Function Documentation

◆ BuildAuctionMailBody()

std::string BlackMarketEntry::BuildAuctionMailBody ( )

◆ BuildAuctionMailSubject()

◆ DeleteFromDB()

◆ GetBidder()

◆ GetCurrentBid()

uint64 BlackMarketEntry::GetCurrentBid ( ) const
inline

◆ GetExpirationTime()

time_t BlackMarketEntry::GetExpirationTime ( ) const

Definition at line 413 of file BlackMarketMgr.cpp.

References GameTime::GetGameTime(), and GetSecondsRemaining().

Referenced by PlaceBid(), and SaveToDB().

◆ GetMailSent()

bool BlackMarketEntry::GetMailSent ( ) const
inline

Definition at line 109 of file BlackMarketMgr.h.

References _mailSent.

Referenced by BlackMarketMgr::SendAuctionWonMail().

◆ GetMarketId()

int32 BlackMarketEntry::GetMarketId ( ) const
inline

◆ GetMinIncrement()

uint64 BlackMarketEntry::GetMinIncrement ( ) const
inline

Definition at line 101 of file BlackMarketMgr.h.

References _currentBid, and GOLD.

Referenced by ValidateBid().

◆ GetNumBids()

int32 BlackMarketEntry::GetNumBids ( ) const
inline

Definition at line 87 of file BlackMarketMgr.h.

References _numBids.

◆ GetSecondsRemaining()

uint32 BlackMarketEntry::GetSecondsRemaining ( ) const

◆ GetTemplate()

BlackMarketTemplate const * BlackMarketEntry::GetTemplate ( ) const

◆ Initialize()

void BlackMarketEntry::Initialize ( int32  marketId,
uint32  duration 
)
inline

Definition at line 75 of file BlackMarketMgr.h.

References _marketId, and _secondsRemaining.

Referenced by BlackMarketMgr::RefreshAuctions().

◆ IsCompleted()

bool BlackMarketEntry::IsCompleted ( ) const

◆ LoadFromDB()

◆ MailSent()

void BlackMarketEntry::MailSent ( )
inline

Definition at line 108 of file BlackMarketMgr.h.

References _mailSent.

Referenced by BlackMarketMgr::SendAuctionWonMail().

◆ PlaceBid()

◆ SaveToDB()

◆ SetBidder()

void BlackMarketEntry::SetBidder ( ObjectGuid::LowType  bidder)
inline

Definition at line 91 of file BlackMarketMgr.h.

References _bidder.

◆ SetCurrentBid()

void BlackMarketEntry::SetCurrentBid ( uint64  bid)
inline

Definition at line 85 of file BlackMarketMgr.h.

References _currentBid.

◆ SetNumBids()

void BlackMarketEntry::SetNumBids ( int32  numBids)
inline

Definition at line 88 of file BlackMarketMgr.h.

References _numBids.

◆ Update()

void BlackMarketEntry::Update ( time_t  newTimeOfUpdate)

Definition at line 398 of file BlackMarketMgr.cpp.

References _secondsRemaining, and sBlackMarketMgr.

Referenced by BlackMarketMgr::Update().

◆ ValidateBid()

bool BlackMarketEntry::ValidateBid ( uint64  bid) const

Member Data Documentation

◆ _bidder

ObjectGuid::LowType BlackMarketEntry::_bidder = 0
private

Definition at line 115 of file BlackMarketMgr.h.

Referenced by GetBidder(), LoadFromDB(), PlaceBid(), SaveToDB(), and SetBidder().

◆ _currentBid

uint64 BlackMarketEntry::_currentBid = 0
private

◆ _mailSent

bool BlackMarketEntry::_mailSent = false
private

Definition at line 117 of file BlackMarketMgr.h.

Referenced by GetMailSent(), and MailSent().

◆ _marketId

int32 BlackMarketEntry::_marketId = 0
private

◆ _numBids

int32 BlackMarketEntry::_numBids = 0
private

Definition at line 114 of file BlackMarketMgr.h.

Referenced by GetNumBids(), LoadFromDB(), PlaceBid(), SaveToDB(), and SetNumBids().

◆ _secondsRemaining

uint32 BlackMarketEntry::_secondsRemaining = 0
private

Definition at line 116 of file BlackMarketMgr.h.

Referenced by GetSecondsRemaining(), Initialize(), LoadFromDB(), PlaceBid(), and Update().


The documentation for this class was generated from the following files: