Skip to content

Instantly share code, notes, and snippets.

@tobmaps
Created November 11, 2011 22:58
Show Gist options
  • Save tobmaps/1359583 to your computer and use it in GitHub Desktop.
Save tobmaps/1359583 to your computer and use it in GitHub Desktop.
Knockback + damage vs immunes hackfix
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp
index cc23879..774fe02 100755
--- a/src/server/game/Entities/Unit/Unit.cpp
+++ b/src/server/game/Entities/Unit/Unit.cpp
@@ -11597,7 +11597,7 @@ bool Unit::IsImmunedToSpell(SpellInfo const* spellInfo)
{
// State/effect immunities applied by aura expect full spell immunity
// Ignore effects with mechanic, they are supposed to be checked separately
- if (!spellInfo->Effects[i].Mechanic)
+ if (!spellInfo->Effects[i].Mechanic && spellInfo->Effects[i].Effect != SPELL_EFFECT_KNOCK_BACK && spellInfo->Effects[i].Effect != SPELL_EFFECT_KNOCK_BACK_DEST)
if (IsImmunedToSpellEffect(spellInfo, i))
return true;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment