Skip to content

Commit

Permalink
Scripts/Monk: Surging Mist
Browse files Browse the repository at this point in the history
* When glyphed and in stance will cast AOE ally selection heal
* Else, cast normal heal on Explicit target
  • Loading branch information
P-Kito authored and Shauren committed Jun 23, 2016
1 parent b4c8344 commit c5bad42
Show file tree
Hide file tree
Showing 2 changed files with 51 additions and 0 deletions.
3 changes: 3 additions & 0 deletions sql/updates/world/6.x/2016_06_23_02_world.sql
@@ -0,0 +1,3 @@
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_monk_surging_mist';
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(116694,'spell_monk_surging_mist');
48 changes: 48 additions & 0 deletions src/server/scripts/Spells/spell_monk.cpp
Expand Up @@ -32,9 +32,12 @@ enum MonkSpells
SPELL_MONK_CRACKLING_JADE_LIGHTNING_CHI_PROC = 123333,
SPELL_MONK_CRACKLING_JADE_LIGHTNING_KNOCKBACK = 117962,
SPELL_MONK_CRACKLING_JADE_LIGHTNING_KNOCKBACK_CD = 117953,
SPELL_MONK_GLYPH_OF_SURGING_MIST = 120483,
SPELL_MONK_PROVOKE_SINGLE_TARGET = 116189,
SPELL_MONK_PROVOKE_AOE = 118635,
SPELL_MONK_STANCE_OF_THE_SPIRITED_CRANE = 154436,
SPELL_MONK_SURGING_MIST_HEAL = 116995,

This comment has been minimized.

Copy link
@Hadifaren

Hadifaren Jan 15, 2017

Contributor

why surging id is 116995?

This comment has been minimized.

Copy link
@Aokromes

Aokromes Jan 15, 2017

Member

because it was 6.2.4?

This comment has been minimized.

Copy link
@Hadifaren

Hadifaren Jan 15, 2017

Contributor

thank you for answer, if we change this to 116994 spell will work?

SPELL_MONK_SURGING_MIST_HEAL_GLYPHED = 123273,
};

// 117952 - Crackling Jade Lightning
Expand Down Expand Up @@ -186,9 +189,54 @@ class spell_monk_provoke : public SpellScriptLoader
}
};

// 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;
if (!sSpellMgr->GetSpellInfo(SPELL_MONK_SURGING_MIST_HEAL_GLYPHED))
return false;
if (!sSpellMgr->GetSpellInfo(SPELL_MONK_GLYPH_OF_SURGING_MIST))
return false;
return true;
}

void HandleDummy(SpellEffIndex effIndex)
{
PreventHitDefaultEffect(effIndex);
Unit* caster = GetCaster();
Unit* target = GetHitUnit();
if (caster->GetShapeshiftForm() == FORM_CRANE_STANCE && caster->HasAura(SPELL_MONK_GLYPH_OF_SURGING_MIST))
caster->CastSpell(target, SPELL_MONK_SURGING_MIST_HEAL_GLYPHED, true);
else
caster->CastSpell(target, SPELL_MONK_SURGING_MIST_HEAL, true);
}

void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_monk_surging_mist_SpellScript::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};

SpellScript* GetSpellScript() const override
{
return new spell_monk_surging_mist_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();
}

2 comments on commit c5bad42

@carlos93
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is this correct? Currently, glyph aura (120483) overrides 116694 with 123273 while in form FORM_CRANE_STANCE.

@Shauren
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

well gg, even less trusting spell fixing pull requests from now on

Please sign in to comment.