mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-02-02 07:07:29 +01:00
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 ddf2f60c13)
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