diff options
| author | Shauren <shauren.trinity@gmail.com> | 2017-04-16 01:13:09 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2017-04-16 01:13:09 +0200 |
| commit | c0eb6c313053d2437abf2e7fff9ab50645c98559 (patch) | |
| tree | e9c79ce1a961355911fb2e8e04d0cd39b1c409c0 /src/server/scripts/Spells | |
| parent | 43510a258c83215efcf5e70a253523e8a4199502 (diff) | |
Core/Entities: Update updatefields to 7.2.0
Diffstat (limited to 'src/server/scripts/Spells')
| -rw-r--r-- | src/server/scripts/Spells/spell_monk.cpp | 110 | ||||
| -rw-r--r-- | src/server/scripts/Spells/spell_priest.cpp | 28 |
2 files changed, 1 insertions, 137 deletions
diff --git a/src/server/scripts/Spells/spell_monk.cpp b/src/server/scripts/Spells/spell_monk.cpp index aee2db42146..0d9e6ad3f3d 100644 --- a/src/server/scripts/Spells/spell_monk.cpp +++ b/src/server/scripts/Spells/spell_monk.cpp @@ -99,7 +99,7 @@ public: if (GetTarget()->HasAura(SPELL_MONK_CRACKLING_JADE_LIGHTNING_KNOCKBACK_CD)) return false; - if (eventInfo.GetActor()->GetGUID() != GetTarget()->GetChannelObjectGuid()) + if (eventInfo.GetActor()->HasAura(SPELL_MONK_CRACKLING_JADE_LIGHTNING_CHANNEL, GetTarget()->GetGUID())) return false; Spell* currentChanneledSpell = GetTarget()->GetCurrentSpell(CURRENT_CHANNELED_SPELL); @@ -188,117 +188,9 @@ public: } }; -// 116694 - Surging Mist -class spell_monk_surging_mist : public SpellScriptLoader -{ - public: - spell_monk_surging_mist() : SpellScriptLoader("spell_monk_surging_mist") { } - - class spell_monk_surging_mist_SpellScript : public SpellScript - { - PrepareSpellScript(spell_monk_surging_mist_SpellScript); - - bool Validate(SpellInfo const* /*spellInfo*/) override - { - if (!sSpellMgr->GetSpellInfo(SPELL_MONK_SURGING_MIST_HEAL)) - return false; - return true; - } - - void SelectTarget(WorldObject*& target) - { - Unit* caster = GetCaster(); - if (caster->GetUInt32Value(UNIT_CHANNEL_SPELL) == SPELL_MONK_SOOTHING_MIST) - if (Unit* soothingMistTarget = ObjectAccessor::GetUnit(*caster, caster->GetChannelObjectGuid())) - target = soothingMistTarget; - } - - void HandleDummy(SpellEffIndex effIndex) - { - PreventHitDefaultEffect(effIndex); - GetCaster()->CastSpell(GetHitUnit(), SPELL_MONK_SURGING_MIST_HEAL, true); - } - - void Register() override - { - OnObjectTargetSelect += SpellObjectTargetSelectFn(spell_monk_surging_mist_SpellScript::SelectTarget, EFFECT_0, TARGET_UNIT_TARGET_ALLY); - OnEffectHitTarget += SpellEffectFn(spell_monk_surging_mist_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); - } - }; - - SpellScript* GetSpellScript() const override - { - return new spell_monk_surging_mist_SpellScript(); - } -}; - -// 123273 - Surging Mist (Glyphed) -class spell_monk_surging_mist_glyphed : public SpellScriptLoader -{ -public: - spell_monk_surging_mist_glyphed() : SpellScriptLoader("spell_monk_surging_mist_glyphed") { } - - class spell_monk_surging_mist_glyphed_SpellScript : public SpellScript - { - PrepareSpellScript(spell_monk_surging_mist_glyphed_SpellScript); - - bool Validate(SpellInfo const* /*spellInfo*/) override - { - if (!sSpellMgr->GetSpellInfo(SPELL_MONK_SURGING_MIST_HEAL)) - return false; - if (!sSpellMgr->GetSpellInfo(SPELL_MONK_SOOTHING_MIST)) - return false; - return true; - } - - void SelectTarget(std::list<WorldObject*>& targets) - { - Unit* caster = GetCaster(); - if (caster->GetUInt32Value(UNIT_CHANNEL_SPELL) == SPELL_MONK_SOOTHING_MIST) - { - targets.clear(); - if (Unit* soothingMistTarget = ObjectAccessor::GetUnit(*caster, caster->GetChannelObjectGuid())) - targets.push_back(soothingMistTarget); - } - else - { - targets.remove_if([caster](WorldObject* target) - { - return target->GetTypeId() != TYPEID_UNIT || !target->ToUnit()->IsInRaidWith(caster); - }); - targets.sort(Trinity::HealthPctOrderPred()); - if (!targets.empty()) - targets.resize(1); - } - - if (targets.empty()) - targets.push_back(caster); - } - - void HandleDummy(SpellEffIndex effIndex) - { - PreventHitDefaultEffect(effIndex); - GetCaster()->CastSpell(GetHitUnit(), SPELL_MONK_SURGING_MIST_HEAL, true); - } - - void Register() override - { - OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_monk_surging_mist_glyphed_SpellScript::SelectTarget, EFFECT_0, TARGET_UNIT_SRC_AREA_ALLY); - OnEffectHitTarget += SpellEffectFn(spell_monk_surging_mist_glyphed_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY); - } - }; - - SpellScript* GetSpellScript() const override - { - return new spell_monk_surging_mist_glyphed_SpellScript(); - } -}; - void AddSC_monk_spell_scripts() { new spell_monk_crackling_jade_lightning(); new spell_monk_crackling_jade_lightning_knockback_proc_aura(); new spell_monk_provoke(); - new spell_monk_surging_mist(); - new spell_monk_surging_mist_glyphed(); } diff --git a/src/server/scripts/Spells/spell_priest.cpp b/src/server/scripts/Spells/spell_priest.cpp index e6c1eb43b2f..a815f8d893b 100644 --- a/src/server/scripts/Spells/spell_priest.cpp +++ b/src/server/scripts/Spells/spell_priest.cpp @@ -748,33 +748,6 @@ class spell_pri_mana_leech : public SpellScriptLoader } }; -// 49821 - Mind Sear -class spell_pri_mind_sear : public SpellScriptLoader -{ - public: - spell_pri_mind_sear() : SpellScriptLoader("spell_pri_mind_sear") { } - - class spell_pri_mind_sear_SpellScript : public SpellScript - { - PrepareSpellScript(spell_pri_mind_sear_SpellScript); - - void FilterTargets(std::list<WorldObject*>& unitList) - { - unitList.remove_if(Trinity::ObjectGUIDCheck(GetCaster()->GetChannelObjectGuid())); - } - - void Register() override - { - OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_pri_mind_sear_SpellScript::FilterTargets, EFFECT_0, TARGET_UNIT_DEST_AREA_ENEMY); - } - }; - - SpellScript* GetSpellScript() const override - { - return new spell_pri_mind_sear_SpellScript(); - } -}; - // 47948 - Pain and Suffering (Proc) class spell_pri_pain_and_suffering_proc : public SpellScriptLoader { @@ -1309,7 +1282,6 @@ void AddSC_priest_spell_scripts() new spell_pri_lightwell_renew(); new spell_pri_mana_burn(); new spell_pri_mana_leech(); - new spell_pri_mind_sear(); new spell_pri_pain_and_suffering_proc(); new spell_pri_penance(); new spell_pri_phantasm(); |
