TrinityCore
BlackMarketMgr Class Reference

#include <BlackMarketMgr.h>

Public Types

typedef std::unordered_map< int32, BlackMarketEntry * > BlackMarketEntryMap
 
typedef std::unordered_map< int32, BlackMarketTemplate const * > BlackMarketTemplateMap
 

Public Member Functions

void LoadTemplates ()
 
void LoadAuctions ()
 
void Update (bool updateTime=false)
 
void RefreshAuctions ()
 
time_t GetLastUpdate () const
 
bool IsEnabled () const
 
void BuildItemsResponse (WorldPackets::BlackMarket::BlackMarketRequestItemsResult &packet, Player *player)
 
BlackMarketEntryGetAuctionByID (int32 marketId) const
 
BlackMarketTemplate const * GetTemplateByID (int32 marketId) const
 
void AddAuction (BlackMarketEntry *auction)
 
void AddTemplate (BlackMarketTemplate *templ)
 
void SendAuctionWonMail (BlackMarketEntry *entry, CharacterDatabaseTransaction trans)
 
void SendAuctionOutbidMail (BlackMarketEntry *entry, CharacterDatabaseTransaction trans)
 

Static Public Member Functions

static BlackMarketMgrInstance ()
 

Private Member Functions

 BlackMarketMgr ()
 
 ~BlackMarketMgr ()
 

Private Attributes

BlackMarketEntryMap _auctions
 
BlackMarketTemplateMap _templates
 
time_t _lastUpdate = time_t(0)
 

Detailed Description

Definition at line 120 of file BlackMarketMgr.h.

Member Typedef Documentation

◆ BlackMarketEntryMap

Definition at line 129 of file BlackMarketMgr.h.

◆ BlackMarketTemplateMap

Definition at line 130 of file BlackMarketMgr.h.

Constructor & Destructor Documentation

◆ BlackMarketMgr()

BlackMarketMgr::BlackMarketMgr ( )
private

Definition at line 38 of file BlackMarketMgr.cpp.

◆ ~BlackMarketMgr()

BlackMarketMgr::~BlackMarketMgr ( )
private

Definition at line 42 of file BlackMarketMgr.cpp.

Member Function Documentation

◆ AddAuction()

void BlackMarketMgr::AddAuction ( BlackMarketEntry auction)

Definition at line 253 of file BlackMarketMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ AddTemplate()

void BlackMarketMgr::AddTemplate ( BlackMarketTemplate templ)

Definition at line 258 of file BlackMarketMgr.cpp.

+ Here is the caller graph for this function:

◆ BuildItemsResponse()

void BlackMarketMgr::BuildItemsResponse ( WorldPackets::BlackMarket::BlackMarketRequestItemsResult packet,
Player player 
)

Definition at line 218 of file BlackMarketMgr.cpp.

+ Here is the call graph for this function:

◆ GetAuctionByID()

BlackMarketEntry * BlackMarketMgr::GetAuctionByID ( int32  marketId) const

Definition at line 344 of file BlackMarketMgr.cpp.

+ Here is the caller graph for this function:

◆ GetLastUpdate()

time_t BlackMarketMgr::GetLastUpdate ( ) const
inline

Definition at line 138 of file BlackMarketMgr.h.

◆ GetTemplateByID()

BlackMarketTemplate const * BlackMarketMgr::GetTemplateByID ( int32  marketId) const

Definition at line 353 of file BlackMarketMgr.cpp.

◆ Instance()

BlackMarketMgr * BlackMarketMgr::Instance ( )
static

Definition at line 51 of file BlackMarketMgr.cpp.

◆ IsEnabled()

bool BlackMarketMgr::IsEnabled ( ) const

Definition at line 213 of file BlackMarketMgr.cpp.

◆ LoadAuctions()

void BlackMarketMgr::LoadAuctions ( )

Definition at line 94 of file BlackMarketMgr.cpp.

+ Here is the call graph for this function:

◆ LoadTemplates()

void BlackMarketMgr::LoadTemplates ( )

Definition at line 57 of file BlackMarketMgr.cpp.

+ Here is the call graph for this function:

◆ RefreshAuctions()

void BlackMarketMgr::RefreshAuctions ( )

Definition at line 166 of file BlackMarketMgr.cpp.

+ Here is the call graph for this function:

◆ SendAuctionOutbidMail()

void BlackMarketMgr::SendAuctionOutbidMail ( BlackMarketEntry entry,
CharacterDatabaseTransaction  trans 
)

Definition at line 323 of file BlackMarketMgr.cpp.

+ Here is the call graph for this function:

◆ SendAuctionWonMail()

void BlackMarketMgr::SendAuctionWonMail ( BlackMarketEntry entry,
CharacterDatabaseTransaction  trans 
)

Definition at line 263 of file BlackMarketMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ Update()

void BlackMarketMgr::Update ( bool  updateTime = false)

Definition at line 145 of file BlackMarketMgr.cpp.

+ Here is the call graph for this function:
+ Here is the caller graph for this function:

Member Data Documentation

◆ _auctions

BlackMarketEntryMap BlackMarketMgr::_auctions
private

Definition at line 154 of file BlackMarketMgr.h.

◆ _lastUpdate

time_t BlackMarketMgr::_lastUpdate = time_t(0)
private

Definition at line 156 of file BlackMarketMgr.h.

◆ _templates

BlackMarketTemplateMap BlackMarketMgr::_templates
private

Definition at line 155 of file BlackMarketMgr.h.


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