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