diff options
Diffstat (limited to 'src')
| -rw-r--r-- | src/server/game/Entities/Unit/Unit.cpp | 6 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_druid.cpp | 44 |
2 files changed, 39 insertions, 11 deletions
diff --git a/src/server/game/Entities/Unit/Unit.cpp b/src/server/game/Entities/Unit/Unit.cpp index f119be464dd..f724f67a990 100644 --- a/src/server/game/Entities/Unit/Unit.cpp +++ b/src/server/game/Entities/Unit/Unit.cpp @@ -5574,12 +5574,6 @@ bool Unit::HandleDummyAuraProc(Unit* victim, uint32 damage, AuraEffect* triggere { switch (dummySpell->Id) { - // Glyph of Starfire - case 54845: - { - triggered_spell_id = 54846; - break; - } // Glyph of Bloodletting case 54815: { diff --git a/src/server/scripts/Spells/spell_druid.cpp b/src/server/scripts/Spells/spell_druid.cpp index d3b9d6bdaca..e977fcfba97 100644 --- a/src/server/scripts/Spells/spell_druid.cpp +++ b/src/server/scripts/Spells/spell_druid.cpp @@ -40,6 +40,7 @@ enum DruidSpells SPELL_DRUID_LUNAR_ECLIPSE = 48518, SPELL_DRUID_ENRAGE_MOD_DAMAGE = 51185, SPELL_DRUID_GLYPH_OF_INNERVATE = 54833, + SPELL_DRUID_GLYPH_OF_STARFIRE = 54846, SPELL_DRUID_GLYPH_OF_TYPHOON = 62135, SPELL_DRUID_IDOL_OF_FERAL_SHADOWS = 34241, SPELL_DRUID_IDOL_OF_WORSHIP = 60774, @@ -49,7 +50,6 @@ enum DruidSpells SPELL_DRUID_LIFEBLOOM_FINAL_HEAL = 33778, SPELL_DRUID_LIVING_SEED_HEAL = 48503, SPELL_DRUID_LIVING_SEED_PROC = 48504, - SPELL_DRUID_NATURES_SPLENDOR = 57865, SPELL_DRUID_SURVIVAL_INSTINCTS = 50322, SPELL_DRUID_SAVAGE_ROAR = 62071, SPELL_DRUID_TIGER_S_FURY_ENERGIZE = 51178, @@ -277,7 +277,7 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE { - if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_INCREASED_MOONFIRE_DURATION) || !sSpellMgr->GetSpellInfo(SPELL_DRUID_NATURES_SPLENDOR)) + if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_INCREASED_MOONFIRE_DURATION)) return false; return true; } @@ -286,7 +286,7 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader { Unit* caster = GetCaster(); if (Unit* unitTarget = GetHitUnit()) - if (AuraEffect const* aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, 0x00000002, 0, 0, caster->GetGUID())) + if (AuraEffect const* aurEff = unitTarget->GetAuraEffect(SPELL_AURA_PERIODIC_DAMAGE, SPELLFAMILY_DRUID, 0x2, 0, 0, caster->GetGUID())) { Aura* aura = aurEff->GetBase(); @@ -294,8 +294,6 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader uint32 countMax = aura->GetSpellInfo()->GetMaxDuration() + 9000; if (caster->HasAura(SPELL_DRUID_INCREASED_MOONFIRE_DURATION)) countMax += 3000; - if (caster->HasAura(SPELL_DRUID_NATURES_SPLENDOR)) - countMax += 3000; if (countMin < countMax) { @@ -317,6 +315,41 @@ class spell_dru_glyph_of_starfire : public SpellScriptLoader } }; +// 54845 - Glyph of Starfire +class spell_dru_glyph_of_starfire_proc : public SpellScriptLoader +{ + public: + spell_dru_glyph_of_starfire_proc() : SpellScriptLoader("spell_dru_glyph_of_starfire_proc") { } + + class spell_dru_glyph_of_starfire_proc_AuraScript : public AuraScript + { + PrepareAuraScript(spell_dru_glyph_of_starfire_proc_AuraScript); + + bool Validate(SpellInfo const* /*spellInfo*/) OVERRIDE + { + if (!sSpellMgr->GetSpellInfo(SPELL_DRUID_GLYPH_OF_STARFIRE)) + return false; + return true; + } + + void HandleEffectProc(AuraEffect const* aurEff, ProcEventInfo& eventInfo) + { + PreventDefaultAction(); + GetTarget()->CastSpell(eventInfo.GetProcTarget(), SPELL_DRUID_GLYPH_OF_STARFIRE, true, NULL, aurEff); + } + + void Register() OVERRIDE + { + OnEffectProc += AuraEffectProcFn(spell_dru_glyph_of_starfire_proc_AuraScript::HandleEffectProc, EFFECT_0, SPELL_AURA_DUMMY); + } + }; + + AuraScript* GetAuraScript() const OVERRIDE + { + return new spell_dru_glyph_of_starfire_proc_AuraScript(); + } +}; + // 34246 - Idol of the Emerald Queen // 60779 - Idol of Lush Moss class spell_dru_idol_lifebloom : public SpellScriptLoader @@ -1154,6 +1187,7 @@ void AddSC_druid_spell_scripts() new spell_dru_enrage(); new spell_dru_glyph_of_innervate(); new spell_dru_glyph_of_starfire(); + new spell_dru_glyph_of_starfire_proc(); new spell_dru_idol_lifebloom(); new spell_dru_innervate(); new spell_dru_insect_swarm(); |
