Skip to content

Commit

Permalink
NPCBots: Always temporatily enable default roles for bots while free …
Browse files Browse the repository at this point in the history
…due to logout
  • Loading branch information
trickerer committed May 18, 2024
1 parent 0bd9c96 commit 5ff85f0
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/server/game/AI/NpcBots/bot_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -624,8 +624,11 @@ void bot_ai::ResetBotAI(uint8 resetType)
me->ReplaceAllUnitFlags2(UnitFlags2(me->GetCreatureTemplate()->unit_flags2));
}

if (resetType == BOTAI_RESET_DISMISS && !IsTempBot())
if ((resetType == BOTAI_RESET_DISMISS || resetType == BOTAI_RESET_LOGOUT) && !IsTempBot())
{
EnableAllSpells();
InitRoles();
}

//me->IsAIEnabled = true;
canUpdate = true;
Expand Down

0 comments on commit 5ff85f0

Please sign in to comment.