Skip to content

Commit

Permalink
Scripts/Spells: Implement omen of clarity talent (Restoration) (Trini…
Browse files Browse the repository at this point in the history
  • Loading branch information
aquadeus authored Aug 20, 2024
1 parent 90eed65 commit 44719eb
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
7 changes: 7 additions & 0 deletions sql/updates/world/master/2024_08_20_00_world.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
DELETE FROM `spell_proc` WHERE `SpellId` IN (16870);
INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
(16870,0x00,7,0x00000000,0x00000000,0x00000000,0x00000000,0x4000,0x0,0x2,0x2,0x0,0x18,0x0,0,0,0,0); -- Clearcasting

DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_dru_omen_of_clarity_restoration';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(113043, 'spell_dru_omen_of_clarity_restoration');
15 changes: 15 additions & 0 deletions src/server/scripts/Spells/spell_druid.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1355,6 +1355,20 @@ class spell_dru_omen_of_clarity : public AuraScript
}
};

// 113043 - Omen of Clarity
class spell_dru_omen_of_clarity_restoration : public AuraScript
{
bool CheckProc(AuraEffect const* aurEff, ProcEventInfo const& /*eventInfo*/) const
{
return roll_chance_i(aurEff->GetAmount());
}

void Register() override
{
DoCheckEffectProc += AuraCheckEffectProcFn(spell_dru_omen_of_clarity_restoration::CheckProc, EFFECT_0, SPELL_AURA_PROC_TRIGGER_SPELL);
}
};

// 392303 - Power of the Archdruid
class spell_dru_power_of_the_archdruid : public AuraScript
{
Expand Down Expand Up @@ -2246,6 +2260,7 @@ void AddSC_druid_spell_scripts()
RegisterSpellScriptWithArgs(spell_dru_new_moon, "spell_dru_half_moon", Optional<DruidSpells>(SPELL_DRUID_HALF_MOON_OVERRIDE), Optional<DruidSpells>(SPELL_DRUID_NEW_MOON_OVERRIDE));
RegisterSpellScriptWithArgs(spell_dru_new_moon, "spell_dru_new_moon", Optional<DruidSpells>(SPELL_DRUID_NEW_MOON_OVERRIDE), Optional<DruidSpells>());
RegisterSpellScript(spell_dru_omen_of_clarity);
RegisterSpellScript(spell_dru_omen_of_clarity_restoration);
RegisterSpellScript(spell_dru_power_of_the_archdruid);
RegisterSpellScript(spell_dru_prowl);
RegisterSpellScript(spell_dru_rip);
Expand Down

0 comments on commit 44719eb

Please sign in to comment.