mirror of
https://github.com/NathanHandley/mod-ah-bot-plus.git
synced 2026-01-13 01:08:37 +00:00
Removed unused increment and decrement
This commit is contained in:
@@ -682,85 +682,6 @@ void AuctionHouseBot::InitializeConfiguration()
|
||||
ItemsPerCycle = sConfigMgr->GetOption<uint32>("AuctionHouseBot.ItemsPerCycle", 200);
|
||||
}
|
||||
|
||||
void AuctionHouseBot::IncrementItemCounts(AuctionEntry* ah)
|
||||
{
|
||||
// from auctionhousehandler.cpp, creates auction pointer & player pointer
|
||||
|
||||
// get exact item information
|
||||
Item *pItem = sAuctionMgr->GetAItem(ah->item_guid);
|
||||
if (!pItem)
|
||||
{
|
||||
if (debug_Out)
|
||||
LOG_ERROR("module", "AHBot: Item {} doesn't exist, perhaps bought already?", ah->item_guid.ToString());
|
||||
return;
|
||||
}
|
||||
|
||||
// get item prototype
|
||||
ItemTemplate const* prototype = sObjectMgr->GetItemTemplate(ah->item_template);
|
||||
|
||||
AHBConfig *config;
|
||||
|
||||
AuctionHouseEntry const* ahEntry = sAuctionHouseStore.LookupEntry(ah->GetHouseId());
|
||||
if (!ahEntry)
|
||||
{
|
||||
if (debug_Out)
|
||||
LOG_ERROR("module", "AHBot: {} returned as House Faction. Neutral", ah->GetHouseId());
|
||||
config = &NeutralConfig;
|
||||
}
|
||||
else if (ahEntry->houseId == AUCTIONHOUSE_ALLIANCE)
|
||||
{
|
||||
if (debug_Out)
|
||||
LOG_ERROR("module", "AHBot: {} returned as House Faction. Alliance", ah->GetHouseId());
|
||||
config = &AllianceConfig;
|
||||
}
|
||||
else if (ahEntry->houseId == AUCTIONHOUSE_HORDE)
|
||||
{
|
||||
if (debug_Out)
|
||||
LOG_ERROR("module", "AHBot: {} returned as House Faction. Horde", ah->GetHouseId());
|
||||
config = &HordeConfig;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (debug_Out)
|
||||
LOG_ERROR("module", "AHBot: {} returned as House Faction. Neutral", ah->GetHouseId());
|
||||
config = &NeutralConfig;
|
||||
}
|
||||
}
|
||||
|
||||
void AuctionHouseBot::DecrementItemCounts(AuctionEntry* ah, uint32 itemEntry)
|
||||
{
|
||||
// get item prototype
|
||||
ItemTemplate const* prototype = sObjectMgr->GetItemTemplate(itemEntry);
|
||||
|
||||
AHBConfig *config;
|
||||
|
||||
AuctionHouseEntry const* ahEntry = sAuctionHouseStore.LookupEntry(ah->GetHouseId());
|
||||
if (!ahEntry)
|
||||
{
|
||||
if (debug_Out)
|
||||
LOG_ERROR("module", "AHBot: {} returned as House Faction. Neutral", ah->GetHouseId());
|
||||
config = &NeutralConfig;
|
||||
}
|
||||
else if (ahEntry->houseId == AUCTIONHOUSE_ALLIANCE)
|
||||
{
|
||||
if (debug_Out)
|
||||
LOG_ERROR("module", "AHBot: {} returned as House Faction. Alliance", ah->GetHouseId());
|
||||
config = &AllianceConfig;
|
||||
}
|
||||
else if (ahEntry->houseId == AUCTIONHOUSE_HORDE)
|
||||
{
|
||||
if (debug_Out)
|
||||
LOG_ERROR("module", "AHBot: {} returned as House Faction. Horde", ah->GetHouseId());
|
||||
config = &HordeConfig;
|
||||
}
|
||||
else
|
||||
{
|
||||
if (debug_Out)
|
||||
LOG_ERROR("module", "AHBot: {} returned as House Faction. Neutral", ah->GetHouseId());
|
||||
config = &NeutralConfig;
|
||||
}
|
||||
}
|
||||
|
||||
void AuctionHouseBot::Commands(uint32 command, uint32 ahMapID, uint32 col, char* args)
|
||||
{
|
||||
AHBConfig *config = NULL;
|
||||
|
||||
@@ -762,8 +762,6 @@ public:
|
||||
void Initialize();
|
||||
void InitializeConfiguration();
|
||||
void LoadValues(AHBConfig*);
|
||||
void DecrementItemCounts(AuctionEntry* ah, uint32 itemEntry);
|
||||
void IncrementItemCounts(AuctionEntry* ah);
|
||||
void Commands(uint32, uint32, uint32, char*);
|
||||
ObjectGuid::LowType GetAHBplayerGUID() { return AHBplayerGUID; };
|
||||
};
|
||||
|
||||
@@ -52,16 +52,6 @@ public:
|
||||
oldBidder->GetSession()->SendAuctionBidderNotification(auction->GetHouseId(), auction->Id, ObjectGuid::Create<HighGuid::Player>(auctionbot->GetAHBplayerGUID()), newPrice, auction->GetAuctionOutBid(), auction->item_template);
|
||||
}
|
||||
|
||||
void OnAuctionAdd(AuctionHouseObject* /*ah*/, AuctionEntry* auction) override
|
||||
{
|
||||
auctionbot->IncrementItemCounts(auction);
|
||||
}
|
||||
|
||||
void OnAuctionRemove(AuctionHouseObject* /*ah*/, AuctionEntry* auction) override
|
||||
{
|
||||
auctionbot->DecrementItemCounts(auction, auction->item_template);
|
||||
}
|
||||
|
||||
void OnBeforeAuctionHouseMgrUpdate() override
|
||||
{
|
||||
auctionbot->Update();
|
||||
|
||||
Reference in New Issue
Block a user