mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-17 08:00:48 +01:00
Core/Units: Fixed bug in stun code making units summoned by npcs to never break out of stun (#18612)
(cherry picked from commit 7c3961244d)
This commit is contained in:
@@ -11219,8 +11219,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