diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index ca1ff0522..1eae7fe10 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -5897,6 +5897,7 @@ void Aura::HandleShapeshiftBoosts(bool apply) void Aura::HandleSpellSpecificBoosts(bool apply) { + bool at_remove = false; // if spell must be casted at aura remove uint32 spellId1 = 0; uint32 spellId2 = 0; uint32 spellId3 = 0; @@ -5925,6 +5926,37 @@ void Aura::HandleSpellSpecificBoosts(bool apply) } break; } + case SPELLFAMILY_WARLOCK: + if(!apply) + { + // Fear + if (m_spellProto->SpellFamilyFlags & UI64LIT(0x0000040000000000)) + { + Unit* caster = GetCaster(); + if(!caster) + return; + + Unit::AuraList const& dummyAuras = caster->GetAurasByType(SPELL_AURA_DUMMY); + for(Unit::AuraList::const_iterator itr = dummyAuras.begin(); itr != dummyAuras.end(); ++itr) + { + SpellEntry const* dummyEntry = (*itr)->GetSpellProto(); + // Improved Fear + if (dummyEntry->SpellFamilyName == SPELLFAMILY_WARLOCK && dummyEntry->SpellIconID == 98) + { + at_remove = true; + switch((*itr)->GetModifier()->m_amount) + { + // Rank 1 + case 0: spellId1 = 60946; break; + // Rank 1 + case 1: spellId1 = 60947; break; + } + break; + } + } + } + } + break; case SPELLFAMILY_PRIEST: switch(GetId()) { @@ -6071,7 +6103,7 @@ void Aura::HandleSpellSpecificBoosts(bool apply) // prevent aura deletion, specially in multi-boost case SetInUse(true); - if (apply) + if (apply || at_remove) { if (spellId1) m_target->CastSpell(m_target, spellId1, true, NULL, this); diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index 26fa99044..06fce51d0 100644 --- a/src/shared/revision_nr.h +++ b/src/shared/revision_nr.h @@ -1,4 +1,4 @@ #ifndef __REVISION_NR_H__ #define __REVISION_NR_H__ - #define REVISION_NR "8956" + #define REVISION_NR "8957" #endif // __REVISION_NR_H__