mirror of
https://github.com/liyunfan1223/mod-playerbots.git
synced 2026-02-21 10:30:01 +01:00
[Crash fix] Duplicate bots login
This commit is contained in:
parent
98560a1855
commit
c63ee90cb2
@ -363,6 +363,11 @@ Player* PlayerbotHolder::GetPlayerBot(ObjectGuid::LowType lowGuid) const
|
|||||||
|
|
||||||
void PlayerbotHolder::OnBotLogin(Player* const bot)
|
void PlayerbotHolder::OnBotLogin(Player* const bot)
|
||||||
{
|
{
|
||||||
|
// Prevent duplicate login
|
||||||
|
if (playerBots.find(bot->GetGUID()) != playerBots.end()) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
sPlayerbotsMgr->AddPlayerbotData(bot, true);
|
sPlayerbotsMgr->AddPlayerbotData(bot, true);
|
||||||
playerBots[bot->GetGUID()] = bot;
|
playerBots[bot->GetGUID()] = bot;
|
||||||
OnBotLoginInternal(bot);
|
OnBotLoginInternal(bot);
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user