Skip to content

Commit

Permalink
NPCBots: make bots interrupt their spell cast to move to send positio…
Browse files Browse the repository at this point in the history
…n immediately
  • Loading branch information
trickerer committed Jan 22, 2023
1 parent 9e8c167 commit e0a3758
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions src/server/game/AI/NpcBots/bot_ai.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1056,10 +1056,12 @@ void bot_ai::MoveToSendPosition(Position const& mpos)
if (me->GetExactDist(mpos) <= 70.f && me->CanFreeMove())
{
SetBotCommandState(BOT_COMMAND_STAY);
me->InterruptNonMeleeSpells(true);
BotMovement(BOT_MOVE_POINT, &mpos, nullptr, false);
if (botPet && botPet->CanFreeMove())
{
botPet->GetBotPetAI()->SetBotCommandState(BOT_COMMAND_STAY);
botPet->InterruptNonMeleeSpells(true);
botPet->GetMotionMaster()->MovePoint(me->GetMapId(), mpos, false);
}
sendlastpos.Relocate(me);
Expand Down

0 comments on commit e0a3758

Please sign in to comment.