diff options
-rw-r--r-- | README.AHBOT | 12 | ||||
-rw-r--r-- | sql/characters.sql | 10 | ||||
-rw-r--r-- | sql/updates/5177_characters.sql | 8 | ||||
-rw-r--r-- | src/game/AuctionHouseBot.cpp | 2 |
4 files changed, 21 insertions, 11 deletions
diff --git a/README.AHBOT b/README.AHBOT index 9f0099725da..20ec2a62ca3 100644 --- a/README.AHBOT +++ b/README.AHBOT @@ -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. diff --git a/sql/characters.sql b/sql/characters.sql index 17a5e7b2abd..aa37e0021f8 100644 --- a/sql/characters.sql +++ b/sql/characters.sql @@ -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', diff --git a/sql/updates/5177_characters.sql b/sql/updates/5177_characters.sql new file mode 100644 index 00000000000..6b8f85ac527 --- /dev/null +++ b/sql/updates/5177_characters.sql @@ -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.'; 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)); |