diff options
author | xinef1 <w.szyszko2@gmail.com> | 2016-12-26 13:42:31 +0100 |
---|---|---|
committer | DoctorKraft <DoctorKraft@users.noreply.github.com> | 2018-03-18 00:19:36 +0100 |
commit | 10af748969bc43d7bdcfaf70daadef31c84ef0dd (patch) | |
tree | edc03465f45ef98dfb64982553adadd8a86527c7 | |
parent | f44572ce56989baffd7e1f6cbf62f39fa65ec343 (diff) |
Core/Units: Fixed bug in stun code making units summoned by npcs to never break out of stun (#18612)
(cherry picked from commit 7c3961244d83503191881cfd64745781cc1253ab)
-rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 1d6ba29800b..719f58ad870 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -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 |