mirror of
https://github.com/NathanHandley/mod-ah-bot-plus.git
synced 2026-02-07 21:01:59 +00:00
Fix crash by restricting to 1 bot per cycle
This commit is contained in:
@@ -27,14 +27,10 @@
|
|||||||
# AuctionHouseBot.GUIDs = 3 <- Only character with GUID 3
|
# AuctionHouseBot.GUIDs = 3 <- Only character with GUID 3
|
||||||
# AuctionHouseBot.GUIDs = 3,4 <- Both characters with GUID 3 and 4
|
# AuctionHouseBot.GUIDs = 3,4 <- Both characters with GUID 3 and 4
|
||||||
#
|
#
|
||||||
# AuctionHouseBot.BotsPerCycle
|
|
||||||
# If using more than one GUID, this is how many of them will come on
|
|
||||||
# to do auction behaviors each cycle. Too many might impact performance
|
|
||||||
# since the bot sessions are created and destroyed.
|
|
||||||
# Default 1 (single random bot from GUID list)
|
|
||||||
#
|
|
||||||
# AuctionHouseBot.ItemsPerCycle
|
# AuctionHouseBot.ItemsPerCycle
|
||||||
# How many items to post on the auction house every house update
|
# How many items to post on the auction house every house update. Items
|
||||||
|
# in a cycle will be posted by a single randomly selected bot, so Keep
|
||||||
|
# this value low if you want highly diverse postings
|
||||||
# Default 75
|
# Default 75
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|
||||||
@@ -42,8 +38,7 @@ AuctionHouseBot.DEBUG = 0
|
|||||||
AuctionHouseBot.DEBUG_FILTERS = 0
|
AuctionHouseBot.DEBUG_FILTERS = 0
|
||||||
AuctionHouseBot.EnableSeller = 1
|
AuctionHouseBot.EnableSeller = 1
|
||||||
AuctionHouseBot.EnableBuyer = 1
|
AuctionHouseBot.EnableBuyer = 1
|
||||||
AuctionHouseBot.GUIDs = 3
|
AuctionHouseBot.GUIDs = 0
|
||||||
AuctionHouseBot.BotsPerCycle = 1
|
|
||||||
AuctionHouseBot.ItemsPerCycle = 75
|
AuctionHouseBot.ItemsPerCycle = 75
|
||||||
|
|
||||||
###############################################################################
|
###############################################################################
|
||||||
|
|||||||
@@ -419,7 +419,7 @@ void AuctionHouseBot::populateItemCandidateList()
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AuctionHouseBot::addNewAuctions(std::vector<Player*>& playerSessions, AHBConfig *config)
|
void AuctionHouseBot::addNewAuctions(Player* AHBplayer, AHBConfig *config)
|
||||||
{
|
{
|
||||||
if (!AHBSeller)
|
if (!AHBSeller)
|
||||||
{
|
{
|
||||||
@@ -432,10 +432,7 @@ void AuctionHouseBot::addNewAuctions(std::vector<Player*>& playerSessions, AHBCo
|
|||||||
uint32 maxItems = config->GetMaxItems();
|
uint32 maxItems = config->GetMaxItems();
|
||||||
|
|
||||||
if (maxItems == 0)
|
if (maxItems == 0)
|
||||||
{
|
|
||||||
//if (debug_Out) sLog->outString( "AHSeller: Auctions disabled");
|
|
||||||
return;
|
return;
|
||||||
}
|
|
||||||
|
|
||||||
AuctionHouseEntry const* ahEntry = sAuctionMgr->GetAuctionHouseEntryFromFactionTemplate(config->GetAHFID());
|
AuctionHouseEntry const* ahEntry = sAuctionMgr->GetAuctionHouseEntryFromFactionTemplate(config->GetAHFID());
|
||||||
if (!ahEntry)
|
if (!ahEntry)
|
||||||
@@ -483,9 +480,6 @@ void AuctionHouseBot::addNewAuctions(std::vector<Player*>& playerSessions, AHBCo
|
|||||||
// only insert a few at a time, so as not to peg the processor
|
// only insert a few at a time, so as not to peg the processor
|
||||||
for (uint32 cnt = 1; cnt <= items; cnt++)
|
for (uint32 cnt = 1; cnt <= items; cnt++)
|
||||||
{
|
{
|
||||||
// Pick a random player session
|
|
||||||
Player* playerSession = playerSessions[urand(0, playerSessions.size() - 1)];
|
|
||||||
|
|
||||||
if (debug_Out)
|
if (debug_Out)
|
||||||
LOG_ERROR("module", "AHSeller: {} count", cnt);
|
LOG_ERROR("module", "AHSeller: {} count", cnt);
|
||||||
|
|
||||||
@@ -511,14 +505,14 @@ void AuctionHouseBot::addNewAuctions(std::vector<Player*>& playerSessions, AHBCo
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
|
|
||||||
Item* item = Item::CreateItem(itemID, 1, playerSession);
|
Item* item = Item::CreateItem(itemID, 1, AHBplayer);
|
||||||
if (item == NULL)
|
if (item == NULL)
|
||||||
{
|
{
|
||||||
if (debug_Out)
|
if (debug_Out)
|
||||||
LOG_ERROR("module", "AHSeller: Item::CreateItem() returned NULL");
|
LOG_ERROR("module", "AHSeller: Item::CreateItem() returned NULL");
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
item->AddToUpdateQueueOf(playerSession);
|
item->AddToUpdateQueueOf(AHBplayer);
|
||||||
|
|
||||||
uint32 randomPropertyId = Item::GenerateItemRandomPropertyId(itemID);
|
uint32 randomPropertyId = Item::GenerateItemRandomPropertyId(itemID);
|
||||||
if (randomPropertyId != 0)
|
if (randomPropertyId != 0)
|
||||||
@@ -545,7 +539,7 @@ void AuctionHouseBot::addNewAuctions(std::vector<Player*>& playerSessions, AHBCo
|
|||||||
auctionEntry->item_guid = item->GetGUID();
|
auctionEntry->item_guid = item->GetGUID();
|
||||||
auctionEntry->item_template = item->GetEntry();
|
auctionEntry->item_template = item->GetEntry();
|
||||||
auctionEntry->itemCount = item->GetCount();
|
auctionEntry->itemCount = item->GetCount();
|
||||||
auctionEntry->owner = playerSession->GetGUID();
|
auctionEntry->owner = AHBplayer->GetGUID();
|
||||||
auctionEntry->startbid = bidPrice * stackCount;
|
auctionEntry->startbid = bidPrice * stackCount;
|
||||||
auctionEntry->buyout = buyoutPrice * stackCount;
|
auctionEntry->buyout = buyoutPrice * stackCount;
|
||||||
auctionEntry->bid = 0;
|
auctionEntry->bid = 0;
|
||||||
@@ -553,7 +547,7 @@ void AuctionHouseBot::addNewAuctions(std::vector<Player*>& playerSessions, AHBCo
|
|||||||
auctionEntry->expire_time = (time_t) etime + time(NULL);
|
auctionEntry->expire_time = (time_t) etime + time(NULL);
|
||||||
auctionEntry->auctionHouseEntry = ahEntry;
|
auctionEntry->auctionHouseEntry = ahEntry;
|
||||||
item->SaveToDB(trans);
|
item->SaveToDB(trans);
|
||||||
item->RemoveFromUpdateQueueOf(playerSession);
|
item->RemoveFromUpdateQueueOf(AHBplayer);
|
||||||
sAuctionMgr->AddAItem(item);
|
sAuctionMgr->AddAItem(item);
|
||||||
auctionHouse->AddAuction(auctionEntry);
|
auctionHouse->AddAuction(auctionEntry);
|
||||||
auctionEntry->SaveToDB(trans);
|
auctionEntry->SaveToDB(trans);
|
||||||
@@ -561,7 +555,7 @@ void AuctionHouseBot::addNewAuctions(std::vector<Player*>& playerSessions, AHBCo
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AuctionHouseBot::addNewAuctionBuyerBotBid(std::vector<Player*>& playerSessions, AHBConfig *config)
|
void AuctionHouseBot::addNewAuctionBuyerBotBid(Player* AHBplayer, AHBConfig *config)
|
||||||
{
|
{
|
||||||
if (!AHBBuyer)
|
if (!AHBBuyer)
|
||||||
{
|
{
|
||||||
@@ -590,9 +584,6 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(std::vector<Player*>& playerSessi
|
|||||||
|
|
||||||
for (uint32 count = 1; count <= config->GetBidsPerInterval(); ++count)
|
for (uint32 count = 1; count <= config->GetBidsPerInterval(); ++count)
|
||||||
{
|
{
|
||||||
// Pick a random player session
|
|
||||||
Player* playerSession = playerSessions[urand(0, playerSessions.size() - 1)];
|
|
||||||
|
|
||||||
// Do we have anything to bid? If not, stop here.
|
// Do we have anything to bid? If not, stop here.
|
||||||
if (possibleBids.empty())
|
if (possibleBids.empty())
|
||||||
{
|
{
|
||||||
@@ -689,7 +680,7 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(std::vector<Player*>& playerSessi
|
|||||||
// Return money of prior bidder
|
// Return money of prior bidder
|
||||||
if (auction->bidder)
|
if (auction->bidder)
|
||||||
{
|
{
|
||||||
if (auction->bidder == playerSession->GetGUID())
|
if (auction->bidder == AHBplayer->GetGUID())
|
||||||
{
|
{
|
||||||
//pl->ModifyMoney(-int32(price - auction->bid));
|
//pl->ModifyMoney(-int32(price - auction->bid));
|
||||||
}
|
}
|
||||||
@@ -697,13 +688,13 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(std::vector<Player*>& playerSessi
|
|||||||
{
|
{
|
||||||
// mail to last bidder and return money
|
// mail to last bidder and return money
|
||||||
auto trans = CharacterDatabase.BeginTransaction();
|
auto trans = CharacterDatabase.BeginTransaction();
|
||||||
sAuctionMgr->SendAuctionOutbiddedMail(auction, minBidPrice, playerSession, trans);
|
sAuctionMgr->SendAuctionOutbiddedMail(auction, minBidPrice, AHBplayer, trans);
|
||||||
CharacterDatabase.CommitTransaction(trans);
|
CharacterDatabase.CommitTransaction(trans);
|
||||||
//pl->ModifyMoney(-int32(price));
|
//pl->ModifyMoney(-int32(price));
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
auction->bidder = playerSession->GetGUID();
|
auction->bidder = AHBplayer->GetGUID();
|
||||||
auction->bid = minBidPrice;
|
auction->bid = minBidPrice;
|
||||||
|
|
||||||
// Saving auction into database
|
// Saving auction into database
|
||||||
@@ -713,15 +704,14 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(std::vector<Player*>& playerSessi
|
|||||||
{
|
{
|
||||||
auto trans = CharacterDatabase.BeginTransaction();
|
auto trans = CharacterDatabase.BeginTransaction();
|
||||||
//buyout
|
//buyout
|
||||||
if ((auction->bidder) && (playerSession->GetGUID() != auction->bidder))
|
if ((auction->bidder) && (AHBplayer->GetGUID() != auction->bidder))
|
||||||
{
|
{
|
||||||
sAuctionMgr->SendAuctionOutbiddedMail(auction, auction->buyout, playerSession, trans);
|
sAuctionMgr->SendAuctionOutbiddedMail(auction, auction->buyout, AHBplayer, trans);
|
||||||
}
|
}
|
||||||
auction->bidder = playerSession->GetGUID();
|
auction->bidder = AHBplayer->GetGUID();
|
||||||
auction->bid = auction->buyout;
|
auction->bid = auction->buyout;
|
||||||
|
|
||||||
// Send mails to buyer & seller
|
// Send mails to buyer & seller
|
||||||
//sAuctionMgr->SendAuctionSalePendingMail(auction, trans);
|
|
||||||
sAuctionMgr->SendAuctionSuccessfulMail(auction, trans);
|
sAuctionMgr->SendAuctionSuccessfulMail(auction, trans);
|
||||||
sAuctionMgr->SendAuctionWonMail(auction, trans);
|
sAuctionMgr->SendAuctionWonMail(auction, trans);
|
||||||
auction->DeleteFromDB(trans);
|
auction->DeleteFromDB(trans);
|
||||||
@@ -734,33 +724,6 @@ void AuctionHouseBot::addNewAuctionBuyerBotBid(std::vector<Player*>& playerSessi
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void AuctionHouseBot::LoadBotSessions(std::vector<Player*>& outPlayerSessions)
|
|
||||||
{
|
|
||||||
// Determine number to load
|
|
||||||
uint32 numOfBotsToLoad = BotsPerCycle;
|
|
||||||
if (AHCharacters.size() < BotsPerCycle)
|
|
||||||
numOfBotsToLoad = AHCharacters.size();
|
|
||||||
|
|
||||||
// Build a shufflebag for char indices to pick from
|
|
||||||
std::deque<uint32> charIndicesBag;
|
|
||||||
for (AuctionHouseBotCharacter ahBot : AHCharacters)
|
|
||||||
charIndicesBag.push_back(ahBot.CharacterGUID);
|
|
||||||
|
|
||||||
// Pluck out the guids and load them one at a time
|
|
||||||
for (uint32 i = 0; i < numOfBotsToLoad; i++)
|
|
||||||
{
|
|
||||||
uint32 index = urand(0, charIndicesBag.size()-1);
|
|
||||||
uint32 charIndex = charIndicesBag[index];
|
|
||||||
charIndicesBag.erase(charIndicesBag.begin() + index);
|
|
||||||
std::string accountName = "AuctionHouseBotGUID" + std::to_string(AHCharacters[charIndex].CharacterGUID);
|
|
||||||
WorldSession _session(AHCharacters[charIndex].AccountID, std::move(accountName), nullptr, SEC_PLAYER, sWorld->getIntConfig(CONFIG_EXPANSION), 0, LOCALE_enUS, 0, false, false, 0);
|
|
||||||
Player playerSession(&_session);
|
|
||||||
playerSession.Initialize(AHCharacters[charIndex].CharacterGUID);
|
|
||||||
ObjectAccessor::AddObject(&playerSession);
|
|
||||||
outPlayerSessions.push_back(&playerSession);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
void AuctionHouseBot::Update()
|
void AuctionHouseBot::Update()
|
||||||
{
|
{
|
||||||
time_t _newrun = time(NULL);
|
time_t _newrun = time(NULL);
|
||||||
@@ -769,45 +732,41 @@ void AuctionHouseBot::Update()
|
|||||||
if (AHCharacters.size() == 0)
|
if (AHCharacters.size() == 0)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
// Load the bots
|
// Randomly select the bot to load, and load it
|
||||||
std::vector<Player*> playerSessions;
|
uint32 botIndex = urand(0, AHCharacters.size() - 1);
|
||||||
LoadBotSessions(playerSessions);
|
CurrentBotCharGUID = AHCharacters[botIndex].CharacterGUID;
|
||||||
|
std::string accountName = "AuctionHouseBot" + std::to_string(AHCharacters[botIndex].AccountID);
|
||||||
|
WorldSession _session(AHCharacters[botIndex].AccountID, std::move(accountName), nullptr, SEC_PLAYER, sWorld->getIntConfig(CONFIG_EXPANSION), 0, LOCALE_enUS, 0, false, false, 0);
|
||||||
|
Player _AHBplayer(&_session);
|
||||||
|
_AHBplayer.Initialize(AHCharacters[botIndex].CharacterGUID);
|
||||||
|
ObjectAccessor::AddObject(&_AHBplayer);
|
||||||
|
|
||||||
// Add New Bids
|
// Add New Bids
|
||||||
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
|
if (!sWorld->getBoolConfig(CONFIG_ALLOW_TWO_SIDE_INTERACTION_AUCTION))
|
||||||
{
|
{
|
||||||
addNewAuctions(playerSessions, &AllianceConfig);
|
addNewAuctions(&_AHBplayer, &AllianceConfig);
|
||||||
if (((_newrun - _lastrun_a) >= (AllianceConfig.GetBiddingInterval() * MINUTE)) && (AllianceConfig.GetBidsPerInterval() > 0))
|
if (((_newrun - _lastrun_a) >= (AllianceConfig.GetBiddingInterval() * MINUTE)) && (AllianceConfig.GetBidsPerInterval() > 0))
|
||||||
{
|
{
|
||||||
//if (debug_Out) sLog->outError( "AHBuyer: %u seconds have passed since last bid", (_newrun - _lastrun_a));
|
addNewAuctionBuyerBotBid(&_AHBplayer, &AllianceConfig);
|
||||||
//if (debug_Out) sLog->outError( "AHBuyer: Bidding on Alliance Auctions");
|
|
||||||
addNewAuctionBuyerBotBid(playerSessions, &AllianceConfig);
|
|
||||||
_lastrun_a = _newrun;
|
_lastrun_a = _newrun;
|
||||||
}
|
}
|
||||||
|
|
||||||
addNewAuctions(playerSessions, &HordeConfig);
|
addNewAuctions(&_AHBplayer, &HordeConfig);
|
||||||
if (((_newrun - _lastrun_h) >= (HordeConfig.GetBiddingInterval() * MINUTE)) && (HordeConfig.GetBidsPerInterval() > 0))
|
if (((_newrun - _lastrun_h) >= (HordeConfig.GetBiddingInterval() * MINUTE)) && (HordeConfig.GetBidsPerInterval() > 0))
|
||||||
{
|
{
|
||||||
//if (debug_Out) sLog->outError( "AHBuyer: %u seconds have passed since last bid", (_newrun - _lastrun_h));
|
addNewAuctionBuyerBotBid(&_AHBplayer, &HordeConfig);
|
||||||
//if (debug_Out) sLog->outError( "AHBuyer: Bidding on Horde Auctions");
|
|
||||||
addNewAuctionBuyerBotBid(playerSessions, &HordeConfig);
|
|
||||||
_lastrun_h = _newrun;
|
_lastrun_h = _newrun;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
addNewAuctions(playerSessions, &NeutralConfig);
|
addNewAuctions(&_AHBplayer, &NeutralConfig);
|
||||||
if (((_newrun - _lastrun_n) >= (NeutralConfig.GetBiddingInterval() * MINUTE)) && (NeutralConfig.GetBidsPerInterval() > 0))
|
if (((_newrun - _lastrun_n) >= (NeutralConfig.GetBiddingInterval() * MINUTE)) && (NeutralConfig.GetBidsPerInterval() > 0))
|
||||||
{
|
{
|
||||||
//if (debug_Out) sLog->outError( "AHBuyer: %u seconds have passed since last bid", (_newrun - _lastrun_n));
|
addNewAuctionBuyerBotBid(&_AHBplayer, &NeutralConfig);
|
||||||
//if (debug_Out) sLog->outError( "AHBuyer: Bidding on Neutral Auctions");
|
|
||||||
addNewAuctionBuyerBotBid(playerSessions, &NeutralConfig);
|
|
||||||
_lastrun_n = _newrun;
|
_lastrun_n = _newrun;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Remove the player sessions
|
ObjectAccessor::RemoveObject(&_AHBplayer);
|
||||||
for (int i = 0; i < playerSessions.size(); i++)
|
|
||||||
ObjectAccessor::RemoveObject(playerSessions[i]);
|
|
||||||
playerSessions.clear();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
void AuctionHouseBot::Initialize()
|
void AuctionHouseBot::Initialize()
|
||||||
@@ -829,7 +788,6 @@ void AuctionHouseBot::InitializeConfiguration()
|
|||||||
if (AHCharacters.size() == 0)
|
if (AHCharacters.size() == 0)
|
||||||
AddCharacters(sConfigMgr->GetOption<std::string>("AuctionHouseBot.GUID", "0")); // Backwards compat
|
AddCharacters(sConfigMgr->GetOption<std::string>("AuctionHouseBot.GUID", "0")); // Backwards compat
|
||||||
ItemsPerCycle = sConfigMgr->GetOption<uint32>("AuctionHouseBot.ItemsPerCycle", 75);
|
ItemsPerCycle = sConfigMgr->GetOption<uint32>("AuctionHouseBot.ItemsPerCycle", 75);
|
||||||
BotsPerCycle = sConfigMgr->GetOption<uint32>("AuctionHouseBot.BotsPerCycle", 1);
|
|
||||||
|
|
||||||
// Stack Ratios
|
// Stack Ratios
|
||||||
RandomStackRatioConsumable = GetRandomStackValue("AuctionHouseBot.RandomStackRatio.Consumable", 20);
|
RandomStackRatioConsumable = GetRandomStackValue("AuctionHouseBot.RandomStackRatio.Consumable", 20);
|
||||||
|
|||||||
@@ -135,6 +135,7 @@ class AuctionHouseBot
|
|||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
std::vector<AuctionHouseBotCharacter> AHCharacters;
|
std::vector<AuctionHouseBotCharacter> AHCharacters;
|
||||||
|
uint32 CurrentBotCharGUID;
|
||||||
|
|
||||||
private:
|
private:
|
||||||
bool debug_Out;
|
bool debug_Out;
|
||||||
@@ -145,7 +146,6 @@ private:
|
|||||||
|
|
||||||
std::string AHCharactersGUIDsForQuery;
|
std::string AHCharactersGUIDsForQuery;
|
||||||
uint32 ItemsPerCycle;
|
uint32 ItemsPerCycle;
|
||||||
uint32 BotsPerCycle;
|
|
||||||
bool DisabledItemTextFilter;
|
bool DisabledItemTextFilter;
|
||||||
std::set<uint32> DisabledItems;
|
std::set<uint32> DisabledItems;
|
||||||
uint32 RandomStackRatioConsumable;
|
uint32 RandomStackRatioConsumable;
|
||||||
@@ -234,8 +234,8 @@ private:
|
|||||||
void populatetemClassSeedListForItemClass(uint32 itemClass, uint32 itemClassSeedWeight);
|
void populatetemClassSeedListForItemClass(uint32 itemClass, uint32 itemClassSeedWeight);
|
||||||
void populateItemClassProportionList();
|
void populateItemClassProportionList();
|
||||||
void populateItemCandidateList();
|
void populateItemCandidateList();
|
||||||
void addNewAuctions(std::vector<Player*>& playerSessions, AHBConfig *config);
|
void addNewAuctions(Player* AHBplayer, AHBConfig *config);
|
||||||
void addNewAuctionBuyerBotBid(std::vector<Player*>& playerSessions, AHBConfig *config);
|
void addNewAuctionBuyerBotBid(Player* AHBplayer, AHBConfig *config);
|
||||||
|
|
||||||
AuctionHouseBot();
|
AuctionHouseBot();
|
||||||
|
|
||||||
@@ -256,8 +256,6 @@ public:
|
|||||||
void AddToDisabledItems(std::set<uint32>& workingDisabledItemIDs, uint32 disabledItemID);
|
void AddToDisabledItems(std::set<uint32>& workingDisabledItemIDs, uint32 disabledItemID);
|
||||||
void AddDisabledItems(std::string disabledItemIdString);
|
void AddDisabledItems(std::string disabledItemIdString);
|
||||||
void AddPriceMinimumOverrides(std::string priceMinimimOverridesString);
|
void AddPriceMinimumOverrides(std::string priceMinimimOverridesString);
|
||||||
//ObjectGuid::LowType GetAHBplayerGUID() { return AHBplayerGUID; };
|
|
||||||
void LoadBotSessions(std::vector<Player*>& outPlayerSessions);
|
|
||||||
};
|
};
|
||||||
|
|
||||||
#define auctionbot AuctionHouseBot::instance()
|
#define auctionbot AuctionHouseBot::instance()
|
||||||
|
|||||||
@@ -74,8 +74,8 @@ public:
|
|||||||
|
|
||||||
void OnBeforeAuctionHouseMgrSendAuctionOutbiddedMail(AuctionHouseMgr* /*auctionHouseMgr*/, AuctionEntry* auction, Player* oldBidder, uint32& /*oldBidder_accId*/, Player* newBidder, uint32& newPrice, bool& /*sendNotification*/, bool& /*sendMail*/) override
|
void OnBeforeAuctionHouseMgrSendAuctionOutbiddedMail(AuctionHouseMgr* /*auctionHouseMgr*/, AuctionEntry* auction, Player* oldBidder, uint32& /*oldBidder_accId*/, Player* newBidder, uint32& newPrice, bool& /*sendNotification*/, bool& /*sendMail*/) override
|
||||||
{
|
{
|
||||||
//if (oldBidder && !newBidder)
|
if (oldBidder && !newBidder)
|
||||||
// oldBidder->GetSession()->SendAuctionBidderNotification((uint32)auction->GetHouseId(), auction->Id, ObjectGuid::Create<HighGuid::Player>(auctionbot->GetAHBplayerGUID()), newPrice, auction->GetAuctionOutBid(), auction->item_template);
|
oldBidder->GetSession()->SendAuctionBidderNotification((uint32)auction->GetHouseId(), auction->Id, ObjectGuid::Create<HighGuid::Player>(auctionbot->CurrentBotCharGUID), newPrice, auction->GetAuctionOutBid(), auction->item_template);
|
||||||
}
|
}
|
||||||
|
|
||||||
void OnBeforeAuctionHouseMgrUpdate() override
|
void OnBeforeAuctionHouseMgrUpdate() override
|
||||||
|
|||||||
Reference in New Issue
Block a user