|
Project SkyFire Core
SkyFire 5.4.8 server core API documentation
|
#include <BlackMarketMgr.h>
Public Member Functions | |
| void | BuildBlackMarketRequestItemsResult (WorldPacket &data, uint32 guidLow) |
| void | CreateAuctions (uint32 number, SQLTransaction &trans) |
| BlackMarketAuction * | GetAuction (uint32 auctionId) const |
| uint32 | GetAuctionCount () |
| BMAuctionStore::iterator | GetAuctionsBegin () |
| BMAuctionStore::iterator | GetAuctionsEnd () |
| uint32 | GetFreeAuctionId () |
| BlackMarketAuctionTemplate * | GetTemplate (uint32 templateId) const |
| BMAuctionTemplateStore::iterator | GetTemplatesBegin () |
| uint32 | GetTemplatesCount () |
| BMAuctionTemplateStore::iterator | GetTemplatesEnd () |
| bool | isBlackMarketOpen () |
| void | LoadBlackMarketAuctions () |
| void | LoadBlackMarketTemplates () |
| void | SendAuctionOutbidded (BlackMarketAuction *auction, SQLTransaction &trans) |
| void | SendAuctionWon (BlackMarketAuction *auction, SQLTransaction &trans) |
| void | Update () |
| void | UpdateAuction (BlackMarketAuction *auction, uint64 newPrice, uint64 requiredIncrement, Player *newBidder) |
Private Member Functions | |
| BlackMarketMgr () | |
| ~BlackMarketMgr () | |
Private Attributes | |
| BMAuctionStore | _auctions |
| BMAuctionTemplateStore | _templates |
Friends | |
| class | Skyfire::Singleton< BlackMarketMgr, Skyfire::NullMutex > |
Definition at line 101 of file BlackMarketMgr.h.
|
private |
Definition at line 31 of file BlackMarketMgr.cpp.
|
private |
Definition at line 22 of file BlackMarketMgr.cpp.
References GetAuctionsBegin(), GetAuctionsEnd(), GetTemplatesBegin(), and GetTemplatesEnd().
| void BlackMarketMgr::BuildBlackMarketRequestItemsResult | ( | WorldPacket & | data, |
| uint32 | guidLow ) |
Definition at line 247 of file BlackMarketMgr.cpp.
References ByteBuffer::FlushBits(), BlackMarketAuction::GetAuctionId(), GetAuctionsBegin(), GetAuctionsEnd(), BlackMarketAuction::GetCurrentBid(), BlackMarketAuction::GetCurrentBidder(), BlackMarketAuction::GetMinIncrement(), BlackMarketAuction::GetNumBids(), BlackMarketAuction::GetTemplate(), BlackMarketAuction::IsActive(), BlackMarketAuctionTemplate::ItemEntry, BlackMarketAuctionTemplate::MarketId, BlackMarketAuctionTemplate::MinBid, ByteBuffer::PutBits(), BlackMarketAuctionTemplate::Quantity, BlackMarketAuctionTemplate::SellerNPCEntry, SF_LOG_DEBUG, BlackMarketAuction::TimeLeft(), ByteBuffer::WriteBit(), and ByteBuffer::WriteBits().
| void BlackMarketMgr::CreateAuctions | ( | uint32 | number, |
| SQLTransaction & | trans ) |
Definition at line 200 of file BlackMarketMgr.cpp.
References _auctions, _templates, CONFIG_BLACK_MARKET_AUCTION_DELAY, CONFIG_BLACK_MARKET_AUCTION_DELAY_MOD, BlackMarketAuction::GetAuctionId(), GetAuctionsBegin(), GetAuctionsEnd(), GetFreeAuctionId(), GetTemplate(), GetTemplatesBegin(), GetTemplatesEnd(), BlackMarketAuctionTemplate::Id, BlackMarketAuctionTemplate::MinBid, BlackMarketAuction::SaveToDB(), BlackMarketAuction::SetAuctionId(), BlackMarketAuction::SetCurrentBid(), BlackMarketAuction::SetCurrentBidder(), BlackMarketAuction::SetMinIncrement(), BlackMarketAuction::SetNumBids(), BlackMarketAuction::SetStartTime(), BlackMarketAuction::SetTemplateId(), and sWorld.
Referenced by Update().
| BlackMarketAuction * BlackMarketMgr::GetAuction | ( | uint32 | auctionId | ) | const |
Definition at line 319 of file BlackMarketMgr.cpp.
References _auctions, and SF_LOG_DEBUG.
Referenced by GetFreeAuctionId().
|
inline |
Definition at line 124 of file BlackMarketMgr.h.
References _auctions.
|
inline |
Definition at line 125 of file BlackMarketMgr.h.
References _auctions.
Referenced by BuildBlackMarketRequestItemsResult(), CreateAuctions(), Update(), and ~BlackMarketMgr().
|
inline |
Definition at line 126 of file BlackMarketMgr.h.
References _auctions.
Referenced by BuildBlackMarketRequestItemsResult(), CreateAuctions(), Update(), and ~BlackMarketMgr().
| uint32 BlackMarketMgr::GetFreeAuctionId | ( | ) |
Definition at line 193 of file BlackMarketMgr.cpp.
References GetAuction().
Referenced by CreateAuctions().
| BlackMarketAuctionTemplate * BlackMarketMgr::GetTemplate | ( | uint32 | templateId | ) | const |
Definition at line 309 of file BlackMarketMgr.cpp.
References _templates, and SF_LOG_DEBUG.
Referenced by CreateAuctions().
|
inline |
Definition at line 120 of file BlackMarketMgr.h.
References _templates.
Referenced by CreateAuctions(), and ~BlackMarketMgr().
|
inline |
Definition at line 119 of file BlackMarketMgr.h.
References _templates, and GetTemplatesCount().
Referenced by GetTemplatesCount().
|
inline |
Definition at line 121 of file BlackMarketMgr.h.
References _templates.
Referenced by CreateAuctions(), and ~BlackMarketMgr().
|
inline |
Definition at line 138 of file BlackMarketMgr.h.
References CONFIG_BLACK_MARKET_OPEN, and sWorld.
| void BlackMarketMgr::LoadBlackMarketAuctions | ( | ) |
Definition at line 125 of file BlackMarketMgr.cpp.
References _auctions, CHAR_SEL_BLACKMARKET_AUCTIONS, CharacterDatabase, BlackMarketAuction::DeleteFromDB(), BlackMarketAuction::GetAuctionId(), getMSTime(), GetMSTimeDiffToNow(), BlackMarketAuction::GetTemplate(), Field::GetUInt32(), Field::GetUInt64(), and SF_LOG_INFO.
| void BlackMarketMgr::LoadBlackMarketTemplates | ( | ) |
Definition at line 80 of file BlackMarketMgr.cpp.
References _templates, BlackMarketAuctionTemplate::Chance, BlackMarketAuctionTemplate::Duration, Field::GetFloat(), getMSTime(), GetMSTimeDiffToNow(), Field::GetUInt32(), BlackMarketAuctionTemplate::Id, BlackMarketAuctionTemplate::ItemEntry, BlackMarketAuctionTemplate::MarketId, BlackMarketAuctionTemplate::MinBid, BlackMarketAuctionTemplate::Quantity, BlackMarketAuctionTemplate::SellerNPCEntry, SF_LOG_ERROR, SF_LOG_INFO, sObjectMgr, WORLD_SEL_BLACKMARKET_TEMPLATE, and WorldDatabase.
| void BlackMarketMgr::SendAuctionOutbidded | ( | BlackMarketAuction * | auction, |
| SQLTransaction & | trans ) |
Definition at line 346 of file BlackMarketMgr.cpp.
References MailDraft::AddMoney(), BM_AUCTION_OUTBIDDED, BlackMarketAuction::BuildAuctionMailBody(), BlackMarketAuction::BuildAuctionMailSubject(), ObjectAccessor::FindPlayer(), BlackMarketAuction::GetCurrentBid(), BlackMarketAuction::GetCurrentBidder(), Player::GetSession(), BlackMarketAuction::GetTemplate(), HIGHGUID_PLAYER, BlackMarketAuctionTemplate::ItemEntry, MAIL_CHECK_MASK_COPIED, MAKE_NEW_GUID(), BlackMarketAuctionTemplate::SellerNPCEntry, MailDraft::SendMailTo(), WorldSession::SendPacket(), SMSG_BLACKMARKET_OUT_BID, and sObjectMgr.
Referenced by UpdateAuction().
| void BlackMarketMgr::SendAuctionWon | ( | BlackMarketAuction * | auction, |
| SQLTransaction & | trans ) |
Definition at line 370 of file BlackMarketMgr.cpp.
References MailDraft::AddItem(), BM_AUCTION_WON, BlackMarketAuction::BuildAuctionMailBody(), BlackMarketAuction::BuildAuctionMailSubject(), CharacterDatabase, Item::CreateItem(), ObjectAccessor::FindPlayer(), BlackMarketAuction::GetCurrentBidder(), Player::GetSession(), BlackMarketAuction::GetTemplate(), HIGHGUID_PLAYER, BlackMarketAuctionTemplate::ItemEntry, MAIL_CHECK_MASK_COPIED, MAKE_NEW_GUID(), BlackMarketAuctionTemplate::Quantity, Item::SaveToDB(), MailDraft::SendMailTo(), WorldSession::SendPacket(), SMSG_BLACKMARKET_BID_WON, and sObjectMgr.
Referenced by Update().
| void BlackMarketMgr::Update | ( | ) |
Definition at line 165 of file BlackMarketMgr.cpp.
References _auctions, CharacterDatabase, CONFIG_BLACK_MARKET_MAX_AUCTIONS, CreateAuctions(), BlackMarketAuction::DeleteFromDB(), GetAuctionsBegin(), GetAuctionsEnd(), BlackMarketAuction::GetCurrentBidder(), BlackMarketAuction::IsExpired(), SendAuctionWon(), and sWorld.
| void BlackMarketMgr::UpdateAuction | ( | BlackMarketAuction * | auction, |
| uint64 | newPrice, | ||
| uint64 | requiredIncrement, | ||
| Player * | newBidder ) |
Definition at line 290 of file BlackMarketMgr.cpp.
References CharacterDatabase, BlackMarketAuction::GetCurrentBidder(), Object::GetGUIDLow(), BlackMarketAuction::GetNumBids(), SendAuctionOutbidded(), BlackMarketAuction::SetCurrentBid(), BlackMarketAuction::SetCurrentBidder(), BlackMarketAuction::SetMinIncrement(), BlackMarketAuction::SetNumBids(), and BlackMarketAuction::UpdateToDB().
|
friend |
Definition at line 95 of file BlackMarketMgr.h.
|
private |
Definition at line 110 of file BlackMarketMgr.h.
Referenced by CreateAuctions(), GetAuction(), GetAuctionCount(), GetAuctionsBegin(), GetAuctionsEnd(), LoadBlackMarketAuctions(), and Update().
|
private |
Definition at line 109 of file BlackMarketMgr.h.
Referenced by CreateAuctions(), GetTemplate(), GetTemplatesBegin(), GetTemplatesCount(), GetTemplatesEnd(), and LoadBlackMarketTemplates().