diff --git a/src/PlayerbotAI.cpp b/src/PlayerbotAI.cpp index 2340b832..e33b1865 100644 --- a/src/PlayerbotAI.cpp +++ b/src/PlayerbotAI.cpp @@ -202,15 +202,15 @@ void PlayerbotAI::UpdateAI(uint32 elapsed, bool minimal) if (!bot->GetSession()) { return; } - if (bot->GetSession()->isLogingOut()) { - if (bot->IsInCombat() || (master && master->IsInCombat() && sServerFacade->GetDistance2d(bot, master) < 30.0f)) - { - WorldPackets::Character::LogoutCancel data = WorldPacket(CMSG_LOGOUT_CANCEL); - bot->GetSession()->HandleLogoutCancelOpcode(data); - TellMaster("Logout cancelled!"); - } + // if (bot->IsInCombat() || (master && master->IsInCombat() && sServerFacade->GetDistance2d(bot, master) < 30.0f)) + // { + // WorldPackets::Character::LogoutCancel data = WorldPacket(CMSG_LOGOUT_CANCEL); + // bot->GetSession()->HandleLogoutCancelOpcode(data); + // TellMaster("Logout cancelled!"); + // } + return; } // if (bot->HasUnitMovementFlag(MOVEMENTFLAG_FALLING)) { // bot->Say("Falling!", LANG_UNIVERSAL); diff --git a/src/PlayerbotMgr.cpp b/src/PlayerbotMgr.cpp index 28c77feb..2902927a 100644 --- a/src/PlayerbotMgr.cpp +++ b/src/PlayerbotMgr.cpp @@ -231,6 +231,9 @@ void PlayerbotHolder::LogoutPlayerBot(ObjectGuid guid) WorldSession* botWorldSessionPtr = bot->GetSession(); WorldSession* masterWorldSessionPtr = nullptr; + if (botWorldSessionPtr->isLogingOut()) + return; + Player* master = botAI->GetMaster(); if (master) masterWorldSessionPtr = master->GetSession();