Skip to content
This repository has been archived by the owner on Feb 29, 2024. It is now read-only.

Commit

Permalink
Scripts/Spells: Added script for flash heal, greater heal, prayer of …
Browse files Browse the repository at this point in the history
…healing.
  • Loading branch information
ArivanaDEV committed Jun 26, 2022
1 parent e28670f commit 3811563
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 0 deletions.
5 changes: 5 additions & 0 deletions sql/updates/world/2022_06_26_01_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
DELETE FROM `spell_script_names` WHERE `spell_id` IN (596, 2060, 2061);
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(2061, 'spell_pri_flash_heal'),
(2060, 'spell_pri_greater_heal'),
(596, 'spell_pri_prayer_of_healing');
99 changes: 99 additions & 0 deletions src/server/scripts/Spells/spell_priest.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@

enum PriestSpells
{
SPELL_PRIEST_INNER_FOCUS = 89485,

SPELL_PRIEST_EVANGELISM_PROC = 81661,
SPELL_PRIEST_BODY_AND_SOUL_PASSIVE = 64129,
SPELL_PRIEST_BODY_AND_SOUL_SPEED = 65081,
Expand Down Expand Up @@ -69,6 +71,99 @@ enum MiscSpells
SPELL_GEN_REPLENISHMENT = 57669
};

class spell_pri_prayer_of_healing : public SpellScriptLoader
{
public:
spell_pri_prayer_of_healing() : SpellScriptLoader("spell_pri_prayer_of_healing") { }
class spell_pri_prayer_of_healing_SpellScript : public SpellScript
{
PrepareSpellScript(spell_pri_prayer_of_healing_SpellScript);

bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_INNER_FOCUS))
return false;
return true;
}
void HandleRemoveAura(SpellEffIndex /*effIndex*/)
{
if (GetCaster()->HasAura(SPELL_PRIEST_INNER_FOCUS))
GetCaster()->RemoveAura(SPELL_PRIEST_INNER_FOCUS);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_pri_prayer_of_healing_SpellScript::HandleRemoveAura, EFFECT_0, SPELL_EFFECT_HEAL);
}
};

SpellScript* GetSpellScript() const override
{
return new spell_pri_prayer_of_healing_SpellScript();
}
};

class spell_pri_greater_heal : public SpellScriptLoader
{
public:
spell_pri_greater_heal() : SpellScriptLoader("spell_pri_greater_heal") { }
class spell_pri_greater_heal_SpellScript : public SpellScript
{
PrepareSpellScript(spell_pri_greater_heal_SpellScript);

bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_INNER_FOCUS))
return false;
return true;
}
void HandleRemoveAura(SpellEffIndex /*effIndex*/)
{
if (GetCaster()->HasAura(SPELL_PRIEST_INNER_FOCUS))
GetCaster()->RemoveAura(SPELL_PRIEST_INNER_FOCUS);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_pri_greater_heal_SpellScript::HandleRemoveAura, EFFECT_0, SPELL_EFFECT_HEAL);
}
};

SpellScript* GetSpellScript() const override
{
return new spell_pri_greater_heal_SpellScript();
}
};

class spell_pri_flash_heal : public SpellScriptLoader
{
public:
spell_pri_flash_heal() : SpellScriptLoader("spell_pri_flash_heal") { }
class spell_pri_flash_heal_SpellScript : public SpellScript
{
PrepareSpellScript(spell_pri_flash_heal_SpellScript);

bool Validate(SpellInfo const* /*spellInfo*/) override
{
if (!sSpellMgr->GetSpellInfo(SPELL_PRIEST_INNER_FOCUS))
return false;
return true;
}
void HandleRemoveAura(SpellEffIndex /*effIndex*/)
{
if (GetCaster()->HasAura(SPELL_PRIEST_INNER_FOCUS))
GetCaster()->RemoveAura(SPELL_PRIEST_INNER_FOCUS);
}
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_pri_flash_heal_SpellScript::HandleRemoveAura, EFFECT_0, SPELL_EFFECT_HEAL);
}
};

SpellScript* GetSpellScript() const override
{
return new spell_pri_flash_heal_SpellScript();
}
};

class spell_pri_evangelism : public SpellScriptLoader
{
public:
Expand Down Expand Up @@ -782,6 +877,10 @@ class spell_pri_vampiric_touch : public SpellScriptLoader

void AddSC_priest_spell_scripts()
{
new spell_pri_prayer_of_healing();
new spell_pri_greater_heal();
new spell_pri_flash_heal();

new spell_pri_evangelism();
new spell_pri_divine_aegis();
new spell_pri_item_greater_heal_refund();
Expand Down

0 comments on commit 3811563

Please sign in to comment.