Hotfix for OnBotLoginOperation() Crash (#2089)

Hotfix for an issue arising from
https://github.com/mod-playerbots/mod-playerbots/pull/2082

OnBotLoginOperation() is calling OnBotLogin() twice for altbots. I don't
know the full implication, but RandomPlayerbotMgr::OnBotLoginInternal()
is being called on altbots, and the server will crash if you attempt to
then log out the altbot.

This fix works for me right now. Discussed with @Celandriel , going to
push this hotfix for now until the rest of the maintainers can take a
look.
This commit is contained in:
Crow
2026-01-31 03:54:19 -06:00
committed by GitHub
parent 00d19dbf9c
commit 9546363d41

View File

@@ -503,8 +503,10 @@ public:
manager->OnBotLogin(bot);
}
}
sRandomPlayerbotMgr.OnBotLogin(bot);
else
{
sRandomPlayerbotMgr.OnBotLogin(bot);
}
return true;
}