Core/Units: Fixed bug in stun code making units summoned by npcs to never break out of stun
This commit is contained in:
@@ -1149,8 +1149,8 @@ namespace Game.Entities
|
|||||||
SetTarget(GetVictim().GetGUID());
|
SetTarget(GetVictim().GetGUID());
|
||||||
|
|
||||||
// don't remove UNIT_FLAG_STUNNED for pet when owner is mounted (disabled pet's interface)
|
// don't remove UNIT_FLAG_STUNNED for pet when owner is mounted (disabled pet's interface)
|
||||||
Unit owner = GetOwner();
|
Unit owner = GetCharmerOrOwner();
|
||||||
if (owner == null || (owner.IsTypeId(TypeId.Player) && !owner.ToPlayer().IsMounted()))
|
if (owner == null || !owner.IsTypeId(TypeId.Player) || !owner.ToPlayer().IsMounted())
|
||||||
RemoveFlag(UnitFields.Flags, UnitFlags.Stunned);
|
RemoveFlag(UnitFields.Flags, UnitFlags.Stunned);
|
||||||
|
|
||||||
if (!HasUnitState(UnitState.Root)) // prevent moving if it also has root effect
|
if (!HasUnitState(UnitState.Root)) // prevent moving if it also has root effect
|
||||||
|
|||||||
Reference in New Issue
Block a user