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

(cherry picked from commit 5ff85f02b8a61a75ee1430d86d8b9a07ed603875)
  • Loading branch information
trickerer committed May 18, 2024
1 parent 6fc305b commit 2031358
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 @@ -620,8 +620,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 2031358

Please sign in to comment.