From 66b217991c4dc1020847d741fdc35896e3c39b49 Mon Sep 17 00:00:00 2001 From: tobmaps Date: Sat, 16 Jul 2011 01:24:15 +0700 Subject: Core/Spells: Fix Unstable Affliction Closes #94 Closes #1244 Closes #1528 --- src/server/game/Entities/Unit/Unit.cpp | 5 ++++- src/server/game/Spells/SpellMgr.cpp | 5 +++++ 2 files changed, 9 insertions(+), 1 deletion(-) (limited to 'src/server') diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 55ccaf40468..ccb2b3d5bc7 100755 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -3714,11 +3714,14 @@ void Unit::RemoveAurasDueToSpellByDispel(uint32 spellId, uint64 casterGUID, Unit // Unstable Affliction (crash if before removeaura?) if (aura->GetSpellProto()->SpellFamilyFlags[1] & 0x0100) { + Unit* caster = aura->GetCaster(); + if (!caster) + break; if (AuraEffect const* aurEff = aura->GetEffect(EFFECT_0)) { int32 damage = aurEff->GetAmount() * 9; // backfire damage and silence - dispeller->CastCustomSpell(dispeller, 31117, &damage, NULL, NULL, true, NULL, NULL, aura->GetCasterGUID()); + caster->CastCustomSpell(dispeller, 31117, &damage, NULL, NULL, true, NULL, aurEff); } } break; diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp index 69f76c51777..47f1e3c803d 100755 --- a/src/server/game/Spells/SpellMgr.cpp +++ b/src/server/game/Spells/SpellMgr.cpp @@ -3942,6 +3942,11 @@ void SpellMgr::LoadSpellCustomAttr() spellInfo->AttributesEx3 |= SPELL_ATTR3_CAN_PROC_WITH_TRIGGERED; ++count; break; + case 31117: // Unstable Affliction + // this attribute currently makes spell to ignore resilience and absorbs + spellInfo->AttributesEx4 &= ~SPELL_ATTR4_FIXED_DAMAGE; + ++count; + break; case 16007: // Draco-Incarcinatrix 900 // was 46, but effect is aura effect spellInfo->EffectImplicitTargetA[0] = TARGET_UNIT_NEARBY_ENTRY; -- cgit v1.2.3