From f8adc4f30d3a98b515b9ff7174ef5d01693a3e38 Mon Sep 17 00:00:00 2001 From: Astellar Date: Tue, 25 Aug 2009 14:51:22 +0400 Subject: [PATCH] [8418] Implement work talent 47193. Signed-off-by: VladimirMangos --- src/game/SpellAuras.cpp | 6 ++++++ src/game/SpellEffects.cpp | 45 +++++++++++++++++++++++++++++++++++++++++++-- src/shared/revision_nr.h | 2 +- 3 files changed, 50 insertions(+), 3 deletions(-) diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp index f7936c4ec..ba2721410 100644 --- a/src/game/SpellAuras.cpp +++ b/src/game/SpellAuras.cpp @@ -4887,11 +4887,17 @@ void Aura::HandleAuraModIncreaseHealth(bool apply, bool Real) case 34511: // Valor (Bulwark of Kings, Bulwark of the Ancient Kings) case 44055: // Tremendous Fortitude (Battlemaster's Alacrity) case 50322: // Survival Instincts + case 54443: // Demonic Empowerment (Voidwalker) { if(Real) { if(apply) { + // Demonic Empowerment (Voidwalker) - special case, store percent in data + // recalculate to full amount at apply for proper remove + if (GetId() == 54443) + m_modifier.m_amount = m_target->GetMaxHealth() * m_modifier.m_amount / 100; + m_target->HandleStatModifier(UNIT_MOD_HEALTH, TOTAL_VALUE, float(m_modifier.m_amount), apply); m_target->ModifyHealth(m_modifier.m_amount); } diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index 49c7c4493..d5d82c579 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -4918,11 +4918,26 @@ void Spell::EffectScriptEffect(uint32 effIndex) unitTarget->HandleEmoteCommand(EMOTE_STATE_DANCE); return; } + // Demonic Empowerment (succubus Vanish effect) + case 54436: + { + if(!unitTarget) + return; + + unitTarget->RemoveSpellsCausingAura(SPELL_AURA_MOD_ROOT); + unitTarget->RemoveSpellsCausingAura(SPELL_AURA_MOD_DECREASE_SPEED); + unitTarget->RemoveSpellsCausingAura(SPELL_AURA_MOD_STALKED); + unitTarget->RemoveSpellsCausingAura(SPELL_AURA_MOD_STUN); + return; + } // Escape artist case 20589: { - m_caster->RemoveSpellsCausingAura(SPELL_AURA_MOD_ROOT); - m_caster->RemoveSpellsCausingAura(SPELL_AURA_MOD_DECREASE_SPEED); + if(!unitTarget) + return; + + unitTarget->RemoveSpellsCausingAura(SPELL_AURA_MOD_ROOT); + unitTarget->RemoveSpellsCausingAura(SPELL_AURA_MOD_DECREASE_SPEED); return; } // Mirren's Drinking Hat @@ -4948,6 +4963,8 @@ void Spell::EffectScriptEffect(uint32 effIndex) // Improved Sprint case 30918: { + if(!unitTarget) + return; // Removes snares and roots. uint32 mechanic_mask = (1<GetAuras(); @@ -5116,6 +5133,8 @@ void Spell::EffectScriptEffect(uint32 effIndex) case 47871: case 47878: { + if(!unitTarget) + return; uint32 itemtype; uint32 rank = 0; Unit::AuraList const& mDummyAuras = unitTarget->GetAurasByType(SPELL_AURA_DUMMY); @@ -5168,6 +5187,26 @@ void Spell::EffectScriptEffect(uint32 effIndex) DoCreateItem( effIndex, itemtype ); return; } + // Demonic Empowerment + case 47193: + { + if(!unitTarget) + return; + uint32 entry = unitTarget->GetEntry(); + uint32 spellID; + switch(entry) + { + case 416: spellID = 54444; break; //imp + case 417: spellID = 54509; break; //fellhunter + case 1860: spellID = 54443; break; //void + case 1863: spellID = 54435; break; //succubus + case 17252: spellID = 54508; break; //fellguard + default: + return; + } + unitTarget->CastSpell(unitTarget,spellID,true); + return; + } // Everlasting Affliction case 47422: { @@ -5222,6 +5261,8 @@ void Spell::EffectScriptEffect(uint32 effIndex) // Chimera Shot case 53209: { + if(!unitTarget) + return; uint32 spellId = 0; int32 basePoint = 0; Unit* target = unitTarget; diff --git a/src/shared/revision_nr.h b/src/shared/revision_nr.h index eb0d2096b..a8db5e5cb 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 "8417" + #define REVISION_NR "8418" #endif // __REVISION_NR_H__ -- 2.11.4.GIT