diff options
author | Chaz Brown <iamparadox@netscape.net> | 2009-08-18 00:06:11 -0400 |
---|---|---|
committer | Chaz Brown <iamparadox@netscape.net> | 2009-08-18 00:06:11 -0400 |
commit | 1a5da7583830556eba62291c81c9cbb038e51e6f (patch) | |
tree | cc9d2af1f4755282fb04c755c35579ccf60f5266 /src | |
parent | 1992df8e89daa989ffeef6b6fd771da9c9dde72d (diff) |
AHBot - Fix maxstack DB option to correctly set stacks to a random choice between 1 and the maxstack setting of the item, instead of 1. - Thanks T`lexii for pointing this out
--HG--
branch : trunk
Diffstat (limited to 'src')
-rw-r--r-- | src/game/AuctionHouseBot.cpp | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/game/AuctionHouseBot.cpp b/src/game/AuctionHouseBot.cpp index 861e822322c..8892b8a8cbb 100644 --- a/src/game/AuctionHouseBot.cpp +++ b/src/game/AuctionHouseBot.cpp @@ -387,6 +387,8 @@ void AuctionHouseBot::addNewAuctions(Player *AHBplayer, AHBConfig *config) { if (config->GetMaxStack(prototype->Quality) > 1 && item->GetMaxStackCount() > 1) stackCount = urand(1, minValue(item->GetMaxStackCount(), config->GetMaxStack(prototype->Quality))); + else if (config->GetMaxStack(prototype->Quality) == 0 && item->GetMaxStackCount() > 1) + stackCount = urand(1, item->GetMaxStackCount()); else stackCount = 1; buyoutPrice *= urand(config->GetMinPrice(prototype->Quality), config->GetMaxPrice(prototype->Quality)); |