diff options
| author | Ovah <dreadkiller@gmx.de> | 2020-02-28 19:22:25 +0100 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-12-22 14:47:20 +0100 |
| commit | 8f4c6ebb49832fa2564e5bdb573d350d39b33117 (patch) | |
| tree | b43eb9be4ecc337730bebf52ca7e488948f9a525 /src/server/game/Entities/Unit | |
| parent | 862b0ad651c10fa5261459af9d18190e62f5819e (diff) | |
Core/Units: UNIT_FLAG_PACIFIED will no longer block victim updates (#24190)
* Core/Units: UNIT_FLAG_PACIFIED will no longer block victim updates
* pacified units should only have their melee attacks blocked as counterpart to silence mechanics
* Core/Spells: removed unnecessary attack stop call from pacify aura effect handler
(cherry picked from commit 6cbfda2fcecdda980b60b359018e520f1daeaf3a)
Diffstat (limited to 'src/server/game/Entities/Unit')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 9a7bd88076d..744e4c4b1df 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -1990,6 +1990,9 @@ void Unit::AttackerStateUpdate(Unit* victim, WeaponAttackType attType, bool extr if (HasUnitState(UNIT_STATE_CANNOT_AUTOATTACK) || HasUnitFlag(UNIT_FLAG_PACIFIED)) return; + if (HasAuraType(SPELL_AURA_DISABLE_ATTACKING_EXCEPT_ABILITIES)) + return; + if (!victim->IsAlive()) return; @@ -5419,12 +5422,6 @@ bool Unit::Attack(Unit* victim, bool meleeAttack) if (creature && creature->IsInEvadeMode()) return false; - if (HasUnitFlag(UNIT_FLAG_PACIFIED)) - return false; - - if (HasAuraType(SPELL_AURA_DISABLE_ATTACKING_EXCEPT_ABILITIES)) - return false; - // nobody can attack GM in GM-mode if (victim->GetTypeId() == TYPEID_PLAYER) { |
