TrinityCore
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Modules Pages
AuctionBotConfig Class Reference

#include <AuctionHouseBot.h>

Public Member Functions

bool Initialize ()
 
const std::string & GetAHBotIncludes () const
 
const std::string & 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
 
bool GetConfigBuyerEnabled (AuctionHouseType houseType) const
 
uint32 GetConfigItemQualityAmount (AuctionQuality quality) const
 
uint32 GetItemPerCycleBoost () const
 
uint32 GetItemPerCycleNormal () const
 
void Reload ()
 

Static Public Member Functions

static AuctionBotConfiginstance ()
 
static char constGetHouseTypeName (AuctionHouseType houseType)
 

Private Member Functions

 AuctionBotConfig ()
 
 ~AuctionBotConfig ()
 
 AuctionBotConfig (const AuctionBotConfig &)
 
AuctionBotConfigoperator= (const AuctionBotConfig &)
 
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
 
uint32 _itemsPerCycleBoost
 
uint32 _itemsPerCycleNormal
 
uint32 _configUint32Values [CONFIG_UINT32_AHBOT_UINT32_COUNT]
 
bool _configBoolValues [CONFIG_UINT32_AHBOT_BOOL_COUNT]
 
float _configFloatValues [CONFIG_AHBOT_FLOAT_COUNT]
 

Constructor & Destructor Documentation

AuctionBotConfig::AuctionBotConfig ( )
inlineprivate
uint32 _itemsPerCycleNormal
Definition: AuctionHouseBot.h:235
uint32 _itemsPerCycleBoost
Definition: AuctionHouseBot.h:234
AuctionBotConfig::~AuctionBotConfig ( )
inlineprivate
203 {}
AuctionBotConfig::AuctionBotConfig ( const AuctionBotConfig )
private

Member Function Documentation

const std::string& AuctionBotConfig::GetAHBotExcludes ( ) const
inline
212 { return _AHBotExcludes; }
std::string _AHBotExcludes
Definition: AuctionHouseBot.h:233
const std::string& AuctionBotConfig::GetAHBotIncludes ( ) const
inline
211 { return _AHBotIncludes; }
std::string _AHBotIncludes
Definition: AuctionHouseBot.h:232
uint32 AuctionBotConfig::GetConfig ( AuctionBotConfigUInt32Values  index) const
inline
214 { return _configUint32Values[index]; }
uint32 _configUint32Values[CONFIG_UINT32_AHBOT_UINT32_COUNT]
Definition: AuctionHouseBot.h:237

+ Here is the caller graph for this function:

bool AuctionBotConfig::GetConfig ( AuctionBotConfigBoolValues  index) const
inline
215 { return _configBoolValues[index]; }
bool _configBoolValues[CONFIG_UINT32_AHBOT_BOOL_COUNT]
Definition: AuctionHouseBot.h:238
float AuctionBotConfig::GetConfig ( AuctionBotConfigFloatValues  index) const
inline
216 { return _configFloatValues[index]; }
float _configFloatValues[CONFIG_AHBOT_FLOAT_COUNT]
Definition: AuctionHouseBot.h:239
bool AuctionBotConfig::GetConfigBuyerEnabled ( AuctionHouseType  houseType) const
289 {
290  switch (houseType)
291  {
294  case AUCTION_HOUSE_HORDE:
296  default:
298  }
299 }
Definition: AuctionHouseBot.h:44
uint32 GetConfig(AuctionBotConfigUInt32Values index) const
Definition: AuctionHouseBot.h:214
Definition: AuctionHouseBot.h:160
Definition: AuctionHouseBot.h:161
Definition: AuctionHouseBot.h:43
Definition: AuctionHouseBot.h:162

+ Here is the call graph for this function:

void AuctionBotConfig::GetConfigFromFile ( )
private
113 {
114  SetConfigMax(CONFIG_AHBOT_ALLIANCE_ITEM_AMOUNT_RATIO, "AuctionHouseBot.Alliance.Items.Amount.Ratio", 100, 10000);
115  SetConfigMax(CONFIG_AHBOT_HORDE_ITEM_AMOUNT_RATIO, "AuctionHouseBot.Horde.Items.Amount.Ratio", 100, 10000);
116  SetConfigMax(CONFIG_AHBOT_NEUTRAL_ITEM_AMOUNT_RATIO, "AuctionHouseBot.Neutral.Items.Amount.Ratio", 100, 10000);
117 
118  SetAHBotIncludes(sConfigMgr->GetStringDefault("AuctionHouseBot.forceIncludeItems", ""));
119  SetAHBotExcludes(sConfigMgr->GetStringDefault("AuctionHouseBot.forceExcludeItems", ""));
120 
121  SetConfig(CONFIG_AHBOT_BUYER_ALLIANCE_ENABLED, "AuctionHouseBot.Buyer.Alliance.Enabled", false);
122  SetConfig(CONFIG_AHBOT_BUYER_HORDE_ENABLED, "AuctionHouseBot.Buyer.Horde.Enabled", false);
123  SetConfig(CONFIG_AHBOT_BUYER_NEUTRAL_ENABLED, "AuctionHouseBot.Buyer.Neutral.Enabled", false);
124 
125  SetConfig(CONFIG_AHBOT_BUYER_CHANCE_FACTOR, "AuctionHouseBot.Buyer.ChanceFactor", 2.0f);
126 
127  SetConfig(CONFIG_AHBOT_ITEMS_VENDOR, "AuctionHouseBot.Items.Vendor", false);
128  SetConfig(CONFIG_AHBOT_ITEMS_LOOT, "AuctionHouseBot.Items.Loot", true);
129  SetConfig(CONFIG_AHBOT_ITEMS_MISC, "AuctionHouseBot.Items.Misc", false);
130 
131  SetConfig(CONFIG_AHBOT_BIND_NO, "AuctionHouseBot.Bind.No", true);
132  SetConfig(CONFIG_AHBOT_BIND_PICKUP, "AuctionHouseBot.Bind.Pickup", false);
133  SetConfig(CONFIG_AHBOT_BIND_EQUIP, "AuctionHouseBot.Bind.Equip", true);
134  SetConfig(CONFIG_AHBOT_BIND_USE, "AuctionHouseBot.Bind.Use", true);
135  SetConfig(CONFIG_AHBOT_BIND_QUEST, "AuctionHouseBot.Bind.Quest", false);
136  SetConfig(CONFIG_AHBOT_LOCKBOX_ENABLED, "AuctionHouseBot.LockBox.Enabled", false);
137 
138  SetConfig(CONFIG_AHBOT_BUYPRICE_SELLER, "AuctionHouseBot.BuyPrice.Seller", true);
139 
140  SetConfig(CONFIG_AHBOT_ITEMS_PER_CYCLE_BOOST, "AuctionHouseBot.ItemsPerCycle.Boost", 1000);
141  SetConfig(CONFIG_AHBOT_ITEMS_PER_CYCLE_NORMAL, "AuctionHouseBot.ItemsPerCycle.Normal", 20);
142 
143  SetConfig(CONFIG_AHBOT_ITEM_MIN_ITEM_LEVEL, "AuctionHouseBot.Items.ItemLevel.Min", 0);
144  SetConfig(CONFIG_AHBOT_ITEM_MAX_ITEM_LEVEL, "AuctionHouseBot.Items.ItemLevel.Max", 0);
145  SetConfig(CONFIG_AHBOT_ITEM_MIN_REQ_LEVEL, "AuctionHouseBot.Items.ReqLevel.Min", 0);
146  SetConfig(CONFIG_AHBOT_ITEM_MAX_REQ_LEVEL, "AuctionHouseBot.Items.ReqLevel.Max", 0);
147  SetConfig(CONFIG_AHBOT_ITEM_MIN_SKILL_RANK, "AuctionHouseBot.Items.ReqSkill.Min", 0);
148  SetConfig(CONFIG_AHBOT_ITEM_MAX_SKILL_RANK, "AuctionHouseBot.Items.ReqSkill.Max", 0);
149 
150  SetConfig(CONFIG_AHBOT_ITEM_GRAY_AMOUNT, "AuctionHouseBot.Items.Amount.Gray", 0);
151  SetConfig(CONFIG_AHBOT_ITEM_WHITE_AMOUNT, "AuctionHouseBot.Items.Amount.White", 2000);
152  SetConfig(CONFIG_AHBOT_ITEM_GREEN_AMOUNT, "AuctionHouseBot.Items.Amount.Green", 2500);
153  SetConfig(CONFIG_AHBOT_ITEM_BLUE_AMOUNT, "AuctionHouseBot.Items.Amount.Blue", 1500);
154  SetConfig(CONFIG_AHBOT_ITEM_PURPLE_AMOUNT, "AuctionHouseBot.Items.Amount.Purple", 500);
155  SetConfig(CONFIG_AHBOT_ITEM_ORANGE_AMOUNT, "AuctionHouseBot.Items.Amount.Orange", 0);
156  SetConfig(CONFIG_AHBOT_ITEM_YELLOW_AMOUNT, "AuctionHouseBot.Items.Amount.Yellow", 0);
157 
158  SetConfigMax(CONFIG_AHBOT_CLASS_CONSUMABLE_AMOUNT, "AuctionHouseBot.Class.Consumable", 6, 10);
159  SetConfigMax(CONFIG_AHBOT_CLASS_CONTAINER_AMOUNT, "AuctionHouseBot.Class.Container", 4, 10);
160  SetConfigMax(CONFIG_AHBOT_CLASS_WEAPON_AMOUNT, "AuctionHouseBot.Class.Weapon", 8, 10);
161  SetConfigMax(CONFIG_AHBOT_CLASS_GEM_AMOUNT, "AuctionHouseBot.Class.Gem", 3, 10);
162  SetConfigMax(CONFIG_AHBOT_CLASS_ARMOR_AMOUNT, "AuctionHouseBot.Class.Armor", 8, 10);
163  SetConfigMax(CONFIG_AHBOT_CLASS_REAGENT_AMOUNT, "AuctionHouseBot.Class.Reagent", 1, 10);
164  SetConfigMax(CONFIG_AHBOT_CLASS_PROJECTILE_AMOUNT, "AuctionHouseBot.Class.Projectile", 2, 10);
165  SetConfigMax(CONFIG_AHBOT_CLASS_TRADEGOOD_AMOUNT, "AuctionHouseBot.Class.TradeGood", 10, 10);
166  SetConfigMax(CONFIG_AHBOT_CLASS_GENERIC_AMOUNT, "AuctionHouseBot.Class.Generic", 1, 10);
167  SetConfigMax(CONFIG_AHBOT_CLASS_RECIPE_AMOUNT, "AuctionHouseBot.Class.Recipe", 6, 10);
168  SetConfigMax(CONFIG_AHBOT_CLASS_QUIVER_AMOUNT, "AuctionHouseBot.Class.Quiver", 1, 10);
169  SetConfigMax(CONFIG_AHBOT_CLASS_QUEST_AMOUNT, "AuctionHouseBot.Class.Quest", 1, 10);
170  SetConfigMax(CONFIG_AHBOT_CLASS_KEY_AMOUNT, "AuctionHouseBot.Class.Key", 1, 10);
171  SetConfigMax(CONFIG_AHBOT_CLASS_MISC_AMOUNT, "AuctionHouseBot.Class.Misc", 5, 10);
172  SetConfigMax(CONFIG_AHBOT_CLASS_GLYPH_AMOUNT, "AuctionHouseBot.Class.Glyph", 3, 10);
173 
174  SetConfig(CONFIG_AHBOT_ALLIANCE_PRICE_RATIO, "AuctionHouseBot.Alliance.Price.Ratio", 100);
175  SetConfig(CONFIG_AHBOT_HORDE_PRICE_RATIO, "AuctionHouseBot.Horde.Price.Ratio", 100);
176  SetConfig(CONFIG_AHBOT_NEUTRAL_PRICE_RATIO, "AuctionHouseBot.Neutral.Price.Ratio", 100);
177 
178  SetConfig(CONFIG_AHBOT_ITEM_GRAY_PRICE_RATIO, "AuctionHouseBot.Items.Gray.Price.Ratio", 100);
179  SetConfig(CONFIG_AHBOT_ITEM_WHITE_PRICE_RATIO, "AuctionHouseBot.Items.White.Price.Ratio", 100);
180  SetConfig(CONFIG_AHBOT_ITEM_GREEN_PRICE_RATIO, "AuctionHouseBot.Items.Green.Price.Ratio", 100);
181  SetConfig(CONFIG_AHBOT_ITEM_BLUE_PRICE_RATIO, "AuctionHouseBot.Items.Blue.Price.Ratio", 100);
182  SetConfig(CONFIG_AHBOT_ITEM_PURPLE_PRICE_RATIO, "AuctionHouseBot.Items.Purple.Price.Ratio", 100);
183  SetConfig(CONFIG_AHBOT_ITEM_ORANGE_PRICE_RATIO, "AuctionHouseBot.Items.Orange.Price.Ratio", 100);
184  SetConfig(CONFIG_AHBOT_ITEM_YELLOW_PRICE_RATIO, "AuctionHouseBot.Items.Yellow.Price.Ratio", 100);
185 
186  SetConfig(CONFIG_AHBOT_CLASS_CONSUMABLE_PRICE_RATIO, "AuctionHouseBot.Class.Consumable.Price.Ratio", 100);
187  SetConfig(CONFIG_AHBOT_CLASS_CONTAINER_PRICE_RATIO, "AuctionHouseBot.Class.Container.Price.Ratio", 100);
188  SetConfig(CONFIG_AHBOT_CLASS_WEAPON_PRICE_RATIO, "AuctionHouseBot.Class.Weapon.Price.Ratio", 100);
189  SetConfig(CONFIG_AHBOT_CLASS_GEM_PRICE_RATIO, "AuctionHouseBot.Class.Gem.Price.Ratio", 100);
190  SetConfig(CONFIG_AHBOT_CLASS_ARMOR_PRICE_RATIO, "AuctionHouseBot.Class.Armor.Price.Ratio", 100);
191  SetConfig(CONFIG_AHBOT_CLASS_REAGENT_PRICE_RATIO, "AuctionHouseBot.Class.Reagent.Price.Ratio", 100);
192  SetConfig(CONFIG_AHBOT_CLASS_PROJECTILE_PRICE_RATIO, "AuctionHouseBot.Class.Projectile.Price.Ratio", 100);
193  SetConfig(CONFIG_AHBOT_CLASS_TRADEGOOD_PRICE_RATIO, "AuctionHouseBot.Class.TradeGood.Price.Ratio", 100);
194  SetConfig(CONFIG_AHBOT_CLASS_GENERIC_PRICE_RATIO, "AuctionHouseBot.Class.Generic.Price.Ratio", 100);
195  SetConfig(CONFIG_AHBOT_CLASS_RECIPE_PRICE_RATIO, "AuctionHouseBot.Class.Recipe.Price.Ratio", 100);
196  SetConfig(CONFIG_AHBOT_CLASS_QUIVER_PRICE_RATIO, "AuctionHouseBot.Class.Quiver.Price.Ratio", 100);
197  SetConfig(CONFIG_AHBOT_CLASS_QUEST_PRICE_RATIO, "AuctionHouseBot.Class.Quest.Price.Ratio", 100);
198  SetConfig(CONFIG_AHBOT_CLASS_KEY_PRICE_RATIO, "AuctionHouseBot.Class.Key.Price.Ratio", 100);
199  SetConfig(CONFIG_AHBOT_CLASS_MISC_PRICE_RATIO, "AuctionHouseBot.Class.Misc.Price.Ratio", 100);
200  SetConfig(CONFIG_AHBOT_CLASS_GLYPH_PRICE_RATIO, "AuctionHouseBot.Class.Glyph.Price.Ratio", 100);
201 
202  SetConfig(CONFIG_AHBOT_CLASS_CONSUMABLE_ALLOW_ZERO, "AuctionHouseBot.Class.Consumable.Allow.Zero", false);
203  SetConfig(CONFIG_AHBOT_CLASS_CONTAINER_ALLOW_ZERO, "AuctionHouseBot.Class.Container.Allow.Zero", false);
204  SetConfig(CONFIG_AHBOT_CLASS_WEAPON_ALLOW_ZERO, "AuctionHouseBot.Class.Weapon.Allow.Zero", false);
205  SetConfig(CONFIG_AHBOT_CLASS_GEM_ALLOW_ZERO, "AuctionHouseBot.Class.Gem.Allow.Zero", false);
206  SetConfig(CONFIG_AHBOT_CLASS_ARMOR_ALLOW_ZERO, "AuctionHouseBot.Class.Armor.Allow.Zero", false);
207  SetConfig(CONFIG_AHBOT_CLASS_REAGENT_ALLOW_ZERO, "AuctionHouseBot.Class.Reagent.Allow.Zero", false);
208  SetConfig(CONFIG_AHBOT_CLASS_PROJECTILE_ALLOW_ZERO, "AuctionHouseBot.Class.Projectile.Allow.Zero", false);
209  SetConfig(CONFIG_AHBOT_CLASS_TRADEGOOD_ALLOW_ZERO, "AuctionHouseBot.Class.TradeGood.Allow.Zero", false);
210  SetConfig(CONFIG_AHBOT_CLASS_RECIPE_ALLOW_ZERO, "AuctionHouseBot.Class.Recipe.Allow.Zero", false);
211  SetConfig(CONFIG_AHBOT_CLASS_QUIVER_ALLOW_ZERO, "AuctionHouseBot.Class.Quiver.Allow.Zero", false);
212  SetConfig(CONFIG_AHBOT_CLASS_QUEST_ALLOW_ZERO, "AuctionHouseBot.Class.Quest.Allow.Zero", false);
213  SetConfig(CONFIG_AHBOT_CLASS_KEY_ALLOW_ZERO, "AuctionHouseBot.Class.Key.Allow.Zero", false);
214  SetConfig(CONFIG_AHBOT_CLASS_MISC_ALLOW_ZERO, "AuctionHouseBot.Class.Misc.Allow.Zero", false);
215  SetConfig(CONFIG_AHBOT_CLASS_GLYPH_ALLOW_ZERO, "AuctionHouseBot.Class.Glyph.Allow.Zero", false);
216 
217  SetConfig(CONFIG_AHBOT_MINTIME, "AuctionHouseBot.MinTime", 1);
218  SetConfig(CONFIG_AHBOT_MAXTIME, "AuctionHouseBot.MaxTime", 72);
219 
220  SetConfigMinMax(CONFIG_AHBOT_BUYER_RECHECK_INTERVAL, "AuctionHouseBot.Buyer.Recheck.Interval", 20, 1, DAY / MINUTE);
221  SetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_GRAY, "AuctionHouseBot.Buyer.Baseprice.Gray", 3504);
222  SetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_WHITE, "AuctionHouseBot.Buyer.Baseprice.White", 5429);
223  SetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_GREEN, "AuctionHouseBot.Buyer.Baseprice.Green", 21752);
224  SetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_BLUE, "AuctionHouseBot.Buyer.Baseprice.Blue", 36463);
225  SetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_PURPLE, "AuctionHouseBot.Buyer.Baseprice.Purple", 87124);
226  SetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_ORANGE, "AuctionHouseBot.Buyer.Baseprice.Orange", 214347);
227  SetConfig(CONFIG_AHBOT_BUYER_BASEPRICE_YELLOW, "AuctionHouseBot.Buyer.Baseprice.Yellow", 407406);
228  SetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_GRAY, "AuctionHouseBot.Buyer.ChanceMultiplier.Gray", 100);
229  SetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_WHITE, "AuctionHouseBot.Buyer.ChanceMultiplier.White", 100);
230  SetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_GREEN, "AuctionHouseBot.Buyer.ChanceMultiplier.Green", 100);
231  SetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_BLUE, "AuctionHouseBot.Buyer.ChanceMultiplier.Blue", 100);
232  SetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_PURPLE, "AuctionHouseBot.Buyer.ChanceMultiplier.Purple", 100);
233  SetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_ORANGE, "AuctionHouseBot.Buyer.ChanceMultiplier.Orange", 100);
234  SetConfig(CONFIG_AHBOT_BUYER_CHANCEMULTIPLIER_YELLOW, "AuctionHouseBot.Buyer.ChanceMultiplier.Yellow", 100);
235 
236  SetConfig(CONFIG_AHBOT_SELLER_ENABLED, "AuctionHouseBot.Seller.Enabled", false);
237  SetConfig(CONFIG_AHBOT_BUYER_ENABLED, "AuctionHouseBot.Buyer.Enabled", false);
238 
239  SetConfig(CONFIG_AHBOT_CLASS_MISC_MOUNT_MIN_REQ_LEVEL, "AuctionHouseBot.Class.Misc.Mount.ReqLevel.Min", 0);
240  SetConfig(CONFIG_AHBOT_CLASS_MISC_MOUNT_MAX_REQ_LEVEL, "AuctionHouseBot.Class.Misc.Mount.ReqLevel.Max", 0);
241  SetConfig(CONFIG_AHBOT_CLASS_MISC_MOUNT_MIN_SKILL_RANK, "AuctionHouseBot.Class.Misc.Mount.ReqSkill.Min", 0);
242  SetConfig(CONFIG_AHBOT_CLASS_MISC_MOUNT_MAX_SKILL_RANK, "AuctionHouseBot.Class.Misc.Mount.ReqSkill.Max", 0);
243  SetConfig(CONFIG_AHBOT_CLASS_GLYPH_MIN_REQ_LEVEL, "AuctionHouseBot.Class.Glyph.ReqLevel.Min", 0);
244  SetConfig(CONFIG_AHBOT_CLASS_GLYPH_MAX_REQ_LEVEL, "AuctionHouseBot.Class.Glyph.ReqLevel.Max", 0);
245  SetConfig(CONFIG_AHBOT_CLASS_GLYPH_MIN_ITEM_LEVEL, "AuctionHouseBot.Class.Glyph.ItemLevel.Min", 0);
246  SetConfig(CONFIG_AHBOT_CLASS_GLYPH_MAX_ITEM_LEVEL, "AuctionHouseBot.Class.Glyph.ItemLevel.Max", 0);
247  SetConfig(CONFIG_AHBOT_CLASS_TRADEGOOD_MIN_ITEM_LEVEL, "AuctionHouseBot.Class.TradeGood.ItemLevel.Min", 0);
248  SetConfig(CONFIG_AHBOT_CLASS_TRADEGOOD_MAX_ITEM_LEVEL, "AuctionHouseBot.Class.TradeGood.ItemLevel.Max", 0);
249  SetConfig(CONFIG_AHBOT_CLASS_CONTAINER_MIN_ITEM_LEVEL, "AuctionHouseBot.Class.Container.ItemLevel.Min", 0);
250  SetConfig(CONFIG_AHBOT_CLASS_CONTAINER_MAX_ITEM_LEVEL, "AuctionHouseBot.Class.Container.ItemLevel.Max", 0);
251 
252  SetConfig(CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_CONSUMABLE, "AuctionHouseBot.Class.RandomStackRatio.Consumable", 20);
253  SetConfig(CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_CONTAINER, "AuctionHouseBot.Class.RandomStackRatio.Container", 0);
254  SetConfig(CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_WEAPON, "AuctionHouseBot.Class.RandomStackRatio.Weapon", 0);
255  SetConfig(CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_GEM, "AuctionHouseBot.Class.RandomStackRatio.Gem", 20);
256  SetConfig(CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_ARMOR, "AuctionHouseBot.Class.RandomStackRatio.Armor", 0);
257  SetConfig(CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_REAGENT, "AuctionHouseBot.Class.RandomStackRatio.Reagent", 100);
258  SetConfig(CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_PROJECTILE, "AuctionHouseBot.Class.RandomStackRatio.Projectile", 100);
259  SetConfig(CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_TRADEGOOD, "AuctionHouseBot.Class.RandomStackRatio.TradeGood", 50);
260  SetConfig(CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_GENERIC, "AuctionHouseBot.Class.RandomStackRatio.Generic", 100);
261  SetConfig(CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_RECIPE, "AuctionHouseBot.Class.RandomStackRatio.Recipe", 0);
262  SetConfig(CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_QUIVER, "AuctionHouseBot.Class.RandomStackRatio.Quiver", 0);
263  SetConfig(CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_QUEST, "AuctionHouseBot.Class.RandomStackRatio.Quest", 100);
264  SetConfig(CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_KEY, "AuctionHouseBot.Class.RandomStackRatio.Key", 100);
265  SetConfig(CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_MISC, "AuctionHouseBot.Class.RandomStackRatio.Misc", 100);
266  SetConfig(CONFIG_AHBOT_CLASS_RANDOMSTACKRATIO_GLYPH, "AuctionHouseBot.Class.RandomStackRatio.Glyph", 0);
267 }
Definition: AuctionHouseBot.h:143
void SetConfig(AuctionBotConfigBoolValues index, bool value)
Definition: AuctionHouseBot.h:217
Definition: AuctionHouseBot.h:129
Definition: AuctionHouseBot.h:107
Definition: AuctionHouseBot.h:125
Definition: AuctionHouseBot.h:74
Definition: AuctionHouseBot.h:95
Definition: AuctionHouseBot.h:151
Definition: AuctionHouseBot.h:80
Definition: AuctionHouseBot.h:52
Definition: AuctionHouseBot.h:75
Definition: AuctionHouseBot.h:78
Definition: AuctionHouseBot.h:144
Definition: AuctionHouseBot.h:89
Definition: AuctionHouseBot.h:103
Definition: AuctionHouseBot.h:90
Definition: AuctionHouseBot.h:184
Definition: AuctionHouseBot.h:172
Definition: AuctionHouseBot.h:101
Definition: AuctionHouseBot.h:113
Definition: AuctionHouseBot.h:121
Definition: AuctionHouseBot.h:67
Definition: AuctionHouseBot.h:139
Definition: AuctionHouseBot.h:97
Definition: AuctionHouseBot.h:86
Definition: AuctionHouseBot.h:98
Definition: AuctionHouseBot.h:149
#define sConfigMgr
Definition: Config.h:61
Definition: AuctionHouseBot.h:140
Definition: AuctionHouseBot.h:59
Definition: AuctionHouseBot.h:99
Definition: AuctionHouseBot.h:171
Definition: AuctionHouseBot.h:117
Definition: AuctionHouseBot.h:76
Definition: AuctionHouseBot.h:55
Definition: AuctionHouseBot.h:176
Definition: AuctionHouseBot.h:72
Definition: AuctionHouseBot.h:177
Definition: AuctionHouseBot.h:168
void SetAHBotExcludes(const std::string &AHBotExcludes)
Definition: AuctionHouseBot.h:242
Definition: AuctionHouseBot.h:131
Definition: AuctionHouseBot.h:83
Definition: AuctionHouseBot.h:88
Definition: AuctionHouseBot.h:183
Definition: Common.h:97
Definition: AuctionHouseBot.h:145
Definition: AuctionHouseBot.h:69
Definition: AuctionHouseBot.h:77
Definition: AuctionHouseBot.h:71
void SetConfigMinMax(AuctionBotConfigUInt32Values index, char const *fieldname, uint32 defvalue, uint32 minvalue, uint32 maxvalue)
Definition: AuctionHouseBot.cpp:84
Definition: AuctionHouseBot.h:133
Definition: AuctionHouseBot.h:118
Definition: AuctionHouseBot.h:130
Definition: AuctionHouseBot.h:169
Definition: AuctionHouseBot.h:136
Definition: AuctionHouseBot.h:102
Definition: AuctionHouseBot.h:138
Definition: AuctionHouseBot.h:54
Definition: AuctionHouseBot.h:82
Definition: AuctionHouseBot.h:73
Definition: AuctionHouseBot.h:186
Definition: AuctionHouseBot.h:187
Definition: AuctionHouseBot.h:123
Definition: AuctionHouseBot.h:146
Definition: AuctionHouseBot.h:179
Definition: AuctionHouseBot.h:128
Definition: AuctionHouseBot.h:152
Definition: AuctionHouseBot.h:63
Definition: AuctionHouseBot.h:79
Definition: AuctionHouseBot.h:170
Definition: Common.h:99
Definition: AuctionHouseBot.h:112
Definition: AuctionHouseBot.h:120
Definition: AuctionHouseBot.h:154
Definition: AuctionHouseBot.h:96
Definition: AuctionHouseBot.h:194
Definition: AuctionHouseBot.h:153
Definition: AuctionHouseBot.h:185
Definition: AuctionHouseBot.h:56
Definition: AuctionHouseBot.h:51
Definition: AuctionHouseBot.h:64
Definition: AuctionHouseBot.h:68
Definition: AuctionHouseBot.h:94
Definition: AuctionHouseBot.h:61
Definition: AuctionHouseBot.h:91
Definition: AuctionHouseBot.h:163
Definition: AuctionHouseBot.h:66
Definition: AuctionHouseBot.h:167
Definition: AuctionHouseBot.h:165
Definition: AuctionHouseBot.h:135
Definition: AuctionHouseBot.h:188
Definition: AuctionHouseBot.h:62
Definition: AuctionHouseBot.h:104
Definition: AuctionHouseBot.h:105
Definition: AuctionHouseBot.h:114
Definition: AuctionHouseBot.h:147
Definition: AuctionHouseBot.h:178
void SetConfigMax(AuctionBotConfigUInt32Values index, char const *fieldname, uint32 defvalue, uint32 maxvalue)
Definition: AuctionHouseBot.cpp:73
Definition: AuctionHouseBot.h:93
Definition: AuctionHouseBot.h:175
Definition: AuctionHouseBot.h:148
Definition: AuctionHouseBot.h:174
Definition: AuctionHouseBot.h:115
Definition: AuctionHouseBot.h:160
Definition: AuctionHouseBot.h:126
Definition: AuctionHouseBot.h:122
Definition: AuctionHouseBot.h:150
Definition: AuctionHouseBot.h:173
Definition: AuctionHouseBot.h:87
Definition: AuctionHouseBot.h:84
Definition: AuctionHouseBot.h:58
Definition: AuctionHouseBot.h:70
Definition: AuctionHouseBot.h:109
Definition: AuctionHouseBot.h:111
Definition: AuctionHouseBot.h:127
Definition: AuctionHouseBot.h:119
Definition: AuctionHouseBot.h:100
Definition: AuctionHouseBot.h:81
Definition: AuctionHouseBot.h:137
Definition: AuctionHouseBot.h:182
Definition: AuctionHouseBot.h:53
Definition: AuctionHouseBot.h:166
Definition: AuctionHouseBot.h:141
Definition: AuctionHouseBot.h:92
Definition: AuctionHouseBot.h:65
Definition: AuctionHouseBot.h:181
void SetAHBotIncludes(const std::string &AHBotIncludes)
Definition: AuctionHouseBot.h:241
Definition: AuctionHouseBot.h:164
Definition: AuctionHouseBot.h:124
Definition: AuctionHouseBot.h:134
Definition: AuctionHouseBot.h:161
Definition: AuctionHouseBot.h:180
Definition: AuctionHouseBot.h:57
Definition: AuctionHouseBot.h:162
Definition: AuctionHouseBot.h:142
Definition: AuctionHouseBot.h:85
Definition: AuctionHouseBot.h:116
Definition: AuctionHouseBot.h:108
Definition: AuctionHouseBot.h:132
Definition: AuctionHouseBot.h:60

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

uint32 AuctionBotConfig::GetConfigItemAmountRatio ( AuctionHouseType  houseType) const
276 {
277  switch (houseType)
278  {
281  case AUCTION_HOUSE_HORDE:
283  default:
285  }
286 }
Definition: AuctionHouseBot.h:55
Definition: AuctionHouseBot.h:44
Definition: AuctionHouseBot.h:56
uint32 GetConfig(AuctionBotConfigUInt32Values index) const
Definition: AuctionHouseBot.h:214
Definition: AuctionHouseBot.h:43
Definition: AuctionHouseBot.h:57

+ Here is the call graph for this function:

uint32 AuctionBotConfig::GetConfigItemQualityAmount ( AuctionQuality  quality) const
302 {
303  switch (quality)
304  {
317  default:
319  }
320 }
Definition: AuctionHouseBot.h:34
Definition: AuctionHouseBot.h:32
Definition: AuctionHouseBot.h:67
Definition: AuctionHouseBot.h:33
Definition: AuctionHouseBot.h:69
Definition: AuctionHouseBot.h:29
Definition: AuctionHouseBot.h:64
Definition: AuctionHouseBot.h:68
Definition: AuctionHouseBot.h:30
Definition: AuctionHouseBot.h:66
uint32 GetConfig(AuctionBotConfigUInt32Values index) const
Definition: AuctionHouseBot.h:214
Definition: AuctionHouseBot.h:31
Definition: AuctionHouseBot.h:70
Definition: AuctionHouseBot.h:65

+ Here is the call graph for this function:

char const * AuctionBotConfig::GetHouseTypeName ( AuctionHouseType  houseType)
static
270 {
271  static char const* names[MAX_AUCTION_HOUSE_TYPE] = { "Neutral", "Alliance", "Horde" };
272  return names[houseType];
273 }
#define MAX_AUCTION_HOUSE_TYPE
Definition: AuctionHouseBot.h:47

+ Here is the caller graph for this function:

uint32 AuctionBotConfig::GetItemPerCycleBoost ( ) const
inline
225 { return _itemsPerCycleBoost; }
uint32 _itemsPerCycleBoost
Definition: AuctionHouseBot.h:234
uint32 AuctionBotConfig::GetItemPerCycleNormal ( ) const
inline
226 { return _itemsPerCycleNormal; }
uint32 _itemsPerCycleNormal
Definition: AuctionHouseBot.h:235
bool AuctionBotConfig::Initialize ( )
34 {
36 
38  {
39  TC_LOG_INFO("ahbot", "AHBOT is Disabled.");
40  return false;
41  }
42 
45  {
46  TC_LOG_INFO("ahbot", "All feature of AuctionHouseBot are disabled!");
47  return false;
48  }
49 
51  TC_LOG_INFO("ahbot", "AuctionHouseBot SELLER is disabled!");
52 
54  TC_LOG_INFO("ahbot", "AuctionHouseBot BUYER is disabled!");
55 
58 
59  return true;
60 }
Definition: AuctionHouseBot.h:172
uint32 _itemsPerCycleNormal
Definition: AuctionHouseBot.h:235
Definition: AuctionHouseBot.h:55
Definition: AuctionHouseBot.h:54
Definition: AuctionHouseBot.h:56
uint32 GetConfig(AuctionBotConfigUInt32Values index) const
Definition: AuctionHouseBot.h:214
uint32 _itemsPerCycleBoost
Definition: AuctionHouseBot.h:234
Definition: AuctionHouseBot.h:160
Definition: AuctionHouseBot.h:173
#define TC_LOG_INFO(filterType__,...)
Definition: Log.h:201
void GetConfigFromFile()
Definition: AuctionHouseBot.cpp:112
Definition: AuctionHouseBot.h:53
Definition: AuctionHouseBot.h:161
Definition: AuctionHouseBot.h:57
Definition: AuctionHouseBot.h:162

+ Here is the call graph for this function:

AuctionBotConfig * AuctionBotConfig::instance ( )
static
28 {
30  return &instance;
31 }
Definition: AuctionHouseBot.h:199
static AuctionBotConfig * instance()
Definition: AuctionHouseBot.cpp:27
AuctionBotConfig& AuctionBotConfig::operator= ( const AuctionBotConfig )
private
void AuctionBotConfig::Reload ( )
inline
227 { GetConfigFromFile(); }
void GetConfigFromFile()
Definition: AuctionHouseBot.cpp:112
void AuctionBotConfig::SetAHBotExcludes ( const std::string &  AHBotExcludes)
inlineprivate
242 { _AHBotExcludes = AHBotExcludes; }
std::string _AHBotExcludes
Definition: AuctionHouseBot.h:233

+ Here is the caller graph for this function:

void AuctionBotConfig::SetAHBotIncludes ( const std::string &  AHBotIncludes)
inlineprivate
241 { _AHBotIncludes = AHBotIncludes; }
std::string _AHBotIncludes
Definition: AuctionHouseBot.h:232

+ Here is the caller graph for this function:

void AuctionBotConfig::SetConfig ( AuctionBotConfigBoolValues  index,
bool  value 
)
inline
217 { _configBoolValues[index] = value; }
bool _configBoolValues[CONFIG_UINT32_AHBOT_BOOL_COUNT]
Definition: AuctionHouseBot.h:238
const FieldDescriptor value
Definition: descriptor.h:1522

+ Here is the caller graph for this function:

void AuctionBotConfig::SetConfig ( AuctionBotConfigUInt32Values  index,
uint32  value 
)
inline
218 { _configUint32Values[index] = value; }
uint32 _configUint32Values[CONFIG_UINT32_AHBOT_UINT32_COUNT]
Definition: AuctionHouseBot.h:237
const FieldDescriptor value
Definition: descriptor.h:1522
void AuctionBotConfig::SetConfig ( AuctionBotConfigFloatValues  index,
float  value 
)
inline
219 { _configFloatValues[index] = value; }
float _configFloatValues[CONFIG_AHBOT_FLOAT_COUNT]
Definition: AuctionHouseBot.h:239
const FieldDescriptor value
Definition: descriptor.h:1522
void AuctionBotConfig::SetConfig ( AuctionBotConfigUInt32Values  index,
char const fieldname,
uint32  defvalue 
)
private
63 {
64  SetConfig(index, sConfigMgr->GetIntDefault(fieldname, defvalue));
65 
66  if (int32(GetConfig(index)) < 0)
67  {
68  TC_LOG_ERROR("ahbot", "AHBot: %s (%i) can't be negative. Using %u instead.", fieldname, int32(GetConfig(index)), defvalue);
69  SetConfig(index, defvalue);
70  }
71 }
void SetConfig(AuctionBotConfigBoolValues index, bool value)
Definition: AuctionHouseBot.h:217
#define sConfigMgr
Definition: Config.h:61
uint32 GetConfig(AuctionBotConfigUInt32Values index) const
Definition: AuctionHouseBot.h:214
int32_t int32
Definition: g3dmath.h:167
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207

+ Here is the call graph for this function:

void AuctionBotConfig::SetConfig ( AuctionBotConfigBoolValues  index,
char const fieldname,
bool  defvalue 
)
private
102 {
103  SetConfig(index, sConfigMgr->GetBoolDefault(fieldname, defvalue));
104 }
void SetConfig(AuctionBotConfigBoolValues index, bool value)
Definition: AuctionHouseBot.h:217
#define sConfigMgr
Definition: Config.h:61

+ Here is the call graph for this function:

void AuctionBotConfig::SetConfig ( AuctionBotConfigFloatValues  index,
char const fieldname,
float  defvalue 
)
private
107 {
108  SetConfig(index, sConfigMgr->GetFloatDefault(fieldname, defvalue));
109 }
void SetConfig(AuctionBotConfigBoolValues index, bool value)
Definition: AuctionHouseBot.h:217
#define sConfigMgr
Definition: Config.h:61

+ Here is the call graph for this function:

void AuctionBotConfig::SetConfigMax ( AuctionBotConfigUInt32Values  index,
char const fieldname,
uint32  defvalue,
uint32  maxvalue 
)
private
74 {
75  SetConfig(index, sConfigMgr->GetIntDefault(fieldname, defvalue));
76 
77  if (GetConfig(index) > maxvalue)
78  {
79  TC_LOG_ERROR("ahbot", "AHBot: %s (%u) must be in range 0...%u. Using %u instead.", fieldname, GetConfig(index), maxvalue, maxvalue);
80  SetConfig(index, maxvalue);
81  }
82 }
void SetConfig(AuctionBotConfigBoolValues index, bool value)
Definition: AuctionHouseBot.h:217
#define sConfigMgr
Definition: Config.h:61
uint32 GetConfig(AuctionBotConfigUInt32Values index) const
Definition: AuctionHouseBot.h:214
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

void AuctionBotConfig::SetConfigMinMax ( AuctionBotConfigUInt32Values  index,
char const fieldname,
uint32  defvalue,
uint32  minvalue,
uint32  maxvalue 
)
private
85 {
86  SetConfig(index, sConfigMgr->GetIntDefault(fieldname, defvalue));
87 
88  if (GetConfig(index) > maxvalue)
89  {
90  TC_LOG_ERROR("ahbot", "AHBot: %s (%u) must be in range %u...%u. Using %u instead.", fieldname, GetConfig(index), minvalue, maxvalue, maxvalue);
91  SetConfig(index, maxvalue);
92  }
93 
94  if (GetConfig(index) < minvalue)
95  {
96  TC_LOG_ERROR("ahbot", "AHBot: %s (%u) must be in range %u...%u. Using %u instead.", fieldname, GetConfig(index), minvalue, maxvalue, minvalue);
97  SetConfig(index, minvalue);
98  }
99 }
void SetConfig(AuctionBotConfigBoolValues index, bool value)
Definition: AuctionHouseBot.h:217
#define sConfigMgr
Definition: Config.h:61
uint32 GetConfig(AuctionBotConfigUInt32Values index) const
Definition: AuctionHouseBot.h:214
#define TC_LOG_ERROR(filterType__,...)
Definition: Log.h:207

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

Member Data Documentation

std::string AuctionBotConfig::_AHBotExcludes
private
std::string AuctionBotConfig::_AHBotIncludes
private
bool AuctionBotConfig::_configBoolValues[CONFIG_UINT32_AHBOT_BOOL_COUNT]
private
float AuctionBotConfig::_configFloatValues[CONFIG_AHBOT_FLOAT_COUNT]
private
uint32 AuctionBotConfig::_configUint32Values[CONFIG_UINT32_AHBOT_UINT32_COUNT]
private
uint32 AuctionBotConfig::_itemsPerCycleBoost
private
uint32 AuctionBotConfig::_itemsPerCycleNormal
private

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