mirror of
https://github.com/NathanHandley/mod-ah-bot-plus.git
synced 2026-01-13 01:08:37 +00:00
Removed Min/max stack and price from database and config
This commit is contained in:
@@ -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());
|
||||
}
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user