mirror of
https://github.com/mangosfour/server.git
synced 2025-12-13 13:37:05 +00:00
[11723] Auction House Bot (AHBot) patch applied
Thanks to Chris K, cyberium, Dolomit6, grether, Kerbe, Naicisum, Paradox, Xeross
and other contributers for creating, long time improvments and patch up-to-date state support.
AHBot disabled by default. For enable it you need have ahbot.conf
in same dir where mangosd.conf placed and enable options:
AuctionHouseBot.Seller.Enabled and/or AuctionHouseBot.Buyer.Enabled
Original version ahbot.conf can be found by path:
src/game/AuctionHouseBot/ahbot.conf.dist.in
Note: chat commands from patch not included in commits and will added later after
additional work.
Signed-off-by: VladimirMangos <vladimir@getmangos.com>
This commit is contained in:
parent
124dc96643
commit
04581f36ce
16 changed files with 2287 additions and 17 deletions
16
doc/AuctionHouseBot.txt
Normal file
16
doc/AuctionHouseBot.txt
Normal file
|
|
@ -0,0 +1,16 @@
|
|||
Auction Houses Bot populates the auction houses with items.
|
||||
It makes the game feel a bit more active in auction usage part
|
||||
specially for low-populated servers. Items and prices are chosen
|
||||
randomly based on the parameters you define. If an auction expires, auctions
|
||||
are deleted quietly. AHBot will not buy it's own items, and will not receive
|
||||
mail from the AH or get returned mail.
|
||||
|
||||
===============================================================================
|
||||
~~HOW TO CONFIGURE~~
|
||||
===============================================================================
|
||||
|
||||
You must copy config file template as ahbot.conf from src/game/AuctionHouseBot/ahbot.conf.dist.in
|
||||
to directory wher use store mangosd.conf file, and modify values to appropriate for you state.
|
||||
Read ahbot.conf option descriptions for details.
|
||||
|
||||
Note: But default AHBot disabled by provided config options values
|
||||
1726
src/game/AuctionHouseBot/AuctionHouseBot.cpp
Normal file
1726
src/game/AuctionHouseBot/AuctionHouseBot.cpp
Normal file
File diff suppressed because it is too large
Load diff
201
src/game/AuctionHouseBot/AuctionHouseBot.h
Normal file
201
src/game/AuctionHouseBot/AuctionHouseBot.h
Normal file
|
|
@ -0,0 +1,201 @@
|
|||
#ifndef AUCTION_HOUSE_BOT_H
|
||||
#define AUCTION_HOUSE_BOT_H
|
||||
|
||||
#include "../World.h"
|
||||
#include "Config/Config.h"
|
||||
#include "../AuctionHouseMgr.h"
|
||||
#include "../SharedDefines.h"
|
||||
#include "../Item.h"
|
||||
|
||||
// shadow of ItemQualities with skipped ITEM_QUALITY_HEIRLOOM, anything after ITEM_QUALITY_ARTIFACT(6) in fact
|
||||
enum AuctionQuality
|
||||
{
|
||||
AUCTION_QUALITY_GREY = ITEM_QUALITY_POOR,
|
||||
AUCTION_QUALITY_WHITE = ITEM_QUALITY_NORMAL,
|
||||
AUCTION_QUALITY_GREEN = ITEM_QUALITY_UNCOMMON,
|
||||
AUCTION_QUALITY_BLUE = ITEM_QUALITY_RARE,
|
||||
AUCTION_QUALITY_PURPLE = ITEM_QUALITY_EPIC,
|
||||
AUCTION_QUALITY_ORANGE = ITEM_QUALITY_LEGENDARY,
|
||||
AUCTION_QUALITY_YELLOW = ITEM_QUALITY_ARTIFACT,
|
||||
};
|
||||
|
||||
#define MAX_AUCTION_QUALITY 7
|
||||
|
||||
enum AuctionBotConfigUInt32Values
|
||||
{
|
||||
CONFIG_UINT32_AHBOT_MAXTIME,
|
||||
CONFIG_UINT32_AHBOT_MINTIME,
|
||||
CONFIG_UINT32_AHBOT_ITEMS_PER_CYCLE_BOOST,
|
||||
CONFIG_UINT32_AHBOT_ITEMS_PER_CYCLE_NORMAL,
|
||||
CONFIG_UINT32_AHBOT_ALLIANCE_ITEM_AMOUNT_RATIO,
|
||||
CONFIG_UINT32_AHBOT_HORDE_ITEM_AMOUNT_RATIO,
|
||||
CONFIG_UINT32_AHBOT_NEUTRAL_ITEM_AMOUNT_RATIO,
|
||||
CONFIG_UINT32_AHBOT_ITEM_MIN_ITEM_LEVEL,
|
||||
CONFIG_UINT32_AHBOT_ITEM_MAX_ITEM_LEVEL,
|
||||
CONFIG_UINT32_AHBOT_ITEM_MIN_REQ_LEVEL,
|
||||
CONFIG_UINT32_AHBOT_ITEM_MAX_REQ_LEVEL,
|
||||
CONFIG_UINT32_AHBOT_ITEM_MIN_SKILL_RANK,
|
||||
CONFIG_UINT32_AHBOT_ITEM_MAX_SKILL_RANK,
|
||||
CONFIG_UINT32_AHBOT_ITEM_GREY_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_ITEM_WHITE_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_ITEM_GREEN_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_ITEM_BLUE_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_ITEM_PURPLE_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_ITEM_ORANGE_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_ITEM_YELLOW_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_CLASS_CONSUMABLE_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_CLASS_CONTAINER_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_CLASS_WEAPON_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_CLASS_GEM_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_CLASS_ARMOR_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_CLASS_REAGENT_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_CLASS_PROJECTILE_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_CLASS_TRADEGOOD_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_CLASS_GENERIC_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_CLASS_RECIPE_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_CLASS_QUIVER_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_CLASS_QUEST_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_CLASS_KEY_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_CLASS_MISC_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_CLASS_GLYPH_AMOUNT,
|
||||
CONFIG_UINT32_AHBOT_ALLIANCE_PRICE_RATIO,
|
||||
CONFIG_UINT32_AHBOT_HORDE_PRICE_RATIO,
|
||||
CONFIG_UINT32_AHBOT_NEUTRAL_PRICE_RATIO,
|
||||
CONFIG_UINT32_AHBOT_BUYER_CHANCE_RATIO_ALLIANCE,
|
||||
CONFIG_UINT32_AHBOT_BUYER_CHANCE_RATIO_HORDE,
|
||||
CONFIG_UINT32_AHBOT_BUYER_CHANCE_RATIO_NEUTRAL,
|
||||
CONFIG_UINT32_AHBOT_BUYER_RECHECK_INTERVAL,
|
||||
CONFIG_UINT32_AHBOT_CLASS_MISC_MOUNT_MIN_REQ_LEVEL,
|
||||
CONFIG_UINT32_AHBOT_CLASS_MISC_MOUNT_MAX_REQ_LEVEL,
|
||||
CONFIG_UINT32_AHBOT_CLASS_MISC_MOUNT_MIN_SKILL_RANK,
|
||||
CONFIG_UINT32_AHBOT_CLASS_MISC_MOUNT_MAX_SKILL_RANK,
|
||||
CONFIG_UINT32_AHBOT_CLASS_GLYPH_MIN_REQ_LEVEL,
|
||||
CONFIG_UINT32_AHBOT_CLASS_GLYPH_MAX_REQ_LEVEL,
|
||||
CONFIG_UINT32_AHBOT_CLASS_GLYPH_MIN_ITEM_LEVEL,
|
||||
CONFIG_UINT32_AHBOT_CLASS_GLYPH_MAX_ITEM_LEVEL,
|
||||
CONFIG_UINT32_AHBOT_CLASS_TRADEGOOD_MIN_ITEM_LEVEL,
|
||||
CONFIG_UINT32_AHBOT_CLASS_TRADEGOOD_MAX_ITEM_LEVEL,
|
||||
CONFIG_UINT32_AHBOT_CLASS_CONTAINER_MIN_ITEM_LEVEL,
|
||||
CONFIG_UINT32_AHBOT_CLASS_CONTAINER_MAX_ITEM_LEVEL,
|
||||
CONFIG_UINT32_AHBOT_UINT32_COUNT
|
||||
};
|
||||
|
||||
enum AuctionBotConfigBoolValues
|
||||
{
|
||||
CONFIG_BOOL_AHBOT_BUYER_ALLIANCE_ENABLED,
|
||||
CONFIG_BOOL_AHBOT_BUYER_HORDE_ENABLED,
|
||||
CONFIG_BOOL_AHBOT_BUYER_NEUTRAL_ENABLED,
|
||||
CONFIG_BOOL_AHBOT_ITEMS_VENDOR,
|
||||
CONFIG_BOOL_AHBOT_ITEMS_LOOT,
|
||||
CONFIG_BOOL_AHBOT_ITEMS_MISC,
|
||||
CONFIG_BOOL_AHBOT_BIND_NO,
|
||||
CONFIG_BOOL_AHBOT_BIND_PICKUP,
|
||||
CONFIG_BOOL_AHBOT_BIND_EQUIP,
|
||||
CONFIG_BOOL_AHBOT_BIND_USE,
|
||||
CONFIG_BOOL_AHBOT_BIND_QUEST,
|
||||
CONFIG_BOOL_AHBOT_BUYPRICE_SELLER,
|
||||
CONFIG_BOOL_AHBOT_BUYPRICE_BUYER,
|
||||
CONFIG_BOOL_AHBOT_DEBUG_SELLER,
|
||||
CONFIG_BOOL_AHBOT_DEBUG_BUYER,
|
||||
CONFIG_BOOL_AHBOT_SELLER_ENABLED,
|
||||
CONFIG_BOOL_AHBOT_BUYER_ENABLED,
|
||||
CONFIG_BOOL_AHBOT_LOCKBOX_ENABLED,
|
||||
CONFIG_UINT32_AHBOT_BOOL_COUNT
|
||||
};
|
||||
|
||||
// All basic config data used by other AHBot classes for self-configure.
|
||||
class AuctionBotConfig
|
||||
{
|
||||
public:
|
||||
AuctionBotConfig() {}
|
||||
|
||||
bool Initialize();
|
||||
const char* GetAHBotIncludes() const { return m_AHBotIncludes.c_str(); }
|
||||
const char* GetAHBotExcludes() const { return m_AHBotExcludes.c_str(); }
|
||||
|
||||
uint32 getConfig(AuctionBotConfigUInt32Values index) const { return m_configUint32Values[index]; }
|
||||
bool getConfig(AuctionBotConfigBoolValues index) const { return m_configBoolValues[index]; }
|
||||
void setConfig(AuctionBotConfigBoolValues index, bool value) { m_configBoolValues[index]=value; }
|
||||
void setConfig(AuctionBotConfigUInt32Values index, uint32 value) { m_configUint32Values[index]=value; }
|
||||
|
||||
uint32 getConfigItemAmountRatio(AuctionHouseType houseType) const;
|
||||
bool getConfigBuyerEnabled(AuctionHouseType houseType) const;
|
||||
|
||||
|
||||
uint32 GetItemPerCycleBoost() const { return m_ItemsPerCycleBoost; }
|
||||
uint32 GetItemPerCycleNormal() const { return m_ItemsPerCycleNormal; }
|
||||
bool Reload();
|
||||
|
||||
static char const* GetItemClassName(ItemClass itemclass);
|
||||
static char const* GetHouseTypeName(AuctionHouseType houseType);
|
||||
|
||||
private:
|
||||
std::string m_AHBotIncludes;
|
||||
std::string m_AHBotExcludes;
|
||||
Config m_AhBotCfg;
|
||||
uint32 m_ItemsPerCycleBoost;
|
||||
uint32 m_ItemsPerCycleNormal;
|
||||
|
||||
uint32 m_configUint32Values[CONFIG_UINT32_AHBOT_UINT32_COUNT];
|
||||
bool m_configBoolValues[CONFIG_UINT32_AHBOT_BOOL_COUNT];
|
||||
|
||||
void SetAHBotIncludes(const std::string& AHBotIncludes) { m_AHBotIncludes = AHBotIncludes; }
|
||||
void SetAHBotExcludes(const std::string& AHBotExcludes) { m_AHBotExcludes = 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 GetConfigFromFile();
|
||||
};
|
||||
|
||||
#define sAuctionBotConfig MaNGOS::Singleton<AuctionBotConfig>::Instance()
|
||||
|
||||
class AuctionBotAgent
|
||||
{
|
||||
public:
|
||||
AuctionBotAgent() {}
|
||||
virtual ~AuctionBotAgent() {}
|
||||
public:
|
||||
virtual bool Initialize() =0;
|
||||
virtual bool Update(AuctionHouseType houseType) =0;
|
||||
};
|
||||
|
||||
struct AuctionHouseBotStatusInfoPerType
|
||||
{
|
||||
uint32 ItemsCount;
|
||||
uint32 QualityInfo[MAX_AUCTION_QUALITY];
|
||||
};
|
||||
|
||||
typedef AuctionHouseBotStatusInfoPerType AuctionHouseBotStatusInfo[MAX_AUCTION_HOUSE_TYPE];
|
||||
|
||||
// This class handle both Selling and Buying method
|
||||
// (holder of AuctionBotBuyer and AuctionBotSeller objects)
|
||||
class AuctionHouseBot
|
||||
{
|
||||
public:
|
||||
AuctionHouseBot();
|
||||
~AuctionHouseBot();
|
||||
|
||||
void Update();
|
||||
void Initialize();
|
||||
|
||||
// Followed method is mainly used by level3.cpp for ingame/console command
|
||||
void SetItemsRatio(uint32* al, uint32* ho, uint32* ne);
|
||||
void SetItemsAmount(uint32* grey_i, uint32* white_i, uint32* green_i, uint32* blue_i, uint32* purple_i, uint32* orange_i, uint32* yellow_i);
|
||||
bool ReloadAllConfig();
|
||||
void Rebuild(bool all);
|
||||
|
||||
void PrepareStatusInfos(AuctionHouseBotStatusInfo& statusInfo);
|
||||
private:
|
||||
void InitilizeAgents();
|
||||
|
||||
AuctionBotAgent* m_Buyer;
|
||||
AuctionBotAgent* m_Seller;
|
||||
|
||||
uint32 m_OperationSelector; // 0..2*MAX_AUCTION_HOUSE_TYPE-1
|
||||
};
|
||||
|
||||
#define sAuctionBot MaNGOS::Singleton<AuctionHouseBot>::Instance()
|
||||
|
||||
#endif
|
||||
275
src/game/AuctionHouseBot/ahbot.conf.dist.in
Normal file
275
src/game/AuctionHouseBot/ahbot.conf.dist.in
Normal file
|
|
@ -0,0 +1,275 @@
|
|||
################################################
|
||||
# MANGOS Auction House Bot Configuration file #
|
||||
################################################
|
||||
|
||||
[AhbotConf]
|
||||
ConfVersion=2010102201
|
||||
|
||||
###################################################################################################################
|
||||
# AUCTION HOUSE BOT SETTINGS
|
||||
#
|
||||
# AuctionHouseBot.Seller.Enabled
|
||||
# General enable or disable AuctionHouseBot Seller fonctionality
|
||||
# Default 0 (Disabled)
|
||||
#
|
||||
# AuctionHouseBot.DEBUG.Seller
|
||||
# Enable or disable AuctionHouseBot Seller debug mode
|
||||
# Default 0 (Disabled)
|
||||
#
|
||||
# AuctionHouseBot.Alliance.Items.Amount.Ratio
|
||||
# Enable/Disable (disabled if 0) the part of AHBot that puts items up for auction on Alliance AH
|
||||
# Default 100 (Enabled with 100% of items specified in AuctionHouse.Items.Amount.color section)
|
||||
#
|
||||
# AuctionHouseBot.Horde.Items.Amount.Ratio
|
||||
# Enable/Disable (disabled if 0) the part of AHBot that puts items up for auction on Horde AH
|
||||
# Default 100 (Enabled with 100% of items specified in AuctionHouse.Items.Amount.color section)
|
||||
#
|
||||
# AuctionHouseBot.Neutral.Items.Amount.Ratio
|
||||
# Enable/Disable (disabled if 0) the part of AHBot that puts items up for auction on Neutral AH
|
||||
# Default 100 (Enabled with 100% of items specified in AuctionHouse.Items.Amount.color section)
|
||||
#
|
||||
# AuctionHouseBot.MinTime
|
||||
# Minimum time for the new auction
|
||||
# Default 1 (Hour)
|
||||
#
|
||||
# AuctionHouseBot.MaxTime
|
||||
# Maximum time for the new auction
|
||||
# Default 72 (Hours)
|
||||
#
|
||||
# AuctionHouseBot.Items.Vendor
|
||||
# Include items that can be bought from vendors.
|
||||
# Default 0
|
||||
#
|
||||
# AuctionHouseBot.Items.Loot
|
||||
# Include items that can be looted or fished for.
|
||||
# Default 1
|
||||
#
|
||||
# AuctionHouseBot.Items.Misc
|
||||
# Include misc. items.
|
||||
# Default 0
|
||||
#
|
||||
# AuctionHouseBot.Bind.*
|
||||
# Indicates which bonding types to allow the bot to put up for auction
|
||||
# No - Items that don't bind Default 1 (Allowed)
|
||||
# Pickup - Items that bind on pickup Default 0 (Not Allowed)
|
||||
# Equip - Items that bind on equip Default 1 (Allowed)
|
||||
# Use - Items that bind on use Default 1 (Allowed)
|
||||
# Quest - Quest Items Default 0 (Not Allowed)
|
||||
#
|
||||
# AuctionHouseBot.LockBox.Enabled
|
||||
# Enable or not lockbox in auctionhouse
|
||||
# Default 0 (Disabled)
|
||||
#
|
||||
# AuctionHouseBot.ItemsPerCycle.Boost
|
||||
# This value is used to fill DB faster than normal when there is more than this value missed items.
|
||||
# Normaly this value is used only first start of the server with empty auction table.
|
||||
# Default 1000
|
||||
#
|
||||
# AuctionHouseBot.ItemsPerCycle.Normal
|
||||
# This value is used to fill DB normal way with less cpu/db using.
|
||||
# Normaly this value is used always when auction table is already initialised.
|
||||
# Default 20
|
||||
#
|
||||
# AuctionHouseBot.BuyPrice.Seller
|
||||
# Should the Seller use BuyPrice or SellPrice to determine Bid Prices
|
||||
# Default 1 (use SellPrice)
|
||||
#
|
||||
# AuctionHouseBot.Alliance.Price.Ratio
|
||||
# Define the price of selled item here for the Alliance Auction House
|
||||
# Default 100
|
||||
#
|
||||
# AuctionHouseBot.Horde.Price.Ratio
|
||||
# Define the price of selled item here for the Horde Auction House
|
||||
# Default 100
|
||||
#
|
||||
# AuctionHouseBot.Alliance.Price.Ratio
|
||||
# Define the price of selled item here for the Neutral Auction House
|
||||
# Default 100
|
||||
#
|
||||
# AuctionHouseBot.Items.ItemLevel.*
|
||||
# Prevent seller from listing items below/above this item level
|
||||
# Default 0 (Disabled)
|
||||
#
|
||||
# AuctionHouseBot.Items.ReqLevel.*
|
||||
# Prevent seller from listing items below/above this required level
|
||||
# Default 0 (Disabled)
|
||||
#
|
||||
# AuctionHouseBot.Items.ReqSkill.*
|
||||
# Prevent seller from listing items below/above this skill level
|
||||
# Default 0 (Disabled)
|
||||
#
|
||||
# AuctionHouseBot.Items.Amount.*
|
||||
# Define here for every items quality how many item you whant to be show in Auction House
|
||||
# This value will be adjusted by AuctionHouseBot.FACTION.Items.Amount.Ratio to define exact amount of
|
||||
# items will be show on Auction House
|
||||
# Default 0, 2000, 2500, 1500, 1000, 0, 0 (grey, white, green, blue, purple, orange, yellow)
|
||||
#
|
||||
# AustionHouseBot.Class.*
|
||||
# Here you can set the class of items you prefer to be show on AH
|
||||
# These value is preference value, it's not percentage. So the maximum is 10.
|
||||
# The minimum is 0 (disabled).
|
||||
# Default 6,4,8,3,8,1,2,10,1,6,1,1,1,5,3
|
||||
#
|
||||
#
|
||||
# ITEM FINE TUNING
|
||||
# The following are usefull for limiting what character levels can
|
||||
# benefit from the auction house
|
||||
#
|
||||
# AuctionHouseBot.Class.Misc.Mount.ReqLevel.*
|
||||
# Prevent seller from listing mounts below/above this required level
|
||||
# Default 0
|
||||
#
|
||||
# AuctionHouseBot.Class.Misc.Mount.ReqSkill.*
|
||||
# Prevent seller from listing mounts below/above this skill level
|
||||
# Default 0
|
||||
#
|
||||
# AuctionHouseBot.Class.Glyph.ReqLevel.*
|
||||
# Prevent seller from listing glyphs below/above this required level
|
||||
# Default 0
|
||||
#
|
||||
# AuctionHouseBot.Class.Glyph.ItemLevel.*
|
||||
# Prevent seller from listing glyphs below/above this item level
|
||||
# Default 0
|
||||
#
|
||||
# AuctionHouseBot.Class.TradeGood.ItemLevel.*
|
||||
# Prevent seller from listing trade good items below/above this item level
|
||||
# Default 0
|
||||
#
|
||||
# AuctionHouseBot.Class.Container.ItemLevel.*
|
||||
# Prevent seller from listing contianers below/above this item level
|
||||
# Default 0
|
||||
#
|
||||
# AuctionHouseBot.forceIncludeItems
|
||||
# Include these items and ignore ALL filters
|
||||
# List of ids with delimiter ','
|
||||
# Default ""
|
||||
#
|
||||
# AuctionHouseBot.forceExcludeItems
|
||||
# Exclude these items even if they would pass the filters
|
||||
# List of ids with delimiter ','
|
||||
# Example "21878,27774,27811,28117,28122,43949" (this removes zzOld items)
|
||||
# Default ""
|
||||
#
|
||||
###################################################################################################################
|
||||
|
||||
AuctionHouseBot.Seller.Enabled = 0
|
||||
AuctionHouseBot.DEBUG.Seller = 0
|
||||
|
||||
AuctionHouseBot.Alliance.Items.Amount.Ratio = 100
|
||||
AuctionHouseBot.Horde.Items.Amount.Ratio = 100
|
||||
AuctionHouseBot.Neutral.Items.Amount.Ratio = 100
|
||||
|
||||
AuctionHouseBot.MinTime = 1
|
||||
AuctionHouseBot.MaxTime = 72
|
||||
|
||||
AuctionHouseBot.Items.Vendor = 0
|
||||
AuctionHouseBot.Items.Loot = 1
|
||||
AuctionHouseBot.Items.Misc = 0
|
||||
AuctionHouseBot.Bind.No = 1
|
||||
AuctionHouseBot.Bind.Pickup = 0
|
||||
AuctionHouseBot.Bind.Equip = 1
|
||||
AuctionHouseBot.Bind.Use = 1
|
||||
AuctionHouseBot.Bind.Quest = 0
|
||||
AuctionHouseBot.LockBox.Enabled = 0
|
||||
|
||||
AuctionHouseBot.ItemsPerCycle.Boost = 1000
|
||||
AuctionHouseBot.ItemsPerCycle.Normal = 20
|
||||
AuctionHouseBot.BuyPrice.Seller = 1
|
||||
AuctionHouseBot.Alliance.Price.Ratio = 200
|
||||
AuctionHouseBot.Horde.Price.Ratio = 200
|
||||
AuctionHouseBot.Neutral.Price.Ratio = 200
|
||||
|
||||
AuctionHouseBot.Items.ItemLevel.Min = 0
|
||||
AuctionHouseBot.Items.ItemLevel.Max = 0
|
||||
AuctionHouseBot.Items.ReqLevel.Min = 0
|
||||
AuctionHouseBot.Items.ReqLevel.Max = 0
|
||||
AuctionHouseBot.Items.ReqSkill.Min = 0
|
||||
AuctionHouseBot.Items.ReqSkill.Max = 0
|
||||
|
||||
AuctionHouseBot.Items.Amount.Grey = 0
|
||||
AuctionHouseBot.Items.Amount.White = 2000
|
||||
AuctionHouseBot.Items.Amount.Green = 2500
|
||||
AuctionHouseBot.Items.Amount.Blue = 1500
|
||||
AuctionHouseBot.Items.Amount.Purple = 1000
|
||||
AuctionHouseBot.Items.Amount.Orange = 0
|
||||
AuctionHouseBot.Items.Amount.Yellow = 0
|
||||
|
||||
AuctionHouseBot.Class.Consumable = 6
|
||||
AuctionHouseBot.Class.Container = 4
|
||||
AuctionHouseBot.Class.Weapon = 8
|
||||
AuctionHouseBot.Class.Gem = 3
|
||||
AuctionHouseBot.Class.Armor = 8
|
||||
AuctionHouseBot.Class.Reagent = 1
|
||||
AuctionHouseBot.Class.Projectile = 2
|
||||
AuctionHouseBot.Class.TradeGood = 10
|
||||
AuctionHouseBot.Class.Generic = 1
|
||||
AuctionHouseBot.Class.Recipe = 6
|
||||
AuctionHouseBot.Class.Quiver = 1
|
||||
AuctionHouseBot.Class.Quest = 1
|
||||
AuctionHouseBot.Class.Key = 1
|
||||
AuctionHouseBot.Class.Misc = 5
|
||||
AuctionHouseBot.Class.Glyph = 3
|
||||
|
||||
AuctionHouseBot.Class.Misc.Mount.ReqLevel.Min = 0
|
||||
AuctionHouseBot.Class.Misc.Mount.ReqLevel.Max = 0
|
||||
AuctionHouseBot.Class.Misc.Mount.ReqSkill.Min = 0
|
||||
AuctionHouseBot.Class.Misc.Mount.ReqSkill.Max = 0
|
||||
AuctionHouseBot.Class.Glyph.ReqLevel.Min = 0
|
||||
AuctionHouseBot.Class.Glyph.ReqLevel.Max = 0
|
||||
AuctionHouseBot.Class.Glyph.ItemLevel.Min = 0
|
||||
AuctionHouseBot.Class.Glyph.ItemLevel.Max = 0
|
||||
AuctionHouseBot.Class.TradeGood.ItemLevel.Min = 0
|
||||
AuctionHouseBot.Class.TradeGood.ItemLevel.Max = 0
|
||||
AuctionHouseBot.Class.Container.ItemLevel.Min = 0
|
||||
AuctionHouseBot.Class.Container.ItemLevel.Max = 0
|
||||
|
||||
AuctionHouseBot.forceIncludeItems = ""
|
||||
AuctionHouseBot.forceExcludeItems = ""
|
||||
|
||||
###################################################################################################################
|
||||
# Buyer config
|
||||
#
|
||||
# AuctionHouseBot.Buyer.Enabled
|
||||
# General enable or disable AuctionHouseBot Buyer fonctionality
|
||||
# Default 0 (Disabled)
|
||||
#
|
||||
# AuctionHouseBot.DEBUG.Buyer
|
||||
# Enable or disable AuctionHouseBot Buyer debug mode
|
||||
# Default 0 (Disabled)
|
||||
#
|
||||
# AuctionHouseBot.Buyer.FACTION.Enabled
|
||||
# Enable or disable buyer independently by faction
|
||||
#
|
||||
# AuctionHouseBot.BuyPrice.Buyer
|
||||
# Should the Buyer use BuyPrice or SellPrice to determine Bid Prices
|
||||
# Default 0 (use SellPrice)
|
||||
#
|
||||
# AuctionHouseBot.Buyer.Recheck.Interval
|
||||
# This specify time interval (in minute) between two evaluation of the same selled item.
|
||||
# The less this value is, the more you give chance for item to be buyed by ahbot.
|
||||
# Default 20 (20min.)
|
||||
#
|
||||
# AuctionHouseBot.Buyer.Alliance.Chance.Ratio
|
||||
# When the evaluation of the entry is done you will have "x" chance for this entry to be buyed.
|
||||
# The chance ratio is simply (x/chance ratio)
|
||||
# For ex : If the evaluation give you 5000(maximum chance) chance and ratio is set 3
|
||||
# you will have 5000 chance on 15000(3*5000) random number
|
||||
# This for every faction independently
|
||||
# Default 3 (literaly 1 chance by 3)
|
||||
#
|
||||
###################################################################################################################
|
||||
|
||||
AuctionHouseBot.Buyer.Enabled = 0
|
||||
AuctionHouseBot.DEBUG.Buyer = 0
|
||||
|
||||
AuctionHouseBot.Buyer.Alliance.Enabled = 1
|
||||
AuctionHouseBot.Buyer.Horde.Enabled = 1
|
||||
AuctionHouseBot.Buyer.Neutral.Enabled = 1
|
||||
|
||||
AuctionHouseBot.Buyer.Buyprice = 1
|
||||
|
||||
AuctionHouseBot.Buyer.Recheck.Interval = 20
|
||||
|
||||
AuctionHouseBot.Buyer.Alliance.Chance.Ratio = 3
|
||||
AuctionHouseBot.Buyer.Horde.Chance.Ratio = 3
|
||||
AuctionHouseBot.Buyer.Neutral.Chance.Ratio = 3
|
||||
|
|
@ -100,11 +100,14 @@ class AuctionHouseObject
|
|||
}
|
||||
|
||||
typedef std::map<uint32, AuctionEntry*> AuctionEntryMap;
|
||||
typedef std::pair<AuctionEntryMap::const_iterator, AuctionEntryMap::const_iterator> AuctionEntryMapBounds;
|
||||
|
||||
uint32 GetCount() { return AuctionsMap.size(); }
|
||||
|
||||
AuctionEntryMap *GetAuctions() { return &AuctionsMap; }
|
||||
|
||||
AuctionEntryMapBounds GetAuctionsBounds() const {return AuctionEntryMapBounds(AuctionsMap.begin(), AuctionsMap.end()); }
|
||||
|
||||
void AddAuction(AuctionEntry *ah)
|
||||
{
|
||||
MANGOS_ASSERT( ah );
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ file(GLOB_RECURSE game_SRCS RELATIVE ${CMAKE_CURRENT_SOURCE_DIR} *.cpp *.h)
|
|||
include_directories(
|
||||
${CMAKE_CURRENT_SOURCE_DIR}
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/vmap
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/AuctionHouseBot
|
||||
${CMAKE_SOURCE_DIR}/dep/include/g3dlite
|
||||
${CMAKE_SOURCE_DIR}/dep/include
|
||||
${CMAKE_SOURCE_DIR}/src/shared
|
||||
|
|
|
|||
|
|
@ -61,6 +61,7 @@
|
|||
#include "WaypointManager.h"
|
||||
#include "GMTicketMgr.h"
|
||||
#include "Util.h"
|
||||
#include "AuctionHouseBot/AuctionHouseBot.h"
|
||||
#include "CharacterDatabaseCleaner.h"
|
||||
|
||||
INSTANTIATE_SINGLETON_1( World );
|
||||
|
|
@ -1320,6 +1321,9 @@ void World::SetInitialWorldSettings()
|
|||
m_timers[WUPDATE_CORPSES].SetInterval(20*MINUTE*IN_MILLISECONDS);
|
||||
m_timers[WUPDATE_DELETECHARS].SetInterval(DAY*IN_MILLISECONDS); // check for chars to delete every day
|
||||
|
||||
// for AhBot
|
||||
m_timers[WUPDATE_AHBOT].SetInterval(20*IN_MILLISECONDS); // every 20 sec
|
||||
|
||||
//to set mailtimer to return mails every day between 4 and 5 am
|
||||
//mailtimer is increased when updating auctions
|
||||
//one second is 1000 -(tested on win system)
|
||||
|
|
@ -1364,6 +1368,9 @@ void World::SetInitialWorldSettings()
|
|||
// Delete all characters which have been deleted X days before
|
||||
Player::DeleteOldCharacters();
|
||||
|
||||
sLog.outString("Initialize AuctionHouseBot...");
|
||||
sAuctionBot.Initialize();
|
||||
|
||||
sLog.outString( "WORLD: World initialized" );
|
||||
|
||||
uint32 uStartInterval = WorldTimer::getMSTimeDiff(uStartTime, WorldTimer::getMSTime());
|
||||
|
|
@ -1463,6 +1470,13 @@ void World::Update(uint32 diff)
|
|||
sAuctionMgr.Update();
|
||||
}
|
||||
|
||||
/// <li> Handle AHBot operations
|
||||
if (m_timers[WUPDATE_AHBOT].Passed())
|
||||
{
|
||||
sAuctionBot.Update();
|
||||
m_timers[WUPDATE_AHBOT].Reset();
|
||||
}
|
||||
|
||||
/// <li> Handle session updates
|
||||
UpdateSessions(diff);
|
||||
|
||||
|
|
|
|||
|
|
@ -77,7 +77,8 @@ enum WorldTimers
|
|||
WUPDATE_CORPSES = 3,
|
||||
WUPDATE_EVENTS = 4,
|
||||
WUPDATE_DELETECHARS = 5,
|
||||
WUPDATE_COUNT = 6
|
||||
WUPDATE_AHBOT = 6,
|
||||
WUPDATE_COUNT = 7
|
||||
};
|
||||
|
||||
/// Configuration elements
|
||||
|
|
|
|||
|
|
@ -48,6 +48,8 @@ LogFilterData logFilterData[LOG_FILTER_COUNT] =
|
|||
{ "combat", "LogFilter_Combat", false },
|
||||
{ "spell_cast", "LogFilter_SpellCast", false },
|
||||
{ "db_stricted_check", "LogFilter_DbStrictedCheck", true },
|
||||
{ "ahbot_seller", "LogFilter_AhbotSeller", true },
|
||||
{ "ahbot_buyer", "LogFilter_AhbotBuyer", true },
|
||||
};
|
||||
|
||||
enum LogType
|
||||
|
|
|
|||
|
|
@ -36,23 +36,25 @@ enum LogLevel
|
|||
// bitmask (not forgot update logFilterData content)
|
||||
enum LogFilters
|
||||
{
|
||||
LOG_FILTER_TRANSPORT_MOVES = 0x0001, // any related to transport moves
|
||||
LOG_FILTER_CREATURE_MOVES = 0x0002, // creature move by cells
|
||||
LOG_FILTER_VISIBILITY_CHANGES = 0x0004, // update visibility for diff objects and players
|
||||
LOG_FILTER_ACHIEVEMENT_UPDATES= 0x0008, // achievement update broadcasts
|
||||
LOG_FILTER_WEATHER = 0x0010, // weather changes
|
||||
LOG_FILTER_PLAYER_STATS = 0x0020, // player save data
|
||||
LOG_FILTER_SQL_TEXT = 0x0040, // raw SQL text send to DB engine
|
||||
LOG_FILTER_PLAYER_MOVES = 0x0080, // player moves by grid/cell
|
||||
LOG_FILTER_PERIODIC_AFFECTS = 0x0100, // DoT/HoT apply trace
|
||||
LOG_FILTER_AI_AND_MOVEGENSS = 0x0200, // AI/movement generators debug output
|
||||
LOG_FILTER_DAMAGE = 0x0400, // Direct/Area damage trace
|
||||
LOG_FILTER_COMBAT = 0x0800, // attack states/roll attack results/etc
|
||||
LOG_FILTER_SPELL_CAST = 0x1000, // spell cast/aura apply/spell proc events
|
||||
LOG_FILTER_DB_STRICTED_CHECK = 0x2000, // stricted DB data checks output (with possible false reports) for DB devs
|
||||
LOG_FILTER_TRANSPORT_MOVES = 0x0001, // 0 any related to transport moves
|
||||
LOG_FILTER_CREATURE_MOVES = 0x0002, // 1 creature move by cells
|
||||
LOG_FILTER_VISIBILITY_CHANGES = 0x0004, // 2 update visibility for diff objects and players
|
||||
LOG_FILTER_ACHIEVEMENT_UPDATES= 0x0008, // 3 achievement update broadcasts
|
||||
LOG_FILTER_WEATHER = 0x0010, // 4 weather changes
|
||||
LOG_FILTER_PLAYER_STATS = 0x0020, // 5 player save data
|
||||
LOG_FILTER_SQL_TEXT = 0x0040, // 6 raw SQL text send to DB engine
|
||||
LOG_FILTER_PLAYER_MOVES = 0x0080, // 7 player moves by grid/cell
|
||||
LOG_FILTER_PERIODIC_AFFECTS = 0x0100, // 8 DoT/HoT apply trace
|
||||
LOG_FILTER_AI_AND_MOVEGENSS = 0x0200, // 9 AI/movement generators debug output
|
||||
LOG_FILTER_DAMAGE = 0x0400, // 10 Direct/Area damage trace
|
||||
LOG_FILTER_COMBAT = 0x0800, // 11 attack states/roll attack results/etc
|
||||
LOG_FILTER_SPELL_CAST = 0x1000, // 12 spell cast/aura apply/spell proc events
|
||||
LOG_FILTER_DB_STRICTED_CHECK = 0x2000, // 13 stricted DB data checks output (with possible false reports) for DB devs
|
||||
LOG_FILTER_AHBOT_SELLER = 0x4000, // 14 Auction House Bot seller part
|
||||
LOG_FILTER_AHBOT_BUYER = 0x8000, // 15 Auction House Bot buyer part
|
||||
};
|
||||
|
||||
#define LOG_FILTER_COUNT 14
|
||||
#define LOG_FILTER_COUNT 16
|
||||
|
||||
struct LogFilterData
|
||||
{
|
||||
|
|
|
|||
|
|
@ -71,6 +71,7 @@
|
|||
# endif
|
||||
# define _MANGOSD_CONFIG SYSCONFDIR"mangosd.conf"
|
||||
# define _REALMD_CONFIG SYSCONFDIR"realmd.conf"
|
||||
# define _AUCTIONHOUSEBOT_CONFIG SYSCONFDIR"ahbot.conf"
|
||||
#else
|
||||
# if defined (__FreeBSD__)
|
||||
# define _ENDIAN_PLATFORM "FreeBSD_"ARCHITECTURE" (" _ENDIAN_STRING ")"
|
||||
|
|
@ -89,6 +90,7 @@
|
|||
# endif
|
||||
# define _MANGOSD_CONFIG SYSCONFDIR"mangosd.conf"
|
||||
# define _REALMD_CONFIG SYSCONFDIR"realmd.conf"
|
||||
# define _AUCTIONHOUSEBOT_CONFIG SYSCONFDIR"ahbot.conf"
|
||||
#endif
|
||||
|
||||
#define _FULLVERSION(REVD,REVT,REVN,REVH) _PACKAGENAME "/" _VERSION(REVD,REVT,REVN,REVH) " for " _ENDIAN_PLATFORM
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
#ifndef __REVISION_NR_H__
|
||||
#define __REVISION_NR_H__
|
||||
#define REVISION_NR "11722"
|
||||
#define REVISION_NR "11723"
|
||||
#endif // __REVISION_NR_H__
|
||||
|
|
|
|||
|
|
@ -359,6 +359,7 @@
|
|||
<ClCompile Include="..\..\src\game\AggressorAI.cpp" />
|
||||
<ClCompile Include="..\..\src\game\ArenaTeam.cpp" />
|
||||
<ClCompile Include="..\..\src\game\ArenaTeamHandler.cpp" />
|
||||
<ClCompile Include="..\..\src\game\AuctionHouseBot\AuctionHouseBot.cpp" />
|
||||
<ClCompile Include="..\..\src\game\AuctionHouseHandler.cpp" />
|
||||
<ClCompile Include="..\..\src\game\AuctionHouseMgr.cpp" />
|
||||
<ClCompile Include="..\..\src\game\Bag.cpp" />
|
||||
|
|
@ -525,6 +526,7 @@
|
|||
<ClInclude Include="..\..\src\game\AchievementMgr.h" />
|
||||
<ClInclude Include="..\..\src\game\AggressorAI.h" />
|
||||
<ClInclude Include="..\..\src\game\ArenaTeam.h" />
|
||||
<ClInclude Include="..\..\src\game\AuctionHouseBot\AuctionHouseBot.h" />
|
||||
<ClInclude Include="..\..\src\game\AuctionHouseMgr.h" />
|
||||
<ClInclude Include="..\..\src\game\Bag.h" />
|
||||
<ClInclude Include="..\..\src\game\BattleGround.h" />
|
||||
|
|
|
|||
|
|
@ -22,6 +22,9 @@
|
|||
<Filter Include="References">
|
||||
<UniqueIdentifier>{64bb42b8-e7ba-4247-b337-492f644daeeb}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="AhBot">
|
||||
<UniqueIdentifier>{481ad376-5cba-439d-af8c-2ef73de2ed8b}</UniqueIdentifier>
|
||||
</Filter>
|
||||
<Filter Include="vmaps">
|
||||
<UniqueIdentifier>{948284d3-9d89-4609-8cdd-28a213edb53e}</UniqueIdentifier>
|
||||
</Filter>
|
||||
|
|
@ -460,6 +463,9 @@
|
|||
<ClCompile Include="..\..\src\game\UnitAuraProcHandler.cpp">
|
||||
<Filter>World/Handlers</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\game\AuctionHouseBot\AuctionHouseBot.cpp">
|
||||
<Filter>AhBot</Filter>
|
||||
</ClCompile>
|
||||
<ClCompile Include="..\..\src\game\vmap\BIH.cpp">
|
||||
<Filter>vmaps</Filter>
|
||||
</ClCompile>
|
||||
|
|
@ -886,6 +892,9 @@
|
|||
<ClInclude Include="..\..\src\game\Camera.h">
|
||||
<Filter>Object</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\game\AuctionHouseBot\AuctionHouseBot.h">
|
||||
<Filter>AhBot</Filter>
|
||||
</ClInclude>
|
||||
<ClInclude Include="..\..\src\game\vmap\BIH.h">
|
||||
<Filter>vmaps</Filter>
|
||||
</ClInclude>
|
||||
|
|
|
|||
|
|
@ -1145,6 +1145,14 @@
|
|||
RelativePath="..\..\src\game\ArenaTeam.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\AuctionHouseBot\AuctionHouseBot.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\AuctionHouseBot\AuctionHouseBot.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\AuctionHouseMgr.cpp"
|
||||
>
|
||||
|
|
|
|||
|
|
@ -1138,6 +1138,14 @@
|
|||
RelativePath="..\..\src\game\ArenaTeam.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\AuctionHouseBot\AuctionHouseBot.cpp"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\AuctionHouseBot\AuctionHouseBot.h"
|
||||
>
|
||||
</File>
|
||||
<File
|
||||
RelativePath="..\..\src\game\AuctionHouseMgr.cpp"
|
||||
>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue