Skip to content

Commit

Permalink
Unit: Stop chasing the charmer to allow following him correctly after…
Browse files Browse the repository at this point in the history
… being charmed
  • Loading branch information
deiteris committed Nov 3, 2023
1 parent 2d79f6d commit 815a84d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/game/Entities/Unit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -11300,6 +11300,10 @@ bool Unit::TakeCharmOf(Unit* charmed, uint32 spellId, bool advertised /*= true*/
charmed->ClearInCombat();
}

MotionMaster* mm = charmed->GetMotionMaster();
if (mm->GetCurrentMovementGeneratorType() == CHASE_MOTION_TYPE)
mm->MovementExpired();

if (UnitAI* ai = charmed->AI())
ai->JustGotCharmed(this);

Expand Down

0 comments on commit 815a84d

Please sign in to comment.