Core/Unit: Some charm fixes:
Port From (https://github.com/TrinityCore/TrinityCore/commit/34f9666f209ab3f281bf81de92c4bc1a164b0059)
This commit is contained in:
@@ -732,9 +732,16 @@ namespace Game.AI
|
||||
else
|
||||
me.SetWalk(!_run);
|
||||
|
||||
Unit charmer = me.GetCharmer();
|
||||
if (charmer)
|
||||
AttackStart(charmer);
|
||||
if (!me.LastCharmerGUID.IsEmpty())
|
||||
{
|
||||
if (!me.HasReactState(ReactStates.Passive))
|
||||
{
|
||||
Unit lastCharmer = Global.ObjAccessor.GetUnit(me, me.LastCharmerGUID);
|
||||
if (lastCharmer != null)
|
||||
me.EngageWithTarget(lastCharmer);
|
||||
}
|
||||
me.LastCharmerGUID.Clear();
|
||||
}
|
||||
}
|
||||
|
||||
GetScript().ProcessEventsFor(SmartEvents.Charmed, null, 0, 0, charmed);
|
||||
|
||||
Reference in New Issue
Block a user