![]() |
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 ()=default | |
| AuctionBotAgent (AuctionBotAgent const &)=delete | |
| AuctionBotAgent (AuctionBotAgent &&)=delete | |
| AuctionBotAgent & | operator= (AuctionBotAgent const &)=delete |
| AuctionBotAgent & | operator= (AuctionBotAgent &&)=delete |
| virtual | ~AuctionBotAgent ()=default |
Private Member Functions | |
| void | LoadBuyerValues (BuyerConfiguration &config) |
| bool | RollBuyChance (BuyerItemInfo const *ahInfo, AuctionPosting const *auction) |
| bool | RollBidChance (BuyerItemInfo const *ahInfo, AuctionPosting const *auction, uint32 bidPrice) |
| void | PlaceBidToEntry (AuctionPosting *auction, AuctionHouseObject *auctionHouse, uint32 bidPrice) |
| void | BuyEntry (AuctionPosting *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 272 of file AuctionHouseBotBuyer.cpp.
References _checkInterval, AuctionPosting::BidAmount, AuctionPosting::Bucket, BuyEntry(), AuctionPosting::BuyoutOrUnitPrice, AuctionPosting::CalculateMinIncrement(), BuyerConfiguration::EligibleItems, AuctionHouseObject::GetAuction(), GameTime::GetGameTime(), BuyerConfiguration::GetHouseType(), AuctionPosting::Id, AuctionsBucketKey::ItemId, AuctionsBucketData::Key, AuctionPosting::MinBid, PlaceBidToEntry(), RollBidChance(), RollBuyChance(), BuyerConfiguration::SameItemInfo, sAuctionBotConfig, sAuctionMgr, TC_LOG_DEBUG, and urand().
Referenced by Update().
|
private |
Definition at line 399 of file AuctionHouseBotBuyer.cpp.
References AuctionPosting::BidAmount, AuctionPosting::Bidder, AuctionPosting::BuyoutOrUnitPrice, CharacterDatabase, GOLD, AuctionPosting::Id, ObjectGuid::IsEmpty(), AuctionPosting::Owner, AuctionHouseObject::RemoveAuction(), sAuctionBotConfig, AuctionHouseObject::SendAuctionOutbid(), AuctionHouseObject::SendAuctionSold(), AuctionHouseObject::SendAuctionWon(), and TC_LOG_DEBUG.
Referenced by BuyAndBidItems().
Definition at line 375 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 AuctionPosting::BidAmount, AuctionPosting::Bidder, BuyerItemInfo::BidItemCount, AuctionPosting::Bucket, BuyerItemInfo::BuyItemCount, AuctionPosting::BuyoutOrUnitPrice, BuyerConfiguration::EligibleItems, AuctionHouseObject::GetAuctionsBegin(), AuctionHouseObject::GetAuctionsEnd(), GameTime::GetGameTime(), BuyerConfiguration::GetHouseType(), AuctionPosting::Id, AuctionPosting::IsCommodity(), ObjectGuid::IsEmpty(), AuctionsBucketKey::ItemId, AuctionsBucketData::Key, AuctionPosting::MinBid, BuyerItemInfo::MinBidPrice, BuyerItemInfo::MinBuyPrice, AuctionPosting::Owner, BuyerConfiguration::SameItemInfo, sAuctionBotConfig, sAuctionMgr, TC_LOG_DEBUG, BuyerItemInfo::TotalBidPrice, and BuyerItemInfo::TotalBuyPrice.
Referenced by Update().
Definition at line 352 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 430 of file AuctionHouseBotBuyer.cpp.
References EnumFlag< T >::AsUnderlyingType(), AuctionPosting::BidAmount, AuctionPosting::Bidder, CHAR_UPD_AUCTION_BID, CharacterDatabase, ObjectGuid::GetCounter(), GmLogBuyer, GOLD, AuctionPosting::Id, ObjectGuid::IsEmpty(), AuctionPosting::Owner, sAuctionBotConfig, AuctionHouseObject::SendAuctionOutbid(), AuctionPosting::ServerFlags, PreparedStatementBase::setUInt32(), PreparedStatementBase::setUInt64(), PreparedStatementBase::setUInt8(), and TC_LOG_DEBUG.
Referenced by BuyAndBidItems().
|
private |
Definition at line 255 of file AuctionHouseBotBuyer.cpp.
References BuyerConfiguration::EligibleItems, GameTime::GetGameTime(), and TC_LOG_DEBUG.
Referenced by Update().
|
private |
Definition at line 209 of file AuctionHouseBotBuyer.cpp.
References AuctionPosting::Bidder, BuyerItemInfo::BidItemCount, CONFIG_AHBOT_BUYER_CHANCE_FACTOR, frand(), Item::GetBonus(), GetChanceMultiplier(), Item::GetItemLevel(), Item::GetQuality(), ItemTemplate::GetQuality(), Item::GetSellPrice(), Item::GetTemplate(), GetVendorPrice(), ObjectGuid::IsEmpty(), AuctionPosting::Items, AuctionPosting::MinBid, sAuctionBotConfig, TC_LOG_DEBUG, and BuyerItemInfo::TotalBidPrice.
Referenced by BuyAndBidItems().
|
private |
Definition at line 164 of file AuctionHouseBotBuyer.cpp.
References AuctionPosting::Bidder, BuyerItemInfo::BuyItemCount, AuctionPosting::BuyoutOrUnitPrice, CONFIG_AHBOT_BUYER_CHANCE_FACTOR, frand(), Item::GetBonus(), GetChanceMultiplier(), Item::GetItemLevel(), Item::GetQuality(), ItemTemplate::GetQuality(), Item::GetSellPrice(), Item::GetTemplate(), GetVendorPrice(), ObjectGuid::IsEmpty(), AuctionPosting::Items, 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().