Core/Units: Fixed bug in stun code making units summoned by npcs to never break out of stun (#18612)
This commit is contained in:
1 parent
297fdc6e1a
commit
3d4a36a5bd
1 file changed
+2
-2
@@ -14376,8 +14376,8 @@ void Unit::SetStunned(bool apply)
|
||||
SetTarget(EnsureVictim()->GetGUID());
|
||||
|
||||
// don't remove UNIT_FLAG_STUNNED for pet when owner is mounted (disabled pet's interface)
|
||||
Unit* owner = GetOwner();
|
||||
if (!owner || (owner->GetTypeId() == TYPEID_PLAYER && !owner->ToPlayer()->IsMounted()))
|
||||
Unit* owner = GetCharmerOrOwner();
|
||||
if (!owner || owner->GetTypeId() != TYPEID_PLAYER || !owner->ToPlayer()->IsMounted())
|
||||
RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_STUNNED);
|
||||
|
||||
if (!HasUnitState(UNIT_STATE_ROOT)) // prevent moving if it also has root effect
|
||||
|
||||
Reference in new issue
Block a user