Created
April 15, 2011 08:52
-
-
Save tobmaps/921419 to your computer and use it in GitHub Desktop.
Unstable Affliction vs Resilience
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
author: me | |
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp | |
index 9452f37..4e46361 100755 | |
--- a/src/server/game/Entities/Unit/Unit.cpp | |
+++ b/src/server/game/Entities/Unit/Unit.cpp | |
@@ -3674,11 +3674,15 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit | |
// Unstable Affliction (crash if before removeaura?) | |
if (aura->GetSpellProto()->SpellFamilyName == SPELLFAMILY_WARLOCK && (aura->GetSpellProto()->SpellFamilyFlags[1] & 0x0100)) | |
{ | |
- if (AuraEffect const * aurEff = aura->GetEffect(0)) | |
+ Unit * caster = aura->GetCaster(); | |
+ if (caster) | |
{ | |
- int32 damage = aurEff->GetAmount()*9; | |
- // backfire damage and silence | |
- dispeller->CastCustomSpell(dispeller, 31117, &damage, NULL, NULL, true, NULL, NULL, aura->GetCasterGUID()); | |
+ if (AuraEffect const * aurEff = aura->GetEffect(0)) | |
+ { | |
+ int32 damage = aurEff->GetAmount()*9; | |
+ // backfire damage and silence | |
+ caster->CastCustomSpell(dispeller, 31117, &damage, NULL, NULL, true, NULL, NULL, aura->GetCasterGUID()); | |
+ } | |
} | |
} | |
// Flame Shock |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment