![]() |
TrinityCore
|
#include <AuctionHouseBotBuyer.h>
Inheritance diagram for AuctionBotBuyer:Public Member Functions | |
| AuctionBotBuyer () | |
| ~AuctionBotBuyer () | |
| bool | Initialize () override |
| bool | Update (AuctionHouseType houseType) override |
| void | LoadConfig () |
| void | BuyAndBidItems (BuyerConfiguration &config) |
Public Member Functions inherited from AuctionBotAgent | |
| AuctionBotAgent () | |
| virtual | ~AuctionBotAgent () |
Private Member Functions | |
| void | LoadBuyerValues (BuyerConfiguration &config) |
| bool | RollBuyChance (BuyerItemInfo const *ahInfo, Item const *item, AuctionEntry const *auction, uint32 bidPrice) |
| bool | RollBidChance (BuyerItemInfo const *ahInfo, Item const *item, AuctionEntry const *auction, uint32 bidPrice) |
| void | PlaceBidToEntry (AuctionEntry *auction, uint32 bidPrice) |
| void | BuyEntry (AuctionEntry *auction, AuctionHouseObject *auctionHouse) |
| void | PrepareListOfEntry (BuyerConfiguration &config) |
| uint32 | GetItemInformation (BuyerConfiguration &config) |
| uint32 | GetVendorPrice (uint32 quality) |
| uint32 | GetChanceMultiplier (uint32 quality) |
Private Attributes | |
| uint32 | _checkInterval |
| BuyerConfiguration | _houseConfig [MAX_AUCTION_HOUSE_TYPE] |
Definition at line 70 of file AuctionHouseBotBuyer.h.
| AuctionBotBuyer::AuctionBotBuyer | ( | ) |
Definition at line 26 of file AuctionHouseBotBuyer.cpp.
References _houseConfig, Initialize(), and MAX_AUCTION_HOUSE_TYPE.
| AuctionBotBuyer::~AuctionBotBuyer | ( | ) |
Definition at line 33 of file AuctionHouseBotBuyer.cpp.
| void AuctionBotBuyer::BuyAndBidItems | ( | BuyerConfiguration & | config | ) |
Definition at line 255 of file AuctionHouseBotBuyer.cpp.
References _checkInterval, AuctionEntry::bid, BuyEntry(), AuctionEntry::buyout, BuyerConfiguration::EligibleItems, AuctionHouseObject::GetAuction(), AuctionEntry::GetAuctionOutBid(), Object::GetEntry(), GameTime::GetGameTime(), BuyerConfiguration::GetHouseType(), AuctionEntry::Id, AuctionEntry::itemGUIDLow, PlaceBidToEntry(), RollBidChance(), RollBuyChance(), BuyerConfiguration::SameItemInfo, sAuctionBotConfig, sAuctionMgr, AuctionEntry::startbid, TC_LOG_DEBUG, and urand().
Referenced by Update().
|
private |
Definition at line 390 of file AuctionHouseBotBuyer.cpp.
References AuctionEntry::bid, AuctionEntry::bidder, AuctionEntry::buyout, CharacterDatabase, AuctionEntry::DeleteFromDB(), GOLD, AuctionEntry::Id, AuctionEntry::itemGUIDLow, AuctionEntry::owner, AuctionHouseObject::RemoveAuction(), sAuctionBotConfig, sAuctionMgr, and TC_LOG_DEBUG.
Referenced by BuyAndBidItems().
Definition at line 366 of file AuctionHouseBotBuyer.cpp.
References CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_BLUE, CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_GRAY, CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_GREEN, CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_ORANGE, CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_PURPLE, CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_WHITE, CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_YELLOW, ITEM_QUALITY_ARTIFACT, ITEM_QUALITY_EPIC, ITEM_QUALITY_LEGENDARY, ITEM_QUALITY_NORMAL, ITEM_QUALITY_POOR, ITEM_QUALITY_RARE, ITEM_QUALITY_UNCOMMON, and sAuctionBotConfig.
Referenced by RollBidChance(), and RollBuyChance().
|
private |
Definition at line 98 of file AuctionHouseBotBuyer.cpp.
References AuctionEntry::bid, AuctionEntry::bidder, BuyerItemInfo::BidItemCount, BuyerItemInfo::BuyItemCount, AuctionEntry::buyout, BuyerConfiguration::EligibleItems, AuctionHouseObject::GetAuctionsBegin(), AuctionHouseObject::GetAuctionsEnd(), Item::GetCount(), Object::GetEntry(), GameTime::GetGameTime(), BuyerConfiguration::GetHouseType(), AuctionEntry::Id, AuctionEntry::itemGUIDLow, BuyerItemInfo::MinBidPrice, BuyerItemInfo::MinBuyPrice, AuctionEntry::owner, BuyerConfiguration::SameItemInfo, sAuctionBotConfig, sAuctionMgr, AuctionEntry::startbid, TC_LOG_DEBUG, BuyerItemInfo::TotalBidPrice, and BuyerItemInfo::TotalBuyPrice.
Referenced by Update().
Definition at line 343 of file AuctionHouseBotBuyer.cpp.
References CONFIG_AHBOT_BUYER_BASEPRICE_BLUE, CONFIG_AHBOT_BUYER_BASEPRICE_GRAY, CONFIG_AHBOT_BUYER_BASEPRICE_GREEN, CONFIG_AHBOT_BUYER_BASEPRICE_ORANGE, CONFIG_AHBOT_BUYER_BASEPRICE_PURPLE, CONFIG_AHBOT_BUYER_BASEPRICE_WHITE, CONFIG_AHBOT_BUYER_BASEPRICE_YELLOW, ITEM_QUALITY_ARTIFACT, ITEM_QUALITY_EPIC, ITEM_QUALITY_LEGENDARY, ITEM_QUALITY_NORMAL, ITEM_QUALITY_POOR, ITEM_QUALITY_RARE, ITEM_QUALITY_UNCOMMON, sAuctionBotConfig, and SILVER.
Referenced by RollBidChance(), and RollBuyChance().
|
overridevirtual |
Implements AuctionBotAgent.
Definition at line 37 of file AuctionHouseBotBuyer.cpp.
References _checkInterval, _houseConfig, CONFIG_AHBOT_BUYER_RECHECK_INTERVAL, LoadConfig(), MAX_AUCTION_HOUSE_TYPE, MINUTE, sAuctionBotConfig, and TC_LOG_DEBUG.
Referenced by AuctionBotBuyer(), and AuctionHouseBot::InitializeAgents().
|
private |
Definition at line 70 of file AuctionHouseBotBuyer.cpp.
Referenced by LoadConfig().
| void AuctionBotBuyer::LoadConfig | ( | ) |
Definition at line 60 of file AuctionHouseBotBuyer.cpp.
References _houseConfig, BuyerConfiguration::BuyerEnabled, LoadBuyerValues(), MAX_AUCTION_HOUSE_TYPE, and sAuctionBotConfig.
Referenced by Initialize().
|
private |
Definition at line 421 of file AuctionHouseBotBuyer.cpp.
References AUCTION_ENTRY_FLAG_GM_LOG_BUYER, AuctionEntry::bid, AuctionEntry::bidder, CHAR_UPD_AUCTION_BID, CharacterDatabase, AuctionEntry::Flags, GOLD, AuctionEntry::Id, AuctionEntry::owner, sAuctionBotConfig, sAuctionMgr, PreparedStatementBase::setUInt32(), PreparedStatementBase::setUInt8(), and TC_LOG_DEBUG.
Referenced by BuyAndBidItems().
|
private |
Definition at line 238 of file AuctionHouseBotBuyer.cpp.
References BuyerConfiguration::EligibleItems, GameTime::GetGameTime(), and TC_LOG_DEBUG.
Referenced by Update().
|
private |
Definition at line 201 of file AuctionHouseBotBuyer.cpp.
References AuctionEntry::bidder, BuyerItemInfo::BidItemCount, CONFIG_AHBOT_BUYER_CHANCE_FACTOR, frand(), GetChanceMultiplier(), Item::GetCount(), ItemTemplate::GetQuality(), Item::GetSellPrice(), Item::GetTemplate(), GetVendorPrice(), sAuctionBotConfig, TC_LOG_DEBUG, and BuyerItemInfo::TotalBidPrice.
Referenced by BuyAndBidItems().
|
private |
Definition at line 162 of file AuctionHouseBotBuyer.cpp.
References AuctionEntry::bidder, BuyerItemInfo::BuyItemCount, AuctionEntry::buyout, CONFIG_AHBOT_BUYER_CHANCE_FACTOR, frand(), GetChanceMultiplier(), Item::GetCount(), ItemTemplate::GetQuality(), Item::GetSellPrice(), Item::GetTemplate(), GetVendorPrice(), sAuctionBotConfig, TC_LOG_DEBUG, and BuyerItemInfo::TotalBuyPrice.
Referenced by BuyAndBidItems().
|
overridevirtual |
Implements AuctionBotAgent.
Definition at line 76 of file AuctionHouseBotBuyer.cpp.
References _houseConfig, BuyAndBidItems(), AuctionBotConfig::GetHouseTypeName(), GetItemInformation(), PrepareListOfEntry(), sAuctionBotConfig, and TC_LOG_DEBUG.
Referenced by AuctionHouseBot::Update().
|
private |
Definition at line 83 of file AuctionHouseBotBuyer.h.
Referenced by BuyAndBidItems(), and Initialize().
|
private |
Definition at line 84 of file AuctionHouseBotBuyer.h.
Referenced by AuctionBotBuyer(), Initialize(), LoadConfig(), and Update().