diff options
| author | Wyrserth <43747507+Wyrserth@users.noreply.github.com> | 2019-05-30 20:07:46 +0200 |
|---|---|---|
| committer | Giacomo Pozzoni <giacomopoz@gmail.com> | 2019-05-30 20:07:46 +0200 |
| commit | 8bc5451864570c07eff6d427846335044f85a509 (patch) | |
| tree | 4234cd86a57975dabe56039d3d2b7f69a885585c /src/server/game/Spells/SpellEffects.cpp | |
| parent | 9da81239596bf798b1beafc5ddeaeb37dcc330ff (diff) | |
Core/Misc: don't allow players to use/activate/loot non-allowed gameobjects while under the effect of a damage immunity aura (#23319)
* Core/Misc: don't allow players to use/activate/loot non-allowed gameobjects while under the effect of a damage immunity aura.
* Forgot to change this in last-second rename.
* Apply suggested changes, thanks Shauren!
Diffstat (limited to 'src/server/game/Spells/SpellEffects.cpp')
| -rw-r--r-- | src/server/game/Spells/SpellEffects.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index ffa990f9191..978974359a1 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -1873,6 +1873,10 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex) if (gameObjTarget) { GameObjectTemplate const* goInfo = gameObjTarget->GetGOInfo(); + + if (goInfo->CannotBeUsedUnderImmunity() && m_caster->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_IMMUNE)) + return; + // Arathi Basin banner opening. /// @todo Verify correctness of this check if ((goInfo->type == GAMEOBJECT_TYPE_BUTTON && goInfo->button.noDamageImmune) || (goInfo->type == GAMEOBJECT_TYPE_GOOBER && goInfo->goober.losOK)) |
