aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorjackpoz <giacomopoz@gmail.com>2014-10-28 20:57:18 +0100
committerjackpoz <giacomopoz@gmail.com>2014-10-28 20:57:18 +0100
commit248847290ae11478d51decdc605691311dc934c5 (patch)
tree59a92da650e2707ac19189fd5bc405e0cf365329
parent9af10e6a9280ade4ea763efa37c3c1b2d36185d2 (diff)
parentd508472046f9c6f93a401c978d04cb5039f5a6d4 (diff)
Merge pull request #13440 from Rochet2/ahbot
Core/AH: AHBot related fixes
-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