diff options
author | jackpoz <giacomopoz@gmail.com> | 2014-10-28 20:57:18 +0100 |
---|---|---|
committer | jackpoz <giacomopoz@gmail.com> | 2014-10-28 21:02:39 +0100 |
commit | 573707457ea1ec340266e69e77a40b42b3c5088b (patch) | |
tree | 130cf755107d3cec7084623e73c7638cceff6349 | |
parent | 32042682004c058909f0d56be03cf5e872e2b05c (diff) |
Merge pull request #13440 from Rochet2/ahbot
Core/AH: AHBot related fixes
(cherry picked from commit 248847290ae11478d51decdc605691311dc934c5)
-rw-r--r-- | src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp | 6 | ||||
-rw-r--r-- | src/server/scripts/Commands/cs_ahbot.cpp | 4 | ||||
-rw-r--r-- | src/server/worldserver/worldserver.conf.dist | 7 |
3 files changed, 9 insertions, 8 deletions
diff --git a/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp b/src/server/game/AuctionHouseBot/AuctionHouseBotSeller.cpp index 4cf52776f0d..6d2cc74239c 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 8ea37129c53..a927e45e89e 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 # CURRENCIES SETTINGS # PACKET SPOOF PROTECTION SETTINGS @@ -2873,8 +2876,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 # @@ -2947,7 +2950,7 @@ AuctionHouseBot.forceExcludeItems = "" ################################################################################################### ################################################################################################### -# AHBot Buyer config +# AUCTION HOUSE BOT BUYER CONFIG # # AuctionHouseBot.Buyer.Enabled # Description: General enable or disable AuctionHouseBot Buyer functionality |