aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorRochet2 <tqbattlenet@gmail.com>2014-10-23 11:24:08 +0300
committerRochet2 <tqbattlenet@gmail.com>2014-10-25 11:33:03 +0300
commitd508472046f9c6f93a401c978d04cb5039f5a6d4 (patch)
tree393cf67e218ffd923480e9bfd742f1cbf9b8955e /src
parent805be8ebba07c3280089a128f1764d49f6f84ab6 (diff)
AHBot related fixes
Fix rebuild command requiring a dummy value Fix ahbot config to normal Fix sellprice setting in core. Closes #13425
Diffstat (limited to 'src')
-rw-r--r--src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp6
-rw-r--r--src/server/scripts/Commands/cs_ahbot.cpp4
-rw-r--r--src/server/worldserver/worldserver.conf.dist7
3 files changed, 9 insertions, 8 deletions
diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp
index 513b23afd70..e5e5facd30a 100644
--- a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp
+++ b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp
@@ -207,12 +207,12 @@ bool AuctionBotSeller::Initialize()
{
if (sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYPRICE_SELLER))
{
- if (prototype->BuyPrice == 0)
+ if (prototype->SellPrice == 0)
continue;
}
else
{
- if (prototype->SellPrice == 0)
+ if (prototype->BuyPrice == 0)
continue;
}
}
@@ -706,7 +706,7 @@ void AuctionBotSeller::SetPricesOfItem(ItemTemplate const* itemProto, SellerConf
if (sellPrice == 0)
sellPrice = (buyPrice > 10 ? buyPrice / GetSellModifier(itemProto) : buyPrice);
- if (!sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYPRICE_SELLER))
+ if (sAuctionBotConfig->GetConfig(CONFIG_AHBOT_BUYPRICE_SELLER))
buyPrice = sellPrice;
uint32 basePrice = (buyPrice * stackCount * priceRatio) / (itemProto->Class == 6 ? 200 : itemProto->BuyCount) / 100;
diff --git a/src/server/scripts/Commands/cs_ahbot.cpp b/src/server/scripts/Commands/cs_ahbot.cpp
index 04647d51ff0..772e1a69b21 100644
--- a/src/server/scripts/Commands/cs_ahbot.cpp
+++ b/src/server/scripts/Commands/cs_ahbot.cpp
@@ -146,11 +146,9 @@ public:
static bool HandleAHBotRebuildCommand(ChatHandler* /*handler*/, const char* args)
{
char* arg = strtok((char*)args, " ");
- if (!arg)
- return false;
bool all = false;
- if (strcmp(arg, "all") == 0)
+ if (arg && strcmp(arg, "all") == 0)
all = true;
sAuctionBot->Rebuild(all);
diff --git a/src/server/worldserver/worldserver.conf.dist b/src/server/worldserver/worldserver.conf.dist
index 992ae4f8100..37f907a9c96 100644
--- a/src/server/worldserver/worldserver.conf.dist
+++ b/src/server/worldserver/worldserver.conf.dist
@@ -27,6 +27,9 @@
# CONSOLE AND REMOTE ACCESS
# CHARACTER DELETE OPTIONS
# CUSTOM SERVER OPTIONS
+# AUCTION HOUSE BOT SETTINGS
+# AUCTION HOUSE BOT ITEM FINE TUNING
+# AUCTION HOUSE BOT BUYER CONFIG
# LOGGING SYSTEM SETTINGS
# PACKET SPOOF PROTECTION SETTINGS
#
@@ -2901,8 +2904,8 @@ AuctionHouseBot.Class.Glyph = 3
###################################################################################################
###################################################################################################
+# AUCTION HOUSE BOT ITEM FINE TUNING
#
-# AHBot ITEM FINE TUNING
# The following are usefull for limiting what character levels can
# benefit from the auction house
#
@@ -2975,7 +2978,7 @@ AuctionHouseBot.forceExcludeItems = ""
###################################################################################################
###################################################################################################
-# AHBot Buyer config
+# AUCTION HOUSE BOT BUYER CONFIG
#
# AuctionHouseBot.Buyer.Enabled
# Description: General enable or disable AuctionHouseBot Buyer functionality