aboutsummaryrefslogtreecommitdiff
path: root/src/server/game/Spells/SpellInfo.cpp
diff options
context:
space:
mode:
authorxinef1 <w.szyszko2@gmail.com>2017-02-04 23:50:32 +0100
committerShauren <shauren.trinity@gmail.com>2019-07-21 21:06:54 +0200
commitca26c33145cb40ae7fd2c84fc7577fc6f11bdbbf (patch)
tree6df7aab9ce9c322fa74c8a50354dae8af04cdd75 /src/server/game/Spells/SpellInfo.cpp
parentad008c43b75080ec59aa973f1e2e4424332c34a4 (diff)
Implemented binary resistances and some more (#18933)
- Fixed possible exploit with tamed pets having template immunities - Implemented binary resistances - Corrected resistances calculations - Pets properly inherit players spell penetration - Fixed doubled block calculation for damaging melee spells - Auras removing snare effects will only remove the snaring component - Shapeshifting will properly remove movement impairing auras only and not crowd control (dragon's breath) - Immunities are properly checked versus all schools appearing in spell, unit is immune only if immune to all schools - Spells with melee and magic school mask should compare armor reduction with resistances and select smaller reduction - Demonic Circle: Teleport no longer removes root effects (cherrypicked from 93746e8c4a79c8256cd4896533315683f143508c)
Diffstat (limited to 'src/server/game/Spells/SpellInfo.cpp')
-rw-r--r--src/server/game/Spells/SpellInfo.cpp8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellInfo.cpp b/src/server/game/Spells/SpellInfo.cpp
index f643d7b3a2f..c416460080b 100644
--- a/src/server/game/Spells/SpellInfo.cpp
+++ b/src/server/game/Spells/SpellInfo.cpp
@@ -3441,7 +3441,13 @@ void SpellInfo::ApplyAllSpellImmunitiesTo(Unit* target, SpellEffectInfo const* e
target->ApplySpellImmune(Id, IMMUNITY_MECHANIC, i, apply);
if (apply && HasAttribute(SPELL_ATTR1_DISPEL_AURAS_ON_IMMUNITY))
- target->RemoveAurasWithMechanic(mechanicImmunity, AURA_REMOVE_BY_DEFAULT, Id);
+ {
+ // exception for purely snare mechanic (eg. hands of freedom)!
+ if (mechanicImmunity == (1 << MECHANIC_SNARE))
+ target->RemoveMovementImpairingAuras(false);
+ else
+ target->RemoveAurasWithMechanic(mechanicImmunity, AURA_REMOVE_BY_DEFAULT, Id);
+ }
}
if (uint32 dispelImmunity = immuneInfo->DispelImmune)