Core/AI: Make charmed creatures follow their owner (#24195)
* Core/AI: Make charmed creatures follow their owner * Follow the charmer only when applying the charm * Make SmartAI follow the charmer (cherry picked from commit ddf2f60c1317f0ce728d5894064f51251cf71c72)
This commit is contained in:
@@ -692,6 +692,9 @@ void SmartAI::OnCharmed(bool /*isNew*/)
|
||||
|
||||
_charmed = charmed;
|
||||
|
||||
if (charmed)
|
||||
me->GetMotionMaster()->MoveFollow(me->GetCharmer(), PET_FOLLOW_DIST, me->GetFollowAngle());
|
||||
|
||||
if (!charmed && !me->IsInEvadeMode())
|
||||
{
|
||||
if (_repeatWaypointPath)
|
||||
|
||||
Reference in New Issue
Block a user