mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-16 07:30:42 +01:00
Merge pull request #15554 from MrSmite/AHBot_Buyer
Fix AHBot Buyer to stop counting own auctions
(cherry picked from commit 811b557b3b)
This commit is contained in:
@@ -102,6 +102,10 @@ uint32 AuctionBotBuyer::GetItemInformation(BuyerConfiguration& config)
|
||||
for (AuctionHouseObject::AuctionEntryMap::const_iterator itr = house->GetAuctionsBegin(); itr != house->GetAuctionsEnd(); ++itr)
|
||||
{
|
||||
AuctionEntry* entry = itr->second;
|
||||
|
||||
if (!entry->owner)
|
||||
continue; // Skip auctions owned by AHBot
|
||||
|
||||
Item* item = sAuctionMgr->GetAItem(entry->itemGUIDLow);
|
||||
if (!item)
|
||||
continue;
|
||||
@@ -135,10 +139,10 @@ uint32 AuctionBotBuyer::GetItemInformation(BuyerConfiguration& config)
|
||||
itemInfo.MinBuyPrice = std::min(itemInfo.MinBuyPrice, itemBuyPrice);
|
||||
}
|
||||
|
||||
// Add/update to EligibleItems if:
|
||||
// has a bid by player or
|
||||
// has no bids and not owned by bot
|
||||
if ((entry->bid && entry->bidder) || (entry->owner && !entry->bid))
|
||||
// Add/update EligibleItems if:
|
||||
// * no bid
|
||||
// * bid from player
|
||||
if (!entry->bid || entry->bidder)
|
||||
{
|
||||
config.EligibleItems[entry->Id].LastExist = now;
|
||||
config.EligibleItems[entry->Id].AuctionId = entry->Id;
|
||||
|
||||
Reference in New Issue
Block a user