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
This commit is contained in:
Chaz Brown
2009-08-18 00:06:11 -04:00
parent 1992df8e89
commit 1a5da75838
4 changed files with 21 additions and 11 deletions
+2
View File
@@ -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));