Remove Unused Percent and Disabled Code

This commit is contained in:
NathanHandley
2023-11-13 19:12:42 -06:00
parent 4d17352994
commit 5690cb0082
2 changed files with 4 additions and 651 deletions

View File

@@ -52,45 +52,6 @@ AuctionHouseBot::AuctionHouseBot()
Bind_When_Use = false;
Bind_Quest_Item = false;
DisablePermEnchant = false;
DisableConjured = false;
DisableGems = false;
DisableMoney = false;
DisableMoneyLoot = false;
DisableLootable = false;
DisableKeys = false;
DisableDuration = false;
DisableBOP_Or_Quest_NoReqLevel = false;
DisableWarriorItems = false;
DisablePaladinItems = false;
DisableHunterItems = false;
DisableRogueItems = false;
DisablePriestItems = false;
DisableDKItems = false;
DisableShamanItems = false;
DisableMageItems = false;
DisableWarlockItems = false;
DisableUnusedClassItems = false;
DisableDruidItems = false;
DisableItemsBelowLevel = 0;
DisableItemsAboveLevel = 0;
DisableTGsBelowLevel = 0;
DisableTGsAboveLevel = 0;
DisableItemsBelowGUID = 0;
DisableItemsAboveGUID = 0;
DisableTGsBelowGUID = 0;
DisableTGsAboveGUID = 0;
DisableItemsBelowReqLevel = 0;
DisableItemsAboveReqLevel = 0;
DisableTGsBelowReqLevel = 0;
DisableTGsAboveReqLevel = 0;
DisableItemsBelowReqSkillRank = 0;
DisableItemsAboveReqSkillRank = 0;
DisableTGsBelowReqSkillRank = 0;
DisableTGsAboveReqSkillRank = 0;
//End Filters
_lastrun_a = time(NULL);
@@ -643,7 +604,7 @@ void AuctionHouseBot::Initialize()
}
// Disable money
if ((DisableMoney) && (itr->second.Class == ITEM_CLASS_MONEY))
if (itr->second.Class == ITEM_CLASS_MONEY)
{
if (debug_Out_Filters)
LOG_ERROR("module", "AuctionHouseBot: Item {} disabled (Money)", itr->second.ItemId);
@@ -651,7 +612,7 @@ void AuctionHouseBot::Initialize()
}
// Disable moneyloot
if ((DisableMoneyLoot) && (itr->second.MinMoneyLoot > 0))
if (itr->second.MinMoneyLoot > 0)
{
if (debug_Out_Filters)
LOG_ERROR("module", "AuctionHouseBot: Item {} disabled (MoneyLoot)", itr->second.ItemId);
@@ -749,45 +710,6 @@ void AuctionHouseBot::InitializeConfiguration()
Bind_When_Equipped = sConfigMgr->GetOption<bool>("AuctionHouseBot.Bind_When_Equipped", true);
Bind_When_Use = sConfigMgr->GetOption<bool>("AuctionHouseBot.Bind_When_Use", true);
Bind_Quest_Item = sConfigMgr->GetOption<bool>("AuctionHouseBot.Bind_Quest_Item", false);
DisablePermEnchant = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisablePermEnchant", false);
DisableConjured = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableConjured", false);
DisableGems = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableGems", false);
DisableMoney = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableMoney", false);
DisableMoneyLoot = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableMoneyLoot", false);
DisableLootable = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableLootable", false);
DisableKeys = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableKeys", false);
DisableDuration = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableDuration", false);
DisableBOP_Or_Quest_NoReqLevel = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableBOP_Or_Quest_NoReqLevel", false);
DisableWarriorItems = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableWarriorItems", false);
DisablePaladinItems = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisablePaladinItems", false);
DisableHunterItems = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableHunterItems", false);
DisableRogueItems = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableRogueItems", false);
DisablePriestItems = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisablePriestItems", false);
DisableDKItems = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableDKItems", false);
DisableShamanItems = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableShamanItems", false);
DisableMageItems = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableMageItems", false);
DisableWarlockItems = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableWarlockItems", false);
DisableUnusedClassItems = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableUnusedClassItems", false);
DisableDruidItems = sConfigMgr->GetOption<bool>("AuctionHouseBot.DisableDruidItems", false);
DisableItemsBelowLevel = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DisableItemsBelowLevel", 0);
DisableItemsAboveLevel = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DisableItemsAboveLevel", 0);
DisableTGsBelowLevel = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DisableTGsBelowLevel", 0);
DisableTGsAboveLevel = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DisableTGsAboveLevel", 0);
DisableItemsBelowGUID = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DisableItemsBelowGUID", 0);
DisableItemsAboveGUID = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DisableItemsAboveGUID", 0);
DisableTGsBelowGUID = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DisableTGsBelowGUID", 0);
DisableTGsAboveGUID = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DisableTGsAboveGUID", 0);
DisableItemsBelowReqLevel = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DisableItemsBelowReqLevel", 0);
DisableItemsAboveReqLevel = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DisableItemsAboveReqLevel", 0);
DisableTGsBelowReqLevel = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DisableTGsBelowReqLevel", 0);
DisableTGsAboveReqLevel = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DisableTGsAboveReqLevel", 0);
DisableItemsBelowReqSkillRank = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DisableItemsBelowReqSkillRank", 0);
DisableItemsAboveReqSkillRank = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DisableItemsAboveReqSkillRank", 0);
DisableTGsBelowReqSkillRank = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DisableTGsBelowReqSkillRank", 0);
DisableTGsAboveReqSkillRank = sConfigMgr->GetOption<uint32>("AuctionHouseBot.DisableTGsAboveReqSkillRank", 0);
}
void AuctionHouseBot::IncrementItemCounts(AuctionEntry* ah)
@@ -833,8 +755,6 @@ void AuctionHouseBot::IncrementItemCounts(AuctionEntry* ah)
LOG_ERROR("module", "AHBot: {} returned as House Faction. Neutral", ah->GetHouseId());
config = &NeutralConfig;
}
config->IncItemCounts(prototype->Class, prototype->Quality);
}
void AuctionHouseBot::DecrementItemCounts(AuctionEntry* ah, uint32 itemEntry)
@@ -869,8 +789,6 @@ void AuctionHouseBot::DecrementItemCounts(AuctionEntry* ah, uint32 itemEntry)
LOG_ERROR("module", "AHBot: {} returned as House Faction. Neutral", ah->GetHouseId());
config = &NeutralConfig;
}
config->DecItemCounts(prototype->Class, prototype->Quality);
}
void AuctionHouseBot::Commands(uint32 command, uint32 ahMapID, uint32 col, char* args)
@@ -951,7 +869,6 @@ void AuctionHouseBot::Commands(uint32 command, uint32 ahMapID, uint32 col, char*
uint32 maxItems = (uint32) strtoul(param1, NULL, 0);
WorldDatabase.Execute("UPDATE mod_auctionhousebot SET maxitems = '{}' WHERE auctionhouse = '{}'", maxItems, ahMapID);
config->SetMaxItems(maxItems);
config->CalculatePercents();
}
break;
case 3: //min time Deprecated (Place holder for future commands)
@@ -1005,7 +922,6 @@ void AuctionHouseBot::Commands(uint32 command, uint32 ahMapID, uint32 col, char*
trans->Append("UPDATE mod_auctionhousebot SET percentorangeitems = '{}' WHERE auctionhouse = '{}'", orangei, ahMapID);
trans->Append("UPDATE mod_auctionhousebot SET percentyellowitems = '{}' WHERE auctionhouse = '{}'", yellowi, ahMapID);
WorldDatabase.CommitTransaction(trans);
config->SetPercentages(greytg, whitetg, greentg, bluetg, purpletg, orangetg, yellowtg, greyi, whitei, greeni, bluei, purplei, orangei, yellowi);
}
break;
case 6: //min prices
@@ -1102,7 +1018,6 @@ void AuctionHouseBot::LoadValues(AHBConfig *config)
uint32 purplei = WorldDatabase.Query("SELECT percentpurpleitems FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>();
uint32 orangei = WorldDatabase.Query("SELECT percentorangeitems FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>();
uint32 yellowi = WorldDatabase.Query("SELECT percentyellowitems FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<uint32>();
config->SetPercentages(greytg, whitetg, greentg, bluetg, purpletg, orangetg, yellowtg, greyi, whitei, greeni, bluei, purplei, orangei, yellowi);
//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>());
@@ -1145,20 +1060,6 @@ void AuctionHouseBot::LoadValues(AHBConfig *config)
{
LOG_ERROR("module", "minItems = {}", config->GetMinItems());
LOG_ERROR("module", "maxItems = {}", config->GetMaxItems());
LOG_ERROR("module", "percentGreyTradeGoods = {}", config->GetPercentages(AHB_GREY_TG));
LOG_ERROR("module", "percentWhiteTradeGoods = {}", config->GetPercentages(AHB_WHITE_TG));
LOG_ERROR("module", "percentGreenTradeGoods = {}", config->GetPercentages(AHB_GREEN_TG));
LOG_ERROR("module", "percentBlueTradeGoods = {}", config->GetPercentages(AHB_BLUE_TG));
LOG_ERROR("module", "percentPurpleTradeGoods = {}", config->GetPercentages(AHB_PURPLE_TG));
LOG_ERROR("module", "percentOrangeTradeGoods = {}", config->GetPercentages(AHB_ORANGE_TG));
LOG_ERROR("module", "percentYellowTradeGoods = {}", config->GetPercentages(AHB_YELLOW_TG));
LOG_ERROR("module", "percentGreyItems = {}", config->GetPercentages(AHB_GREY_I));
LOG_ERROR("module", "percentWhiteItems = {}", config->GetPercentages(AHB_WHITE_I));
LOG_ERROR("module", "percentGreenItems = {}", config->GetPercentages(AHB_GREEN_I));
LOG_ERROR("module", "percentBlueItems = {}", config->GetPercentages(AHB_BLUE_I));
LOG_ERROR("module", "percentPurpleItems = {}", config->GetPercentages(AHB_PURPLE_I));
LOG_ERROR("module", "percentOrangeItems = {}", config->GetPercentages(AHB_ORANGE_I));
LOG_ERROR("module", "percentYellowItems = {}", config->GetPercentages(AHB_YELLOW_I));
LOG_ERROR("module", "minPriceGrey = {}", config->GetMinPrice(AHB_GREY));
LOG_ERROR("module", "maxPriceGrey = {}", config->GetMaxPrice(AHB_GREY));
LOG_ERROR("module", "minPriceWhite = {}", config->GetMinPrice(AHB_WHITE));
@@ -1198,83 +1099,8 @@ void AuctionHouseBot::LoadValues(AHBConfig *config)
//AuctionHouseEntry const* ahEntry = sAuctionMgr->GetAuctionHouseEntry(config->GetAHFID());
AuctionHouseObject* auctionHouse = sAuctionMgr->GetAuctionsMap(config->GetAHFID());
config->ResetItemCounts();
uint32 auctions = auctionHouse->Getcount();
if (auctions)
{
for (AuctionHouseObject::AuctionEntryMap::const_iterator itr = auctionHouse->GetAuctionsBegin(); itr != auctionHouse->GetAuctionsEnd(); ++itr)
{
AuctionEntry *Aentry = itr->second;
Item *item = sAuctionMgr->GetAItem(Aentry->item_guid);
if (item)
{
ItemTemplate const *prototype = item->GetTemplate();
if (prototype)
{
switch (prototype->Quality)
{
case 0:
if (prototype->Class == ITEM_CLASS_TRADE_GOODS)
config->IncItemCounts(AHB_GREY_TG);
else
config->IncItemCounts(AHB_GREY_I);
break;
case 1:
if (prototype->Class == ITEM_CLASS_TRADE_GOODS)
config->IncItemCounts(AHB_WHITE_TG);
else
config->IncItemCounts(AHB_WHITE_I);
break;
case 2:
if (prototype->Class == ITEM_CLASS_TRADE_GOODS)
config->IncItemCounts(AHB_GREEN_TG);
else
config->IncItemCounts(AHB_GREEN_I);
break;
case 3:
if (prototype->Class == ITEM_CLASS_TRADE_GOODS)
config->IncItemCounts(AHB_BLUE_TG);
else
config->IncItemCounts(AHB_BLUE_I);
break;
case 4:
if (prototype->Class == ITEM_CLASS_TRADE_GOODS)
config->IncItemCounts(AHB_PURPLE_TG);
else
config->IncItemCounts(AHB_PURPLE_I);
break;
case 5:
if (prototype->Class == ITEM_CLASS_TRADE_GOODS)
config->IncItemCounts(AHB_ORANGE_TG);
else
config->IncItemCounts(AHB_ORANGE_I);
break;
case 6:
if (prototype->Class == ITEM_CLASS_TRADE_GOODS)
config->IncItemCounts(AHB_YELLOW_TG);
else
config->IncItemCounts(AHB_YELLOW_I);
break;
}
}
}
}
}
if (debug_Out)
{
LOG_ERROR("module", "Current Settings for {} Auctionhouses:", WorldDatabase.Query("SELECT name FROM mod_auctionhousebot WHERE auctionhouse = {}", config->GetAHID())->Fetch()->Get<std::string>());
LOG_ERROR("module", "Grey Trade Goods\t{}\tGrey Items\t{}", config->GetItemCounts(AHB_GREY_TG), config->GetItemCounts(AHB_GREY_I));
LOG_ERROR("module", "White Trade Goods\t{}\tWhite Items\t{}", config->GetItemCounts(AHB_WHITE_TG), config->GetItemCounts(AHB_WHITE_I));
LOG_ERROR("module", "Green Trade Goods\t{}\tGreen Items\t{}", config->GetItemCounts(AHB_GREEN_TG), config->GetItemCounts(AHB_GREEN_I));
LOG_ERROR("module", "Blue Trade Goods\t{}\tBlue Items\t{}", config->GetItemCounts(AHB_BLUE_TG), config->GetItemCounts(AHB_BLUE_I));
LOG_ERROR("module", "Purple Trade Goods\t{}\tPurple Items\t{}", config->GetItemCounts(AHB_PURPLE_TG), config->GetItemCounts(AHB_PURPLE_I));
LOG_ERROR("module", "Orange Trade Goods\t{}\tOrange Items\t{}", config->GetItemCounts(AHB_ORANGE_TG), config->GetItemCounts(AHB_ORANGE_I));
LOG_ERROR("module", "Yellow Trade Goods\t{}\tYellow Items\t{}", config->GetItemCounts(AHB_YELLOW_TG), config->GetItemCounts(AHB_YELLOW_I));
}
}
if (AHBBuyer)
{
//load buyer bid prices

View File

@@ -59,20 +59,6 @@ private:
uint32 AHFID;
uint32 minItems;
uint32 maxItems;
uint32 percentGreyTradeGoods;
uint32 percentWhiteTradeGoods;
uint32 percentGreenTradeGoods;
uint32 percentBlueTradeGoods;
uint32 percentPurpleTradeGoods;
uint32 percentOrangeTradeGoods;
uint32 percentYellowTradeGoods;
uint32 percentGreyItems;
uint32 percentWhiteItems;
uint32 percentGreenItems;
uint32 percentBlueItems;
uint32 percentPurpleItems;
uint32 percentOrangeItems;
uint32 percentYellowItems;
uint32 minPriceGrey;
uint32 maxPriceGrey;
uint32 minBidPriceGrey;
@@ -119,37 +105,6 @@ private:
uint32 buyerBiddingInterval;
uint32 buyerBidsPerInterval;
uint32 greytgp;
uint32 whitetgp;
uint32 greentgp;
uint32 bluetgp;
uint32 purpletgp;
uint32 orangetgp;
uint32 yellowtgp;
uint32 greyip;
uint32 whiteip;
uint32 greenip;
uint32 blueip;
uint32 purpleip;
uint32 orangeip;
uint32 yellowip;
uint32 greyTGoods;
uint32 whiteTGoods;
uint32 greenTGoods;
uint32 blueTGoods;
uint32 purpleTGoods;
uint32 orangeTGoods;
uint32 yellowTGoods;
uint32 greyItems;
uint32 whiteItems;
uint32 greenItems;
uint32 blueItems;
uint32 purpleItems;
uint32 orangeItems;
uint32 yellowItems;
public:
AHBConfig(uint32 ahid)
{
@@ -204,98 +159,7 @@ public:
{
return maxItems;
}
void SetPercentages(uint32 greytg, uint32 whitetg, uint32 greentg, uint32 bluetg, uint32 purpletg, uint32 orangetg, uint32 yellowtg, uint32 greyi, uint32 whitei, uint32 greeni, uint32 bluei, uint32 purplei, uint32 orangei, uint32 yellowi)
{
uint32 totalPercent = greytg + whitetg + greentg + bluetg + purpletg + orangetg + yellowtg + greyi + whitei + greeni + bluei + purplei + orangei + yellowi;
if (totalPercent == 0)
{
maxItems = 0;
}
else if (totalPercent != 100)
{
greytg = 0;
whitetg = 27;
greentg = 12;
bluetg = 10;
purpletg = 1;
orangetg = 0;
yellowtg = 0;
greyi = 0;
whitei = 10;
greeni = 30;
bluei = 8;
purplei = 2;
orangei = 0;
yellowi = 0;
}
percentGreyTradeGoods = greytg;
percentWhiteTradeGoods = whitetg;
percentGreenTradeGoods = greentg;
percentBlueTradeGoods = bluetg;
percentPurpleTradeGoods = purpletg;
percentOrangeTradeGoods = orangetg;
percentYellowTradeGoods = yellowtg;
percentGreyItems = greyi;
percentWhiteItems = whitei;
percentGreenItems = greeni;
percentBlueItems = bluei;
percentPurpleItems = purplei;
percentOrangeItems = orangei;
percentYellowItems = yellowi;
CalculatePercents();
}
uint32 GetPercentages(uint32 color)
{
switch(color)
{
case AHB_GREY_TG:
return percentGreyTradeGoods;
break;
case AHB_WHITE_TG:
return percentWhiteTradeGoods;
break;
case AHB_GREEN_TG:
return percentGreenTradeGoods;
break;
case AHB_BLUE_TG:
return percentBlueTradeGoods;
break;
case AHB_PURPLE_TG:
return percentPurpleTradeGoods;
break;
case AHB_ORANGE_TG:
return percentOrangeTradeGoods;
break;
case AHB_YELLOW_TG:
return percentYellowTradeGoods;
break;
case AHB_GREY_I:
return percentGreyItems;
break;
case AHB_WHITE_I:
return percentWhiteItems;
break;
case AHB_GREEN_I:
return percentGreenItems;
break;
case AHB_BLUE_I:
return percentBlueItems;
break;
case AHB_PURPLE_I:
return percentPurpleItems;
break;
case AHB_ORANGE_I:
return percentOrangeItems;
break;
case AHB_YELLOW_I:
return percentYellowItems;
break;
default:
return 0;
break;
}
}
void SetMinPrice(uint32 color, uint32 value)
{
switch(color)
@@ -325,6 +189,7 @@ public:
break;
}
}
uint32 GetMinPrice(uint32 color)
{
switch(color)
@@ -836,306 +701,7 @@ public:
{
return buyerBiddingInterval;
}
void CalculatePercents()
{
greytgp = (uint32) (((double)percentGreyTradeGoods / 100.0) * maxItems);
whitetgp = (uint32) (((double)percentWhiteTradeGoods / 100.0) * maxItems);
greentgp = (uint32) (((double)percentGreenTradeGoods / 100.0) * maxItems);
bluetgp = (uint32) (((double)percentBlueTradeGoods / 100.0) * maxItems);
purpletgp = (uint32) (((double)percentPurpleTradeGoods / 100.0) * maxItems);
orangetgp = (uint32) (((double)percentOrangeTradeGoods / 100.0) * maxItems);
yellowtgp = (uint32) (((double)percentYellowTradeGoods / 100.0) * maxItems);
greyip = (uint32) (((double)percentGreyItems / 100.0) * maxItems);
whiteip = (uint32) (((double)percentWhiteItems / 100.0) * maxItems);
greenip = (uint32) (((double)percentGreenItems / 100.0) * maxItems);
blueip = (uint32) (((double)percentBlueItems / 100.0) * maxItems);
purpleip = (uint32) (((double)percentPurpleItems / 100.0) * maxItems);
orangeip = (uint32) (((double)percentOrangeItems / 100.0) * maxItems);
yellowip = (uint32) (((double)percentYellowItems / 100.0) * maxItems);
uint32 total = greytgp + whitetgp + greentgp + bluetgp + purpletgp + orangetgp + yellowtgp + greyip + whiteip + greenip + blueip + purpleip + orangeip + yellowip;
int32 diff = (maxItems - total);
if (diff < 0)
{
if ((whiteip - diff) > 0)
whiteip -= diff;
else if ((greenip - diff) > 0)
greenip -= diff;
}
else if (diff < 0)
{
whiteip += diff;
}
}
uint32 GetPercents(uint32 color)
{
switch(color)
{
case AHB_GREY_TG:
return greytgp;
break;
case AHB_WHITE_TG:
return whitetgp;
break;
case AHB_GREEN_TG:
return greentgp;
break;
case AHB_BLUE_TG:
return bluetgp;
break;
case AHB_PURPLE_TG:
return purpletgp;
break;
case AHB_ORANGE_TG:
return orangetgp;
break;
case AHB_YELLOW_TG:
return yellowtgp;
break;
case AHB_GREY_I:
return greyip;
break;
case AHB_WHITE_I:
return whiteip;
break;
case AHB_GREEN_I:
return greenip;
break;
case AHB_BLUE_I:
return blueip;
break;
case AHB_PURPLE_I:
return purpleip;
break;
case AHB_ORANGE_I:
return orangeip;
break;
case AHB_YELLOW_I:
return yellowip;
break;
default:
return 0;
break;
}
}
void DecItemCounts(uint32 Class, uint32 Quality)
{
switch(Class)
{
case ITEM_CLASS_TRADE_GOODS:
DecItemCounts(Quality);
break;
default:
DecItemCounts(Quality + 7);
break;
}
}
void DecItemCounts(uint32 color)
{
switch(color)
{
case AHB_GREY_TG:
--greyTGoods;
break;
case AHB_WHITE_TG:
--whiteTGoods;
break;
case AHB_GREEN_TG:
--greenTGoods;
break;
case AHB_BLUE_TG:
--blueTGoods;
break;
case AHB_PURPLE_TG:
--purpleTGoods;
break;
case AHB_ORANGE_TG:
--orangeTGoods;
break;
case AHB_YELLOW_TG:
--yellowTGoods;
break;
case AHB_GREY_I:
--greyItems;
break;
case AHB_WHITE_I:
--whiteItems;
break;
case AHB_GREEN_I:
--greenItems;
break;
case AHB_BLUE_I:
--blueItems;
break;
case AHB_PURPLE_I:
--purpleItems;
break;
case AHB_ORANGE_I:
--orangeItems;
break;
case AHB_YELLOW_I:
--yellowItems;
break;
default:
break;
}
}
void IncItemCounts(uint32 Class, uint32 Quality)
{
switch(Class)
{
case ITEM_CLASS_TRADE_GOODS:
IncItemCounts(Quality);
break;
default:
IncItemCounts(Quality + 7);
break;
}
}
void IncItemCounts(uint32 color)
{
switch(color)
{
case AHB_GREY_TG:
++greyTGoods;
break;
case AHB_WHITE_TG:
++whiteTGoods;
break;
case AHB_GREEN_TG:
++greenTGoods;
break;
case AHB_BLUE_TG:
++blueTGoods;
break;
case AHB_PURPLE_TG:
++purpleTGoods;
break;
case AHB_ORANGE_TG:
++orangeTGoods;
break;
case AHB_YELLOW_TG:
++yellowTGoods;
break;
case AHB_GREY_I:
++greyItems;
break;
case AHB_WHITE_I:
++whiteItems;
break;
case AHB_GREEN_I:
++greenItems;
break;
case AHB_BLUE_I:
++blueItems;
break;
case AHB_PURPLE_I:
++purpleItems;
break;
case AHB_ORANGE_I:
++orangeItems;
break;
case AHB_YELLOW_I:
++yellowItems;
break;
default:
break;
}
}
void ResetItemCounts()
{
greyTGoods = 0;
whiteTGoods = 0;
greenTGoods = 0;
blueTGoods = 0;
purpleTGoods = 0;
orangeTGoods = 0;
yellowTGoods = 0;
greyItems = 0;
whiteItems = 0;
greenItems = 0;
blueItems = 0;
purpleItems = 0;
orangeItems = 0;
yellowItems = 0;
}
uint32 TotalItemCounts()
{
return(
greyTGoods +
whiteTGoods +
greenTGoods +
blueTGoods +
purpleTGoods +
orangeTGoods +
yellowTGoods +
greyItems +
whiteItems +
greenItems +
blueItems +
purpleItems +
orangeItems +
yellowItems);
}
uint32 GetItemCounts(uint32 color)
{
switch(color)
{
case AHB_GREY_TG:
return greyTGoods;
break;
case AHB_WHITE_TG:
return whiteTGoods;
break;
case AHB_GREEN_TG:
return greenTGoods;
break;
case AHB_BLUE_TG:
return blueTGoods;
break;
case AHB_PURPLE_TG:
return purpleTGoods;
break;
case AHB_ORANGE_TG:
return orangeTGoods;
break;
case AHB_YELLOW_TG:
return yellowTGoods;
break;
case AHB_GREY_I:
return greyItems;
break;
case AHB_WHITE_I:
return whiteItems;
break;
case AHB_GREEN_I:
return greenItems;
break;
case AHB_BLUE_I:
return blueItems;
break;
case AHB_PURPLE_I:
return purpleItems;
break;
case AHB_ORANGE_I:
return orangeItems;
break;
case AHB_YELLOW_I:
return yellowItems;
break;
default:
return 0;
break;
}
}
void SetBidsPerInterval(uint32 value)
{
buyerBidsPerInterval = value;
@@ -1179,45 +745,6 @@ private:
bool Bind_When_Use;
bool Bind_Quest_Item;
bool DisablePermEnchant;
bool DisableConjured;
bool DisableGems;
bool DisableMoney;
bool DisableMoneyLoot;
bool DisableLootable;
bool DisableKeys;
bool DisableDuration;
bool DisableBOP_Or_Quest_NoReqLevel;
bool DisableWarriorItems;
bool DisablePaladinItems;
bool DisableHunterItems;
bool DisableRogueItems;
bool DisablePriestItems;
bool DisableDKItems;
bool DisableShamanItems;
bool DisableMageItems;
bool DisableWarlockItems;
bool DisableUnusedClassItems;
bool DisableDruidItems;
uint32 DisableItemsBelowLevel;
uint32 DisableItemsAboveLevel;
uint32 DisableTGsBelowLevel;
uint32 DisableTGsAboveLevel;
uint32 DisableItemsBelowGUID;
uint32 DisableItemsAboveGUID;
uint32 DisableTGsBelowGUID;
uint32 DisableTGsAboveGUID;
uint32 DisableItemsBelowReqLevel;
uint32 DisableItemsAboveReqLevel;
uint32 DisableTGsBelowReqLevel;
uint32 DisableTGsAboveReqLevel;
uint32 DisableItemsBelowReqSkillRank;
uint32 DisableItemsAboveReqSkillRank;
uint32 DisableTGsBelowReqSkillRank;
uint32 DisableTGsAboveReqSkillRank;
std::set<uint32> DisableItemStore;
//End Filters