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
+6 -6
View File
@@ -157,22 +157,22 @@ MinPriceGrey = 100
MaxPriceGrey = 150
MinBidPriceGrey = 70
MaxBidPriceGrey = 100
MaxStackGrey = 0
MaxStackGrey = 1
MinPriceWhite = 150
MaxPriceWhite = 250
MinBidPriceWhite = 70
MaxBidPriceWhite = 100
MaxStackWhite = 0
MaxStackWhite = 1
MinPriceGreen = 800
MaxPriceGreen = 1400
MinBidPriceGreen = 80
MaxBidPriceGreen = 100
MaxStackGreen = 3
MaxStackGreen = 1
MinPriceBlue = 1250
MaxPriceBlue = 1750
MinBidPriceBlue = 75
MaxBidPriceBlue = 100
MaxStackBlue = 2
MaxStackBlue = 1
MinPricePurple = 2250
MaxPricePurple = 4550
MinBidPricePurple = 80
@@ -182,12 +182,12 @@ MinPriceOrange = 4250
MaxPriceOrange = 5550
MinBidPriceOrange = 80
MaxBidPriceOrange = 100
MaxStackOrange = 0
MaxStackOrange = 1
MinPriceYellow = 5250
MaxPriceYellow = 6550
MinBidPriceYellow = 80
MaxBidPriceYellow = 100
MaxStackYellow = 0
MaxStackYellow = 1
#These are the multipliers that are applied to the vendor price for an item, that determines if AHBot will buy it or not.
#1 means AHBot will pay the same as (or less than) a vendor would pay, 2 means up to twice as much, etc.
+5 -5
View File
@@ -220,11 +220,11 @@ CREATE TABLE `auctionhousebot` (
`maxbidpriceyellow` int(11) default '100' COMMENT 'Starting bid price of Yellow items as a percentage of the randomly chosen buyout price. Default: 100',
`maxstackgrey` int(11) default '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackwhite` int(11) default '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackgreen` int(11) default '3' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackblue` int(11) default '2' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackpurple` int(11) default '1' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackorange` int(11) default '1' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackyellow` int(11) default '1' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackgreen` int(11) default '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackblue` int(11) default '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackpurple` int(11) default '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackorange` int(11) default '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`maxstackyellow` int(11) default '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
`buyerpricegrey` int(11) default '1' COMMENT 'Multiplier to vendorprice when buying grey items from auctionhouse',
`buyerpricewhite` int(11) default '3' COMMENT 'Multiplier to vendorprice when buying white items from auctionhouse',
`buyerpricegreen` int(11) default '5' COMMENT 'Multiplier to vendorprice when buying green items from auctionhouse',
+8
View File
@@ -0,0 +1,8 @@
ALTER TABLE `auctionhousebot`
CHANGE COLUMN `maxstackgrey` `maxstackgrey` int(11) default '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
CHANGE COLUMN `maxstackwhite` `maxstackwhite` int(11) default '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
CHANGE COLUMN `maxstackgreen` `maxstackgreen` int(11) default '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
CHANGE COLUMN `maxstackblue` `maxstackblue` int(11) default '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
CHANGE COLUMN `maxstackpurple` `maxstackpurple` int(11) default '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
CHANGE COLUMN `maxstackorange` `maxstackorange` int(11) default '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.',
CHANGE COLUMN `maxstackyellow` `maxstackyellow` int(11) default '0' COMMENT 'Stack size limits for item qualities - a value of 0 will disable a maximum stack size for that quality, which will allow the bot to create items in stack as large as the item allows.';
+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));