Removed Min/max stack and price from database and config

This commit is contained in:
NathanHandley
2023-11-15 17:17:45 -06:00
parent af94a8b12d
commit 13089c3ac0
4 changed files with 5 additions and 759 deletions

View File

@@ -4,48 +4,6 @@ CREATE TABLE `mod_auctionhousebot` (
`name` char(25) DEFAULT NULL COMMENT 'Text name of the auctionhouse.',
`minitems` int(11) DEFAULT '0' COMMENT 'This is the minimum number of items you want to keep in the auction house. a 0 here will make it the same as the maximum.',
`maxitems` int(11) DEFAULT '0' COMMENT 'This is the number of items you want to keep in the auction house.',
`minpricegrey` int(11) DEFAULT '100' COMMENT 'Minimum price of Grey items (percentage).',
`maxpricegrey` int(11) DEFAULT '150' COMMENT 'Maximum price of Grey items (percentage).',
`minpricewhite` int(11) DEFAULT '150' COMMENT 'Minimum price of White items (percentage).',
`maxpricewhite` int(11) DEFAULT '250' COMMENT 'Maximum price of White items (percentage).',
`minpricegreen` int(11) DEFAULT '800' COMMENT 'Minimum price of Green items (percentage).',
`maxpricegreen` int(11) DEFAULT '1400' COMMENT 'Maximum price of Green items (percentage).',
`minpriceblue` int(11) DEFAULT '1250' COMMENT 'Minimum price of Blue items (percentage).',
`maxpriceblue` int(11) DEFAULT '1750' COMMENT 'Maximum price of Blue items (percentage).',
`minpricepurple` int(11) DEFAULT '2250' COMMENT 'Minimum price of Purple items (percentage).',
`maxpricepurple` int(11) DEFAULT '4550' COMMENT 'Maximum price of Purple items (percentage).',
`minpriceorange` int(11) DEFAULT '3250' COMMENT 'Minimum price of Orange items (percentage).',
`maxpriceorange` int(11) DEFAULT '5550' COMMENT 'Maximum price of Orange items (percentage).',
`minpriceyellow` int(11) DEFAULT '5250' COMMENT 'Minimum price of Yellow items (percentage).',
`maxpriceyellow` int(11) DEFAULT '6550' COMMENT 'Maximum price of Yellow items (percentage).',
`minbidpricegrey` int(11) DEFAULT '70' COMMENT 'Starting bid price of Grey items as a percentage of the randomly chosen buyout price. Default: 70',
`maxbidpricegrey` int(11) DEFAULT '100' COMMENT 'Starting bid price of Grey items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpricewhite` int(11) DEFAULT '70' COMMENT 'Starting bid price of White items as a percentage of the randomly chosen buyout price. Default: 70',
`maxbidpricewhite` int(11) DEFAULT '100' COMMENT 'Starting bid price of White items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpricegreen` int(11) DEFAULT '80' COMMENT 'Starting bid price of Green items as a percentage of the randomly chosen buyout price. Default: 80',
`maxbidpricegreen` int(11) DEFAULT '100' COMMENT 'Starting bid price of Green items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpriceblue` int(11) DEFAULT '75' COMMENT 'Starting bid price of Blue items as a percentage of the randomly chosen buyout price. Default: 75',
`maxbidpriceblue` int(11) DEFAULT '100' COMMENT 'Starting bid price of Blue items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpricepurple` int(11) DEFAULT '80' COMMENT 'Starting bid price of Purple items as a percentage of the randomly chosen buyout price. Default: 80',
`maxbidpricepurple` int(11) DEFAULT '100' COMMENT 'Starting bid price of Purple items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpriceorange` int(11) DEFAULT '80' COMMENT 'Starting bid price of Orange items as a percentage of the randomly chosen buyout price. Default: 80',
`maxbidpriceorange` int(11) DEFAULT '100' COMMENT 'Starting bid price of Orange items as a percentage of the randomly chosen buyout price. Default: 100',
`minbidpriceyellow` int(11) DEFAULT '80' COMMENT 'Starting bid price of Yellow items as a percentage of the randomly chosen buyout price. Default: 80',
`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 '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',
`buyerpriceblue` int(11) DEFAULT '12' COMMENT 'Multiplier to vendorprice when buying blue items from auctionhouse',
`buyerpricepurple` int(11) DEFAULT '15' COMMENT 'Multiplier to vendorprice when buying purple items from auctionhouse',
`buyerpriceorange` int(11) DEFAULT '20' COMMENT 'Multiplier to vendorprice when buying orange items from auctionhouse',
`buyerpriceyellow` int(11) DEFAULT '22' COMMENT 'Multiplier to vendorprice when buying yellow items from auctionhouse',
`buyerbiddinginterval` int(11) DEFAULT '1' COMMENT 'Interval how frequently AHB bids on each AH. Time in minutes',
`buyerbidsperinterval` int(11) DEFAULT '1' COMMENT 'number of bids to put in per bidding interval',
PRIMARY KEY (`auctionhouse`)
@@ -58,11 +16,11 @@ CREATE TABLE `mod_auctionhousebot_disabled_items` (
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
-- AHBot auctionhouse configuration
INSERT INTO `mod_auctionhousebot` (`auctionhouse`, `name`, `minitems`, `maxitems`, `minpricegrey`, `maxpricegrey`, `minpricewhite`, `maxpricewhite`, `minpricegreen`, `maxpricegreen`, `minpriceblue`, `maxpriceblue`, `minpricepurple`, `maxpricepurple`, `minpriceorange`, `maxpriceorange`, `minpriceyellow`, `maxpriceyellow`, `minbidpricegrey`, `maxbidpricegrey`, `minbidpricewhite`, `maxbidpricewhite`, `minbidpricegreen`, `maxbidpricegreen`, `minbidpriceblue`, `maxbidpriceblue`, `minbidpricepurple`, `maxbidpricepurple`, `minbidpriceorange`, `maxbidpriceorange`, `minbidpriceyellow`, `maxbidpriceyellow`, `maxstackgrey`, `maxstackwhite`, `maxstackgreen`, `maxstackblue`, `maxstackpurple`, `maxstackorange`, `maxstackyellow`, `buyerpricegrey`, `buyerpricewhite`, `buyerpricegreen`, `buyerpriceblue`, `buyerpricepurple`, `buyerpriceorange`, `buyerpriceyellow`, `buyerbiddinginterval`, `buyerbidsperinterval`)
INSERT INTO `mod_auctionhousebot` (`auctionhouse`, `name`, `minitems`, `maxitems`, `buyerbiddinginterval`, `buyerbidsperinterval`)
VALUES
(2,'Alliance',10000,10000,100,150,150,250,800,1400,1250,1750,2250,4550,3250,5550,5250,6550,70,100,70,100,80,100,75,100,80,100,80,100,80,100,0,0,3,2,1,1,1,1,3,5,12,15,20,22,1,1),
(6,'Horde',10000,10000,100,150,150,250,800,1400,1250,1750,2250,4550,3250,5550,5250,6550,70,100,70,100,80,100,75,100,80,100,80,100,80,100,0,0,3,2,1,1,1,1,3,5,12,15,20,22,1,1),
(7,'Neutral',10000,10000,100,150,150,250,800,1400,1250,1750,2250,4550,3250,5550,5250,6550,70,100,70,100,80,100,75,100,80,100,80,100,80,100,0,0,3,2,1,1,1,1,3,5,12,15,20,22,1,1);
(2,'Alliance',10000,10000,1,1),
(6,'Horde',10000,10000,1,1),
(7,'Neutral',10000,10000,1,1);
-- Items unavailable to players
INSERT INTO `mod_auctionhousebot_disabled_items`
@@ -351,4 +309,4 @@ VALUES
(53501), (53502), (53503), (53504), (53505), (53506), (53507), (53508), (53509), (54592), (50315), (50318), (50319), (52567), (50815), (53889),
(53890), (54069), (54860), (50840), (53891), (53924), (51997), (51998), (54847), (54857), (56806), (54212), (54452), (54810), (50093), (54822),
(50289), (50301), (50307), (52189), (52202), (52272), (52275), (52276), (52345), (52562), (52563), (52565), (52729), (53510), (54218), (54455),
(54467), (50248), (50431), (52011), (52062), (54291), (54470);
(54467), (50248), (50431), (52011), (52062), (54291), (54470), (38082), (51809);

View File

@@ -1 +0,0 @@
UPDATE mod_auctionhousebot SET minitems = 20000, maxitems = 20000 WHERE auctionhouse < 10;

View File

@@ -892,54 +892,6 @@ void AuctionHouseBot::Commands(uint32 command, uint32 ahMapID, uint32 col, char*
WorldDatabase.CommitTransaction(trans);
}
break;
case 6: //min prices
{
char * param1 = strtok(args, " ");
uint32 minPrice = (uint32) strtoul(param1, NULL, 0);
WorldDatabase.Execute("UPDATE mod_auctionhousebot SET minprice{} = '{}' WHERE auctionhouse = '{}'", color, minPrice, ahMapID);
config->SetMinPrice(col, minPrice);
}
break;
case 7: //max prices
{
char * param1 = strtok(args, " ");
uint32 maxPrice = (uint32) strtoul(param1, NULL, 0);
WorldDatabase.Execute("UPDATE mod_auctionhousebot SET maxprice{} = '{}' WHERE auctionhouse = '{}'", color, maxPrice, ahMapID);
config->SetMaxPrice(col, maxPrice);
}
break;
case 8: //min bid price
{
char * param1 = strtok(args, " ");
uint32 minBidPrice = (uint32) strtoul(param1, NULL, 0);
WorldDatabase.Execute("UPDATE mod_auctionhousebot SET minbidprice{} = '{}' WHERE auctionhouse = '{}'", color, minBidPrice, ahMapID);
config->SetMinBidPrice(col, minBidPrice);
}
break;
case 9: //max bid price
{
char * param1 = strtok(args, " ");
uint32 maxBidPrice = (uint32) strtoul(param1, NULL, 0);
WorldDatabase.Execute("UPDATE mod_auctionhousebot SET maxbidprice{} = '{}' WHERE auctionhouse = '{}'", color, maxBidPrice, ahMapID);
config->SetMaxBidPrice(col, maxBidPrice);
}
break;
case 10: //max stacks
{
char * param1 = strtok(args, " ");
uint32 maxStack = (uint32) strtoul(param1, NULL, 0);
WorldDatabase.Execute("UPDATE mod_auctionhousebot SET maxstack{} = '{}' WHERE auctionhouse = '{}'", color, maxStack, ahMapID);
config->SetMaxStack(col, maxStack);
}
break;
case 11: //buyer bid prices
{
char * param1 = strtok(args, " ");
uint32 buyerPrice = (uint32) strtoul(param1, NULL, 0);
WorldDatabase.Execute("UPDATE mod_auctionhousebot SET buyerprice{} = '{}' WHERE auctionhouse = '{}'", color, buyerPrice, ahMapID);
config->SetBuyerPrice(col, buyerPrice);
}
break;
case 12: //buyer bidding interval
{
char * param1 = strtok(args, " ");
@@ -971,109 +923,21 @@ void AuctionHouseBot::LoadValues(AHBConfig *config)
//load min and max items
config->SetMinItems(WorldDatabase.Query("SELECT minitems FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxItems(WorldDatabase.Query("SELECT maxitems FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
//load min and max prices
config->SetMinPrice(AHB_GREY, WorldDatabase.Query("SELECT minpricegrey FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxPrice(AHB_GREY, WorldDatabase.Query("SELECT maxpricegrey FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMinPrice(AHB_WHITE, WorldDatabase.Query("SELECT minpricewhite FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxPrice(AHB_WHITE, WorldDatabase.Query("SELECT maxpricewhite FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMinPrice(AHB_GREEN, WorldDatabase.Query("SELECT minpricegreen FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxPrice(AHB_GREEN, WorldDatabase.Query("SELECT maxpricegreen FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMinPrice(AHB_BLUE, WorldDatabase.Query("SELECT minpriceblue FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxPrice(AHB_BLUE, WorldDatabase.Query("SELECT maxpriceblue FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMinPrice(AHB_PURPLE, WorldDatabase.Query("SELECT minpricepurple FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxPrice(AHB_PURPLE, WorldDatabase.Query("SELECT maxpricepurple FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMinPrice(AHB_ORANGE, WorldDatabase.Query("SELECT minpriceorange FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxPrice(AHB_ORANGE, WorldDatabase.Query("SELECT maxpriceorange FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMinPrice(AHB_YELLOW, WorldDatabase.Query("SELECT minpriceyellow FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxPrice(AHB_YELLOW, WorldDatabase.Query("SELECT maxpriceyellow FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
//load min and max bid prices
config->SetMinBidPrice(AHB_GREY, WorldDatabase.Query("SELECT minbidpricegrey FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxBidPrice(AHB_GREY, WorldDatabase.Query("SELECT maxbidpricegrey FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMinBidPrice(AHB_WHITE, WorldDatabase.Query("SELECT minbidpricewhite FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxBidPrice(AHB_WHITE, WorldDatabase.Query("SELECT maxbidpricewhite FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMinBidPrice(AHB_GREEN, WorldDatabase.Query("SELECT minbidpricegreen FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxBidPrice(AHB_GREEN, WorldDatabase.Query("SELECT maxbidpricegreen FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMinBidPrice(AHB_BLUE, WorldDatabase.Query("SELECT minbidpriceblue FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxBidPrice(AHB_BLUE, WorldDatabase.Query("SELECT maxbidpriceblue FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMinBidPrice(AHB_PURPLE, WorldDatabase.Query("SELECT minbidpricepurple FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxBidPrice(AHB_PURPLE, WorldDatabase.Query("SELECT maxbidpricepurple FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMinBidPrice(AHB_ORANGE, WorldDatabase.Query("SELECT minbidpriceorange FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxBidPrice(AHB_ORANGE, WorldDatabase.Query("SELECT maxbidpriceorange FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMinBidPrice(AHB_YELLOW, WorldDatabase.Query("SELECT minbidpriceyellow FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxBidPrice(AHB_YELLOW, WorldDatabase.Query("SELECT maxbidpriceyellow FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
//load max stacks
config->SetMaxStack(AHB_GREY, WorldDatabase.Query("SELECT maxstackgrey FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxStack(AHB_WHITE, WorldDatabase.Query("SELECT maxstackwhite FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxStack(AHB_GREEN, WorldDatabase.Query("SELECT maxstackgreen FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxStack(AHB_BLUE, WorldDatabase.Query("SELECT maxstackblue FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxStack(AHB_PURPLE, WorldDatabase.Query("SELECT maxstackpurple FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxStack(AHB_ORANGE, WorldDatabase.Query("SELECT maxstackorange FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetMaxStack(AHB_YELLOW, WorldDatabase.Query("SELECT maxstackyellow FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
if (debug_Out)
{
LOG_ERROR("module", "minItems = {}", config->GetMinItems());
LOG_ERROR("module", "maxItems = {}", config->GetMaxItems());
LOG_ERROR("module", "minPriceGrey = {}", config->GetMinPrice(AHB_GREY));
LOG_ERROR("module", "maxPriceGrey = {}", config->GetMaxPrice(AHB_GREY));
LOG_ERROR("module", "minPriceWhite = {}", config->GetMinPrice(AHB_WHITE));
LOG_ERROR("module", "maxPriceWhite = {}", config->GetMaxPrice(AHB_WHITE));
LOG_ERROR("module", "minPriceGreen = {}", config->GetMinPrice(AHB_GREEN));
LOG_ERROR("module", "maxPriceGreen = {}", config->GetMaxPrice(AHB_GREEN));
LOG_ERROR("module", "minPriceBlue = {}", config->GetMinPrice(AHB_BLUE));
LOG_ERROR("module", "maxPriceBlue = {}", config->GetMaxPrice(AHB_BLUE));
LOG_ERROR("module", "minPricePurple = {}", config->GetMinPrice(AHB_PURPLE));
LOG_ERROR("module", "maxPricePurple = {}", config->GetMaxPrice(AHB_PURPLE));
LOG_ERROR("module", "minPriceOrange = {}", config->GetMinPrice(AHB_ORANGE));
LOG_ERROR("module", "maxPriceOrange = {}", config->GetMaxPrice(AHB_ORANGE));
LOG_ERROR("module", "minPriceYellow = {}", config->GetMinPrice(AHB_YELLOW));
LOG_ERROR("module", "maxPriceYellow = {}", config->GetMaxPrice(AHB_YELLOW));
LOG_ERROR("module", "minBidPriceGrey = {}", config->GetMinBidPrice(AHB_GREY));
LOG_ERROR("module", "maxBidPriceGrey = {}", config->GetMaxBidPrice(AHB_GREY));
LOG_ERROR("module", "minBidPriceWhite = {}", config->GetMinBidPrice(AHB_WHITE));
LOG_ERROR("module", "maxBidPriceWhite = {}", config->GetMaxBidPrice(AHB_WHITE));
LOG_ERROR("module", "minBidPriceGreen = {}", config->GetMinBidPrice(AHB_GREEN));
LOG_ERROR("module", "maxBidPriceGreen = {}", config->GetMaxBidPrice(AHB_GREEN));
LOG_ERROR("module", "minBidPriceBlue = {}", config->GetMinBidPrice(AHB_BLUE));
LOG_ERROR("module", "maxBidPriceBlue = {}", config->GetMinBidPrice(AHB_BLUE));
LOG_ERROR("module", "minBidPricePurple = {}", config->GetMinBidPrice(AHB_PURPLE));
LOG_ERROR("module", "maxBidPricePurple = {}", config->GetMaxBidPrice(AHB_PURPLE));
LOG_ERROR("module", "minBidPriceOrange = {}", config->GetMinBidPrice(AHB_ORANGE));
LOG_ERROR("module", "maxBidPriceOrange = {}", config->GetMaxBidPrice(AHB_ORANGE));
LOG_ERROR("module", "minBidPriceYellow = {}", config->GetMinBidPrice(AHB_YELLOW));
LOG_ERROR("module", "maxBidPriceYellow = {}", config->GetMaxBidPrice(AHB_YELLOW));
LOG_ERROR("module", "maxStackGrey = {}", config->GetMaxStack(AHB_GREY));
LOG_ERROR("module", "maxStackWhite = {}", config->GetMaxStack(AHB_WHITE));
LOG_ERROR("module", "maxStackGreen = {}", config->GetMaxStack(AHB_GREEN));
LOG_ERROR("module", "maxStackBlue = {}", config->GetMaxStack(AHB_BLUE));
LOG_ERROR("module", "maxStackPurple = {}", config->GetMaxStack(AHB_PURPLE));
LOG_ERROR("module", "maxStackOrange = {}", config->GetMaxStack(AHB_ORANGE));
LOG_ERROR("module", "maxStackYellow = {}", config->GetMaxStack(AHB_YELLOW));
}
}
if (AHBBuyer)
{
//load buyer bid prices
config->SetBuyerPrice(AHB_GREY, WorldDatabase.Query("SELECT buyerpricegrey FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetBuyerPrice(AHB_WHITE, WorldDatabase.Query("SELECT buyerpricewhite FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetBuyerPrice(AHB_GREEN, WorldDatabase.Query("SELECT buyerpricegreen FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetBuyerPrice(AHB_BLUE, WorldDatabase.Query("SELECT buyerpriceblue FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetBuyerPrice(AHB_PURPLE, WorldDatabase.Query("SELECT buyerpricepurple FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetBuyerPrice(AHB_ORANGE, WorldDatabase.Query("SELECT buyerpriceorange FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
config->SetBuyerPrice(AHB_YELLOW, WorldDatabase.Query("SELECT buyerpriceyellow FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
//load bidding interval
config->SetBiddingInterval(WorldDatabase.Query("SELECT buyerbiddinginterval FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
//load bids per interval
config->SetBidsPerInterval(WorldDatabase.Query("SELECT buyerbidsperinterval FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>());
if (debug_Out)
{
LOG_ERROR("module", "buyerPriceGrey = {}", config->GetBuyerPrice(AHB_GREY));
LOG_ERROR("module", "buyerPriceWhite = {}", config->GetBuyerPrice(AHB_WHITE));
LOG_ERROR("module", "buyerPriceGreen = {}", config->GetBuyerPrice(AHB_GREEN));
LOG_ERROR("module", "buyerPriceBlue = {}", config->GetBuyerPrice(AHB_BLUE));
LOG_ERROR("module", "buyerPricePurple = {}", config->GetBuyerPrice(AHB_PURPLE));
LOG_ERROR("module", "buyerPriceOrange = {}", config->GetBuyerPrice(AHB_ORANGE));
LOG_ERROR("module", "buyerPriceYellow = {}", config->GetBuyerPrice(AHB_YELLOW));
LOG_ERROR("module", "buyerBiddingInterval = {}", config->GetBiddingInterval());
LOG_ERROR("module", "buyerBidsPerInterval = {}", config->GetBidsPerInterval());
}

View File

@@ -62,49 +62,7 @@ private:
uint32 AHFID;
uint32 minItems;
uint32 maxItems;
uint32 minPriceGrey;
uint32 maxPriceGrey;
uint32 minBidPriceGrey;
uint32 maxBidPriceGrey;
uint32 maxStackGrey;
uint32 minPriceWhite;
uint32 maxPriceWhite;
uint32 minBidPriceWhite;
uint32 maxBidPriceWhite;
uint32 maxStackWhite;
uint32 minPriceGreen;
uint32 maxPriceGreen;
uint32 minBidPriceGreen;
uint32 maxBidPriceGreen;
uint32 maxStackGreen;
uint32 minPriceBlue;
uint32 maxPriceBlue;
uint32 minBidPriceBlue;
uint32 maxBidPriceBlue;
uint32 maxStackBlue;
uint32 minPricePurple;
uint32 maxPricePurple;
uint32 minBidPricePurple;
uint32 maxBidPricePurple;
uint32 maxStackPurple;
uint32 minPriceOrange;
uint32 maxPriceOrange;
uint32 minBidPriceOrange;
uint32 maxBidPriceOrange;
uint32 maxStackOrange;
uint32 minPriceYellow;
uint32 maxPriceYellow;
uint32 minBidPriceYellow;
uint32 maxBidPriceYellow;
uint32 maxStackYellow;
uint32 buyerPriceGrey;
uint32 buyerPriceWhite;
uint32 buyerPriceGreen;
uint32 buyerPriceBlue;
uint32 buyerPricePurple;
uint32 buyerPriceOrange;
uint32 buyerPriceYellow;
uint32 buyerBiddingInterval;
uint32 buyerBidsPerInterval;
@@ -163,539 +121,6 @@ public:
return maxItems;
}
void SetMinPrice(uint32 color, uint32 value)
{
switch(color)
{
case AHB_GREY:
minPriceGrey = value;
break;
case AHB_WHITE:
minPriceWhite = value;
break;
case AHB_GREEN:
minPriceGreen = value;
break;
case AHB_BLUE:
minPriceBlue = value;
break;
case AHB_PURPLE:
minPricePurple = value;
break;
case AHB_ORANGE:
minPriceOrange = value;
break;
case AHB_YELLOW:
minPriceYellow = value;
break;
default:
break;
}
}
uint32 GetMinPrice(uint32 color)
{
switch(color)
{
case AHB_GREY:
{
if (minPriceGrey == 0)
return 100;
else if (minPriceGrey > maxPriceGrey)
return maxPriceGrey;
else
return minPriceGrey;
break;
}
case AHB_WHITE:
{
if (minPriceWhite == 0)
return 150;
else if (minPriceWhite > maxPriceWhite)
return maxPriceWhite;
else
return minPriceWhite;
break;
}
case AHB_GREEN:
{
if (minPriceGreen == 0)
return 200;
else if (minPriceGreen > maxPriceGreen)
return maxPriceGreen;
else
return minPriceGreen;
break;
}
case AHB_BLUE:
{
if (minPriceBlue == 0)
return 250;
else if (minPriceBlue > maxPriceBlue)
return maxPriceBlue;
else
return minPriceBlue;
break;
}
case AHB_PURPLE:
{
if (minPricePurple == 0)
return 300;
else if (minPricePurple > maxPricePurple)
return maxPricePurple;
else
return minPricePurple;
break;
}
case AHB_ORANGE:
{
if (minPriceOrange == 0)
return 400;
else if (minPriceOrange > maxPriceOrange)
return maxPriceOrange;
else
return minPriceOrange;
break;
}
case AHB_YELLOW:
{
if (minPriceYellow == 0)
return 500;
else if (minPriceYellow > maxPriceYellow)
return maxPriceYellow;
else
return minPriceYellow;
break;
}
default:
{
return 0;
break;
}
}
}
void SetMaxPrice(uint32 color, uint32 value)
{
switch(color)
{
case AHB_GREY:
maxPriceGrey = value;
break;
case AHB_WHITE:
maxPriceWhite = value;
break;
case AHB_GREEN:
maxPriceGreen = value;
break;
case AHB_BLUE:
maxPriceBlue = value;
break;
case AHB_PURPLE:
maxPricePurple = value;
break;
case AHB_ORANGE:
maxPriceOrange = value;
break;
case AHB_YELLOW:
maxPriceYellow = value;
break;
default:
break;
}
}
uint32 GetMaxPrice(uint32 color)
{
switch(color)
{
case AHB_GREY:
{
if (maxPriceGrey == 0)
return 150;
else
return maxPriceGrey;
break;
}
case AHB_WHITE:
{
if (maxPriceWhite == 0)
return 250;
else
return maxPriceWhite;
break;
}
case AHB_GREEN:
{
if (maxPriceGreen == 0)
return 300;
else
return maxPriceGreen;
break;
}
case AHB_BLUE:
{
if (maxPriceBlue == 0)
return 350;
else
return maxPriceBlue;
break;
}
case AHB_PURPLE:
{
if (maxPricePurple == 0)
return 450;
else
return maxPricePurple;
break;
}
case AHB_ORANGE:
{
if (maxPriceOrange == 0)
return 550;
else
return maxPriceOrange;
break;
}
case AHB_YELLOW:
{
if (maxPriceYellow == 0)
return 650;
else
return maxPriceYellow;
break;
}
default:
{
return 0;
break;
}
}
}
void SetMinBidPrice(uint32 color, uint32 value)
{
switch(color)
{
case AHB_GREY:
minBidPriceGrey = value;
break;
case AHB_WHITE:
minBidPriceWhite = value;
break;
case AHB_GREEN:
minBidPriceGreen = value;
break;
case AHB_BLUE:
minBidPriceBlue = value;
break;
case AHB_PURPLE:
minBidPricePurple = value;
break;
case AHB_ORANGE:
minBidPriceOrange = value;
break;
case AHB_YELLOW:
minBidPriceYellow = value;
break;
default:
break;
}
}
uint32 GetMinBidPrice(uint32 color)
{
switch(color)
{
case AHB_GREY:
{
if (minBidPriceGrey > 100)
return 100;
else
return minBidPriceGrey;
break;
}
case AHB_WHITE:
{
if (minBidPriceWhite > 100)
return 100;
else
return minBidPriceWhite;
break;
}
case AHB_GREEN:
{
if (minBidPriceGreen > 100)
return 100;
else
return minBidPriceGreen;
break;
}
case AHB_BLUE:
{
if (minBidPriceBlue > 100)
return 100;
else
return minBidPriceBlue;
break;
}
case AHB_PURPLE:
{
if (minBidPricePurple > 100)
return 100;
else
return minBidPricePurple;
break;
}
case AHB_ORANGE:
{
if (minBidPriceOrange > 100)
return 100;
else
return minBidPriceOrange;
break;
}
case AHB_YELLOW:
{
if (minBidPriceYellow > 100)
return 100;
else
return minBidPriceYellow;
break;
}
default:
{
return 0;
break;
}
}
}
void SetMaxBidPrice(uint32 color, uint32 value)
{
switch(color)
{
case AHB_GREY:
maxBidPriceGrey = value;
break;
case AHB_WHITE:
maxBidPriceWhite = value;
break;
case AHB_GREEN:
maxBidPriceGreen = value;
break;
case AHB_BLUE:
maxBidPriceBlue = value;
break;
case AHB_PURPLE:
maxBidPricePurple = value;
break;
case AHB_ORANGE:
maxBidPriceOrange = value;
break;
case AHB_YELLOW:
maxBidPriceYellow = value;
break;
default:
break;
}
}
uint32 GetMaxBidPrice(uint32 color)
{
switch(color)
{
case AHB_GREY:
{
if (maxBidPriceGrey > 100)
return 100;
else
return maxBidPriceGrey;
break;
}
case AHB_WHITE:
{
if (maxBidPriceWhite > 100)
return 100;
else
return maxBidPriceWhite;
break;
}
case AHB_GREEN:
{
if (maxBidPriceGreen > 100)
return 100;
else
return maxBidPriceGreen;
break;
}
case AHB_BLUE:
{
if (maxBidPriceBlue > 100)
return 100;
else
return maxBidPriceBlue;
break;
}
case AHB_PURPLE:
{
if (maxBidPricePurple > 100)
return 100;
else
return maxBidPricePurple;
break;
}
case AHB_ORANGE:
{
if (maxBidPriceOrange > 100)
return 100;
else
return maxBidPriceOrange;
break;
}
case AHB_YELLOW:
{
if (maxBidPriceYellow > 100)
return 100;
else
return maxBidPriceYellow;
break;
}
default:
{
return 0;
break;
}
}
}
void SetMaxStack(uint32 color, uint32 value)
{
switch(color)
{
case AHB_GREY:
maxStackGrey = value;
break;
case AHB_WHITE:
maxStackWhite = value;
break;
case AHB_GREEN:
maxStackGreen = value;
break;
case AHB_BLUE:
maxStackBlue = value;
break;
case AHB_PURPLE:
maxStackPurple = value;
break;
case AHB_ORANGE:
maxStackOrange = value;
break;
case AHB_YELLOW:
maxStackYellow = value;
break;
default:
break;
}
}
uint32 GetMaxStack(uint32 color)
{
switch(color)
{
case AHB_GREY:
{
return maxStackGrey;
break;
}
case AHB_WHITE:
{
return maxStackWhite;
break;
}
case AHB_GREEN:
{
return maxStackGreen;
break;
}
case AHB_BLUE:
{
return maxStackBlue;
break;
}
case AHB_PURPLE:
{
return maxStackPurple;
break;
}
case AHB_ORANGE:
{
return maxStackOrange;
break;
}
case AHB_YELLOW:
{
return maxStackYellow;
break;
}
default:
{
return 0;
break;
}
}
}
void SetBuyerPrice(uint32 color, uint32 value)
{
switch(color)
{
case AHB_GREY:
buyerPriceGrey = value;
break;
case AHB_WHITE:
buyerPriceWhite = value;
break;
case AHB_GREEN:
buyerPriceGreen = value;
break;
case AHB_BLUE:
buyerPriceBlue = value;
break;
case AHB_PURPLE:
buyerPricePurple = value;
break;
case AHB_ORANGE:
buyerPriceOrange = value;
break;
case AHB_YELLOW:
buyerPriceYellow = value;
break;
default:
break;
}
}
uint32 GetBuyerPrice(uint32 color)
{
switch(color)
{
case AHB_GREY:
return buyerPriceGrey;
break;
case AHB_WHITE:
return buyerPriceWhite;
break;
case AHB_GREEN:
return buyerPriceGreen;
break;
case AHB_BLUE:
return buyerPriceBlue;
break;
case AHB_PURPLE:
return buyerPricePurple;
break;
case AHB_ORANGE:
return buyerPriceOrange;
break;
case AHB_YELLOW:
return buyerPriceYellow;
break;
default:
return 0;
break;
}
}
void SetBiddingInterval(uint32 value)
{
buyerBiddingInterval = value;