From 63b4a12251345f6bd7c4e85d9acc63ad6ca64cb9 Mon Sep 17 00:00:00 2001 From: QAston Date: Sun, 8 Mar 2009 01:16:57 +0100 Subject: *Fix Incanter's Absorption. *Fix Devastate and Improved Fear- by Lightguard. *Fix Glyph of devastate. *Add spell coeficient-by cccyril. --HG-- branch : trunk --- src/game/SpellAuras.cpp | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'src/game/SpellAuras.cpp') diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index 012b576d432..75d3b2d431c 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -945,15 +945,18 @@ void Aura::_RemoveAura() AuraSlotEntry *entry = m_target->GetVisibleAura(slot); if (entry) { - entry->m_slotAuras[GetEffIndex()]=NULL; //unregister aura - for(uint8 i = 0; i < 3; ++i) //check slot for more auras of the spell + // we have more auras, do not clear slot + if (entry->m_slotAuras[GetEffIndex()]==this) { - if(entry->m_slotAuras[i]) + entry->m_slotAuras[GetEffIndex()]=NULL; //unregister aura + for(uint8 i = 0; i < 3; ++i) //check slot for more auras of the spell { - lastaura = false; - break; + if(entry->m_slotAuras[i]) + { + lastaura = false; + break; + } } - } } @@ -3112,6 +3115,21 @@ void Aura::HandleModFear(bool apply, bool Real) //m_target->SetFeared(apply, GetCasterGUID(), GetId()); m_target->SetControlled(apply, UNIT_STAT_FLEEING); + + // Improved Fear + if(!apply && m_spellProto->SpellFamilyName == SPELLFAMILY_WARLOCK) + { + Unit* caster = GetCaster(); + if(!caster || caster->GetTypeId() != TYPEID_PLAYER) + return; + uint32 spell_id = 0; + if(caster->HasAura(53754, 0)) + spell_id = 60946; + else if(caster->HasAura(53759, 0)) + spell_id = 60947; + if(spell_id) + m_target->CastSpell(m_target, spell_id, true); + } } void Aura::HandleFeignDeath(bool apply, bool Real) -- cgit v1.2.3