diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 19 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_shaman.cpp | 88 |
2 files changed, 86 insertions, 21 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index 1cf790f565f..5ad59ebc5d0 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -6332,17 +6332,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere target = this; break; } - // Glyph of Healing Wave - case 55440: - { - // Not proc from self heals - if (this == victim) - return false; - basepoints0 = CalculatePct(int32(damage), triggerAmount); - target = this; - triggered_spell_id = 55533; - break; - } // Spirit Hunt case 58877: { @@ -6456,14 +6445,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere triggered_spell_id = 63685; break; } - // Ancestral Awakening - if (dummySpell->SpellIconID == 3065) - { - triggered_spell_id = 52759; - basepoints0 = CalculatePct(int32(damage), triggerAmount); - target = this; - break; - } // Flametongue Weapon (Passive) if (dummySpell->SpellFamilyFlags[0] & 0x200000) { diff --git a/src/server/scripts/Spells/spell_shaman.cpp b/src/server/scripts/Spells/spell_shaman.cpp index c0f10fcc97b..5c19e3771b1 100644 --- a/src/server/scripts/Spells/spell_shaman.cpp +++ b/src/server/scripts/Spells/spell_shaman.cpp @@ -32,6 +32,7 @@ enum ShamanSpells { SPELL_HUNTER_INSANITY = 95809, SPELL_MAGE_TEMPORAL_DISPLACEMENT = 80354, + SPELL_SHAMAN_ANCESTRAL_AWAKENING = 52759, SPELL_SHAMAN_ANCESTRAL_AWAKENING_PROC = 52752, SPELL_SHAMAN_BIND_SIGHT = 6277, SPELL_SHAMAN_EARTH_SHIELD_HEAL = 379, @@ -42,6 +43,7 @@ enum ShamanSpells SPELL_SHAMAN_FOCUSED_INSIGHT = 77800, SPELL_SHAMAN_GLYPH_OF_EARTH_SHIELD = 63279, SPELL_SHAMAN_GLYPH_OF_HEALING_STREAM_TOTEM = 55456, + SPELL_SHAMAN_GLYPH_OF_HEALING_WAVE = 55533, SPELL_SHAMAN_GLYPH_OF_MANA_TIDE = 55441, SPELL_SHAMAN_GLYPH_OF_THUNDERSTORM = 62132, SPELL_SHAMAN_LAVA_BURST = 51505, @@ -69,6 +71,43 @@ enum ShamanSpellIcons SHAMAN_ICON_ID_SHAMAN_LAVA_FLOW = 3087 }; +// -51556 - Ancestral Awakening +class spell_sha_ancestral_awakening : public SpellScriptLoader +{ + public: + spell_sha_ancestral_awakening() : SpellScriptLoader("spell_sha_ancestral_awakening") { } + + class spell_sha_ancestral_awakening_AuraScript : public AuraScript + { + PrepareAuraScript(spell_sha_ancestral_awakening_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_TIDAL_WAVES)) + return false; + return true; + } + + void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + int32 heal = CalculatePct(int32(eventInfo.GetHealInfo()->GetHeal()), aurEff->GetAmount()); + + GetTarget()->CastCustomSpell(SPELL_SHAMAN_ANCESTRAL_AWAKENING, SPELLVALUE_BASE_POINT0, heal, (Unit*)NULL, true, NULL, aurEff); + } + + void Register() OVERRIDE + { + OnEffectProc += AuraEffectProcFn(spell_sha_ancestral_awakening_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_sha_ancestral_awakening_AuraScript(); + } +}; + // 52759 - Ancestral Awakening /// Updated 4.3.4 class spell_sha_ancestral_awakening_proc : public SpellScriptLoader @@ -90,8 +129,7 @@ class spell_sha_ancestral_awakening_proc : public SpellScriptLoader void HandleDummy(SpellEffIndex /*effIndex*/) { int32 damage = GetEffectValue(); - if (GetCaster() && GetHitUnit()) - GetCaster()->CastCustomSpell(GetHitUnit(), SPELL_SHAMAN_ANCESTRAL_AWAKENING_PROC, &damage, NULL, NULL, true); + GetCaster()->CastCustomSpell(GetHitUnit(), SPELL_SHAMAN_ANCESTRAL_AWAKENING_PROC, &damage, NULL, NULL, true); } void Register() OVERRIDE @@ -529,6 +567,50 @@ class spell_sha_focused_insight : public SpellScriptLoader } }; +// 55440 - Glyph of Healing Wave +class spell_sha_glyph_of_healing_wave : public SpellScriptLoader +{ + public: + spell_sha_glyph_of_healing_wave() : SpellScriptLoader("spell_sha_glyph_of_healing_wave") { } + + class spell_sha_glyph_of_healing_wave_AuraScript : public AuraScript + { + PrepareAuraScript(spell_sha_glyph_of_healing_wave_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_SHAMAN_GLYPH_OF_HEALING_WAVE)) + return false; + return true; + } + + bool CheckProc(ProcEventInfo& eventInfo) + { + // Not proc from self heals + return GetTarget() != eventInfo.GetProcTarget(); + } + + void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + int32 heal = CalculatePct(int32(eventInfo.GetHealInfo()->GetHeal()), aurEff->GetAmount()); + + GetTarget()->CastCustomSpell(SPELL_SHAMAN_GLYPH_OF_HEALING_WAVE, SPELLVALUE_BASE_POINT0, heal, (Unit*)NULL, true, NULL, aurEff); + } + + void Register() OVERRIDE + { + DoCheckProc += AuraCheckProcFn(spell_sha_glyph_of_healing_wave_AuraScript::CheckProc); + OnEffectProc += AuraEffectProcFn(spell_sha_glyph_of_healing_wave_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_sha_glyph_of_healing_wave_AuraScript(); + } +}; + // 52041 - Healing Stream Totem /// Updated 4.3.4 class spell_sha_healing_stream_totem : public SpellScriptLoader @@ -1080,6 +1162,7 @@ class spell_sha_tidal_waves : public SpellScriptLoader void AddSC_shaman_spell_scripts() { + new spell_sha_ancestral_awakening(); new spell_sha_ancestral_awakening_proc(); new spell_sha_bloodlust(); new spell_sha_chain_heal(); @@ -1090,6 +1173,7 @@ void AddSC_shaman_spell_scripts() new spell_sha_fire_nova(); new spell_sha_flame_shock(); new spell_sha_focused_insight(); + new spell_sha_glyph_of_healing_wave(); new spell_sha_healing_stream_totem(); new spell_sha_heroism(); new spell_sha_item_lightning_shield(); |
