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

#include <AuctionHouseBot.h>

Public Member Functions

bool Initialize ()
 
std::string const & GetAHBotIncludes () const
 
std::string const & GetAHBotExcludes () const
 
uint32 GetConfig (AuctionBotConfigUInt32Values index) const
 
bool GetConfig (AuctionBotConfigBoolValues index) const
 
float GetConfig (AuctionBotConfigFloatValues index) const
 
void SetConfig (AuctionBotConfigBoolValues index, bool value)
 
void SetConfig (AuctionBotConfigUInt32Values index, uint32 value)
 
void SetConfig (AuctionBotConfigFloatValues index, float value)
 
uint32 GetConfigItemAmountRatio (AuctionHouseType houseType) const
 
uint32 GetConfigPriceRatio (AuctionHouseType houseType) const
 
bool GetConfigBuyerEnabled (AuctionHouseType houseType) const
 
uint32 GetConfigItemQualityAmount (AuctionQuality quality) const
 
uint32 GetItemPerCycleBoost () const
 
uint32 GetItemPerCycleNormal () const
 
uint32 GetRandChar () const
 
uint32 GetRandCharExclude (uint32 exclude) const
 
bool IsBotChar (uint32 characterID) const
 
void Reload ()
 

Static Public Member Functions

static AuctionBotConfig * instance ()
 
static char const * GetHouseTypeName (AuctionHouseType houseType)
 

Private Member Functions

 AuctionBotConfig ()
 
 ~AuctionBotConfig ()
 
 AuctionBotConfig (AuctionBotConfig const &)=delete
 
AuctionBotConfig & operator= (AuctionBotConfig const &)=delete
 
void SetAHBotIncludes (const std::string &AHBotIncludes)
 
void SetAHBotExcludes (const std::string &AHBotExcludes)
 
void SetConfig (AuctionBotConfigUInt32Values index, char const *fieldname, uint32 defvalue)
 
void SetConfigMax (AuctionBotConfigUInt32Values index, char const *fieldname, uint32 defvalue, uint32 maxvalue)
 
void SetConfigMinMax (AuctionBotConfigUInt32Values index, char const *fieldname, uint32 defvalue, uint32 minvalue, uint32 maxvalue)
 
void SetConfig (AuctionBotConfigBoolValues index, char const *fieldname, bool defvalue)
 
void SetConfig (AuctionBotConfigFloatValues index, char const *fieldname, float defvalue)
 
void GetConfigFromFile ()
 

Private Attributes

std::string _AHBotIncludes
 
std::string _AHBotExcludes
 
std::vector< uint32 > _AHBotCharacters
 
uint32 _itemsPerCycleBoost
 
uint32 _itemsPerCycleNormal
 
uint32 _configUint32Values [CONFIG_UINT32_AHBOT_UINT32_COUNT]
 
bool _configBoolValues [CONFIG_UINT32_AHBOT_BOOL_COUNT]
 
float _configFloatValues [CONFIG_AHBOT_FLOAT_COUNT]
 

Detailed Description

Definition at line 208 of file AuctionHouseBot.h.

Constructor & Destructor Documentation

◆ AuctionBotConfig() [1/2]

AuctionBotConfig::AuctionBotConfig ( )
inlineprivate

Definition at line 211 of file AuctionHouseBot.h.

◆ ~AuctionBotConfig()

AuctionBotConfig::~AuctionBotConfig ( )
inlineprivate

Definition at line 212 of file AuctionHouseBot.h.

◆ AuctionBotConfig() [2/2]

AuctionBotConfig::AuctionBotConfig ( AuctionBotConfig const &  )
privatedelete

Member Function Documentation

◆ GetAHBotExcludes()

std::string const & AuctionBotConfig::GetAHBotExcludes ( ) const
inline

Definition at line 221 of file AuctionHouseBot.h.

◆ GetAHBotIncludes()

std::string const & AuctionBotConfig::GetAHBotIncludes ( ) const
inline

Definition at line 220 of file AuctionHouseBot.h.

◆ GetConfig() [1/3]

bool AuctionBotConfig::GetConfig ( AuctionBotConfigBoolValues  index) const
inline

Definition at line 224 of file AuctionHouseBot.h.

◆ GetConfig() [2/3]

float AuctionBotConfig::GetConfig ( AuctionBotConfigFloatValues  index) const
inline

Definition at line 225 of file AuctionHouseBot.h.

◆ GetConfig() [3/3]

◆ GetConfigBuyerEnabled()

◆ GetConfigFromFile()

void AuctionBotConfig::GetConfigFromFile ( )
private

Definition at line 149 of file AuctionHouseBot.cpp.

References CONFIG_AHBOT_ACCOUNT_ID, CONFIG_AHBOT_ALLIANCE_ITEM_AMOUNT_RATIO, CONFIG_AHBOT_ALLIANCE_PRICE_RATIO, CONFIG_AHBOT_BIDPRICE_MAX, CONFIG_AHBOT_BIDPRICE_MIN, CONFIG_AHBOT_BIND_EQUIP, CONFIG_AHBOT_BIND_NO, CONFIG_AHBOT_BIND_PICKUP, CONFIG_AHBOT_BIND_QUEST, CONFIG_AHBOT_BIND_USE, CONFIG_AHBOT_BUYER_ALLIANCE_ENABLED, 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, CONFIG_AHBOT_BUYER_CHANCE_FACTOR, 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, CONFIG_AHBOT_BUYER_ENABLED, CONFIG_AHBOT_BUYER_HORDE_ENABLED, CONFIG_AHBOT_BUYER_NEUTRAL_ENABLED, CONFIG_AHBOT_BUYER_RECHECK_INTERVAL, CONFIG_AHBOT_BUYPRICE_SELLER, CONFIG_AHBOT_CLASS_ARMOR_ALLOW_ZERO, CONFIG_AHBOT_CLASS_ARMOR_PRICE_RATIO, CONFIG_AHBOT_CLASS_ARMOR_PRIORITY, CONFIG_AHBOT_CLASS_CONSUMABLE_ALLOW_ZERO, CONFIG_AHBOT_CLASS_CONSUMABLE_PRICE_RATIO, CONFIG_AHBOT_CLASS_CONSUMABLE_PRIORITY, CONFIG_AHBOT_CLASS_CONTAINER_ALLOW_ZERO, CONFIG_AHBOT_CLASS_CONTAINER_MAX_ITEM_LEVEL, CONFIG_AHBOT_CLASS_CONTAINER_MIN_ITEM_LEVEL, CONFIG_AHBOT_CLASS_CONTAINER_PRICE_RATIO, CONFIG_AHBOT_CLASS_CONTAINER_PRIORITY, CONFIG_AHBOT_CLASS_GEM_ALLOW_ZERO, CONFIG_AHBOT_CLASS_GEM_PRICE_RATIO, CONFIG_AHBOT_CLASS_GEM_PRIORITY, CONFIG_AHBOT_CLASS_GENERIC_PRICE_RATIO, CONFIG_AHBOT_CLASS_GENERIC_PRIORITY, CONFIG_AHBOT_CLASS_GLYPH_ALLOW_ZERO, CONFIG_AHBOT_CLASS_GLYPH_MAX_ITEM_LEVEL, CONFIG_AHBOT_CLASS_GLYPH_MAX_REQ_LEVEL, CONFIG_AHBOT_CLASS_GLYPH_MIN_ITEM_LEVEL, CONFIG_AHBOT_CLASS_GLYPH_MIN_REQ_LEVEL, CONFIG_AHBOT_CLASS_GLYPH_PRICE_RATIO, CONFIG_AHBOT_CLASS_GLYPH_PRIORITY, CONFIG_AHBOT_CLASS_KEY_ALLOW_ZERO, CONFIG_AHBOT_CLASS_KEY_PRICE_RATIO, CONFIG_AHBOT_CLASS_KEY_PRIORITY, CONFIG_AHBOT_CLASS_MISC_ALLOW_ZERO, CONFIG_AHBOT_CLASS_MISC_MOUNT_MAX_REQ_LEVEL, CONFIG_AHBOT_CLASS_MISC_MOUNT_MAX_SKILL_RANK, CONFIG_AHBOT_CLASS_MISC_MOUNT_MIN_REQ_LEVEL, CONFIG_AHBOT_CLASS_MISC_MOUNT_MIN_SKILL_RANK, CONFIG_AHBOT_CLASS_MISC_PRICE_RATIO, CONFIG_AHBOT_CLASS_MISC_PRIORITY, CONFIG_AHBOT_CLASS_PROJECTILE_ALLOW_ZERO, CONFIG_AHBOT_CLASS_PROJECTILE_PRICE_RATIO, CONFIG_AHBOT_CLASS_PROJECTILE_PRIORITY, CONFIG_AHBOT_CLASS_QUEST_ALLOW_ZERO, CONFIG_AHBOT_CLASS_QUEST_PRICE_RATIO, CONFIG_AHBOT_CLASS_QUEST_PRIORITY, CONFIG_AHBOT_CLASS_QUIVER_ALLOW_ZERO, CONFIG_AHBOT_CLASS_QUIVER_PRICE_RATIO, CONFIG_AHBOT_CLASS_QUIVER_PRIORITY, CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_ARMOR, CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_CONSUMABLE, CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_CONTAINER, CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_GEM, CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_GENERIC, CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_GLYPH, CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_KEY, CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_MISC, CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_PROJECTILE, CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_QUEST, CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_QUIVER, CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_REAGENT, CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_RECIPE, CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_TRADEGOOD, CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_WEAPON, CONFIG_AHBOT_CLASS_REAGENT_ALLOW_ZERO, CONFIG_AHBOT_CLASS_REAGENT_PRICE_RATIO, CONFIG_AHBOT_CLASS_REAGENT_PRIORITY, CONFIG_AHBOT_CLASS_RECIPE_ALLOW_ZERO, CONFIG_AHBOT_CLASS_RECIPE_PRICE_RATIO, CONFIG_AHBOT_CLASS_RECIPE_PRIORITY, CONFIG_AHBOT_CLASS_TRADEGOOD_ALLOW_ZERO, CONFIG_AHBOT_CLASS_TRADEGOOD_MAX_ITEM_LEVEL, CONFIG_AHBOT_CLASS_TRADEGOOD_MIN_ITEM_LEVEL, CONFIG_AHBOT_CLASS_TRADEGOOD_PRICE_RATIO, CONFIG_AHBOT_CLASS_TRADEGOOD_PRIORITY, CONFIG_AHBOT_CLASS_WEAPON_ALLOW_ZERO, CONFIG_AHBOT_CLASS_WEAPON_PRICE_RATIO, CONFIG_AHBOT_CLASS_WEAPON_PRIORITY, CONFIG_AHBOT_HORDE_ITEM_AMOUNT_RATIO, CONFIG_AHBOT_HORDE_PRICE_RATIO, CONFIG_AHBOT_ITEM_BLUE_AMOUNT, CONFIG_AHBOT_ITEM_BLUE_PRICE_RATIO, CONFIG_AHBOT_ITEM_GRAY_AMOUNT, CONFIG_AHBOT_ITEM_GRAY_PRICE_RATIO, CONFIG_AHBOT_ITEM_GREEN_AMOUNT, CONFIG_AHBOT_ITEM_GREEN_PRICE_RATIO, CONFIG_AHBOT_ITEM_MAX_ITEM_LEVEL, CONFIG_AHBOT_ITEM_MAX_REQ_LEVEL, CONFIG_AHBOT_ITEM_MAX_SKILL_RANK, CONFIG_AHBOT_ITEM_MIN_ITEM_LEVEL, CONFIG_AHBOT_ITEM_MIN_REQ_LEVEL, CONFIG_AHBOT_ITEM_MIN_SKILL_RANK, CONFIG_AHBOT_ITEM_ORANGE_AMOUNT, CONFIG_AHBOT_ITEM_ORANGE_PRICE_RATIO, CONFIG_AHBOT_ITEM_PURPLE_AMOUNT, CONFIG_AHBOT_ITEM_PURPLE_PRICE_RATIO, CONFIG_AHBOT_ITEM_WHITE_AMOUNT, CONFIG_AHBOT_ITEM_WHITE_PRICE_RATIO, CONFIG_AHBOT_ITEM_YELLOW_AMOUNT, CONFIG_AHBOT_ITEM_YELLOW_PRICE_RATIO, CONFIG_AHBOT_ITEMS_LOOT, CONFIG_AHBOT_ITEMS_MISC, CONFIG_AHBOT_ITEMS_PER_CYCLE_BOOST, CONFIG_AHBOT_ITEMS_PER_CYCLE_NORMAL, CONFIG_AHBOT_ITEMS_VENDOR, CONFIG_AHBOT_LOCKBOX_ENABLED, CONFIG_AHBOT_MAXTIME, CONFIG_AHBOT_MINTIME, CONFIG_AHBOT_NEUTRAL_ITEM_AMOUNT_RATIO, CONFIG_AHBOT_NEUTRAL_PRICE_RATIO, CONFIG_AHBOT_SELLER_ENABLED, DAY, MINUTE, sConfigMgr, SetAHBotExcludes(), SetAHBotIncludes(), SetConfig(), SetConfigMax(), and SetConfigMinMax().

Referenced by Initialize().

◆ GetConfigItemAmountRatio()

◆ GetConfigItemQualityAmount()

◆ GetConfigPriceRatio()

◆ GetHouseTypeName()

◆ GetItemPerCycleBoost()

uint32 AuctionBotConfig::GetItemPerCycleBoost ( ) const
inline

Definition at line 235 of file AuctionHouseBot.h.

◆ GetItemPerCycleNormal()

uint32 AuctionBotConfig::GetItemPerCycleNormal ( ) const
inline

Definition at line 236 of file AuctionHouseBot.h.

◆ GetRandChar()

uint32 AuctionBotConfig::GetRandChar ( ) const

◆ GetRandCharExclude()

uint32 AuctionBotConfig::GetRandCharExclude ( uint32  exclude) const

◆ Initialize()

◆ instance()

AuctionBotConfig * AuctionBotConfig::instance ( )
static

Definition at line 31 of file AuctionHouseBot.cpp.

References instance().

Referenced by instance().

◆ IsBotChar()

bool AuctionBotConfig::IsBotChar ( uint32  characterID) const

Definition at line 346 of file AuctionHouseBot.cpp.

References _AHBotCharacters.

◆ operator=()

AuctionBotConfig & AuctionBotConfig::operator= ( AuctionBotConfig const &  )
privatedelete

◆ Reload()

void AuctionBotConfig::Reload ( )
inline

Definition at line 240 of file AuctionHouseBot.h.

◆ SetAHBotExcludes()

void AuctionBotConfig::SetAHBotExcludes ( const std::string &  AHBotExcludes)
inlineprivate

Definition at line 256 of file AuctionHouseBot.h.

Referenced by GetConfigFromFile().

◆ SetAHBotIncludes()

void AuctionBotConfig::SetAHBotIncludes ( const std::string &  AHBotIncludes)
inlineprivate

Definition at line 255 of file AuctionHouseBot.h.

Referenced by GetConfigFromFile().

◆ SetConfig() [1/6]

void AuctionBotConfig::SetConfig ( AuctionBotConfigBoolValues  index,
bool  value 
)
inline

◆ SetConfig() [2/6]

void AuctionBotConfig::SetConfig ( AuctionBotConfigBoolValues  index,
char const *  fieldname,
bool  defvalue 
)
private

Definition at line 138 of file AuctionHouseBot.cpp.

References sConfigMgr, and SetConfig().

◆ SetConfig() [3/6]

void AuctionBotConfig::SetConfig ( AuctionBotConfigFloatValues  index,
char const *  fieldname,
float  defvalue 
)
private

Definition at line 143 of file AuctionHouseBot.cpp.

References sConfigMgr, and SetConfig().

◆ SetConfig() [4/6]

void AuctionBotConfig::SetConfig ( AuctionBotConfigFloatValues  index,
float  value 
)
inline

Definition at line 228 of file AuctionHouseBot.h.

◆ SetConfig() [5/6]

void AuctionBotConfig::SetConfig ( AuctionBotConfigUInt32Values  index,
char const *  fieldname,
uint32  defvalue 
)
private

Definition at line 99 of file AuctionHouseBot.cpp.

References GetConfig(), sConfigMgr, SetConfig(), and TC_LOG_ERROR.

◆ SetConfig() [6/6]

void AuctionBotConfig::SetConfig ( AuctionBotConfigUInt32Values  index,
uint32  value 
)
inline

Definition at line 227 of file AuctionHouseBot.h.

◆ SetConfigMax()

void AuctionBotConfig::SetConfigMax ( AuctionBotConfigUInt32Values  index,
char const *  fieldname,
uint32  defvalue,
uint32  maxvalue 
)
private

Definition at line 110 of file AuctionHouseBot.cpp.

References GetConfig(), sConfigMgr, SetConfig(), and TC_LOG_ERROR.

Referenced by GetConfigFromFile().

◆ SetConfigMinMax()

void AuctionBotConfig::SetConfigMinMax ( AuctionBotConfigUInt32Values  index,
char const *  fieldname,
uint32  defvalue,
uint32  minvalue,
uint32  maxvalue 
)
private

Definition at line 121 of file AuctionHouseBot.cpp.

References GetConfig(), sConfigMgr, SetConfig(), and TC_LOG_ERROR.

Referenced by GetConfigFromFile().

Member Data Documentation

◆ _AHBotCharacters

std::vector<uint32> AuctionBotConfig::_AHBotCharacters
private

Definition at line 247 of file AuctionHouseBot.h.

Referenced by GetRandChar(), GetRandCharExclude(), Initialize(), and IsBotChar().

◆ _AHBotExcludes

std::string AuctionBotConfig::_AHBotExcludes
private

Definition at line 246 of file AuctionHouseBot.h.

◆ _AHBotIncludes

std::string AuctionBotConfig::_AHBotIncludes
private

Definition at line 245 of file AuctionHouseBot.h.

◆ _configBoolValues

bool AuctionBotConfig::_configBoolValues[CONFIG_UINT32_AHBOT_BOOL_COUNT]
private

Definition at line 252 of file AuctionHouseBot.h.

◆ _configFloatValues

float AuctionBotConfig::_configFloatValues[CONFIG_AHBOT_FLOAT_COUNT]
private

Definition at line 253 of file AuctionHouseBot.h.

◆ _configUint32Values

uint32 AuctionBotConfig::_configUint32Values[CONFIG_UINT32_AHBOT_UINT32_COUNT]
private

Definition at line 251 of file AuctionHouseBot.h.

◆ _itemsPerCycleBoost

uint32 AuctionBotConfig::_itemsPerCycleBoost
private

Definition at line 248 of file AuctionHouseBot.h.

Referenced by Initialize().

◆ _itemsPerCycleNormal

uint32 AuctionBotConfig::_itemsPerCycleNormal
private

Definition at line 249 of file AuctionHouseBot.h.

Referenced by Initialize().


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