From 9546363d41cb3cc81eecfc4b37f31eac081247af Mon Sep 17 00:00:00 2001 From: Crow Date: Sat, 31 Jan 2026 03:54:19 -0600 Subject: [PATCH] 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. --- src/Script/WorldThr/PlayerbotOperations.h | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Script/WorldThr/PlayerbotOperations.h b/src/Script/WorldThr/PlayerbotOperations.h index fff44d2c..49020702 100644 --- a/src/Script/WorldThr/PlayerbotOperations.h +++ b/src/Script/WorldThr/PlayerbotOperations.h @@ -503,8 +503,10 @@ public: manager->OnBotLogin(bot); } } - - sRandomPlayerbotMgr.OnBotLogin(bot); + else + { + sRandomPlayerbotMgr.OnBotLogin(bot); + } return true; }