Core/SmartAI: AI change on charmed

Port From (https://github.com/TrinityCore/TrinityCore/commit/8a4d731d55af63210e660727dc0aea68c8ecce05)
This commit is contained in:
hondacrx
2022-05-25 13:46:41 -04:00
parent f2ebe247ba
commit a59b3b8075
2 changed files with 36 additions and 26 deletions
+3
View File
@@ -759,6 +759,9 @@ namespace Game.AI
}
GetScript().ProcessEventsFor(SmartEvents.Charmed, null, 0, 0, charmed);
if (!GetScript().HasAnyEventWithFlag(SmartEventFlags.WhileCharmed)) // we can change AI if there are no events with this flag
base.OnCharmed(isNew);
}
public override void DoAction(int param)