Skip to content

Commit

Permalink
Core/Spells: Fix Unstable Affliction
Browse files Browse the repository at this point in the history
  • Loading branch information
tobmaps committed Jul 15, 2011
1 parent 8a112a5 commit 66b2179
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 2 deletions.
2 changes: 1 addition & 1 deletion sql/base/world_database.sql
Expand Up @@ -16966,7 +16966,7 @@ INSERT INTO `spell_bonus_data` (`entry`,`direct_bonus`,`dot_bonus`,`ap_bonus`,`a
(34861, 0.402, -1, -1, -1, 'Priest - Circle of Healing'),
(19236, 0.8068, -1, -1, -1, 'Priest - Desperate Prayer'),
(2944, -1, 0.1849, -1, -1, 'Priest - Devouring Plague'),
(64844, 0.5483, -1, -1, -1, 'Priest - Divine Hymn'),
(64844, 0.564, -1, -1, -1, 'Priest - Divine Hymn'),
(63544, 0, -1, -1, -1, 'Priest - Empowered Renew'),
(2061, 0.8068, -1, -1, -1, 'Priest - Flash Heal'),
(2060, 1.6135, -1, -1, -1, 'Priest - Greater Heal'),
Expand Down
5 changes: 4 additions & 1 deletion src/server/game/Entities/Unit/Unit.cpp
Expand Up @@ -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;
Expand Down
5 changes: 5 additions & 0 deletions src/server/game/Spells/SpellMgr.cpp
Expand Up @@ -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;
Expand Down

0 comments on commit 66b2179

Please sign in to comment.