Core/Spells: Blessing of the Eternals will now properly increase the proc chance for Earthliving Weapon only

This commit is contained in:
Ovahlord
2018-03-27 03:14:59 +02:00
parent 09dc44b08e
commit d2b2dc8fca
3 changed files with 43 additions and 8 deletions

View File

@@ -0,0 +1,7 @@
DELETE FROM `spell_proc` WHERE `SpellId`= 52007;
INSERT INTO `spell_proc` (`SpellId`, `ProcFlags`, `SpellTypeMask`, `SpellPhaseMask`, `HitMask`, `Cooldown`) VALUES
(52007, 0x00044000, 0x00000002, 0x00000002, 0x00000000, 0); -- Earthliving Weapon (Passive)
DELETE FROM `spell_script_names` WHERE `ScriptName`= 'spell_sha_earthliving_weapon';
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
(52007, 'spell_sha_earthliving_weapon');

View File

@@ -1200,13 +1200,6 @@ void Spell::EffectHeal(SpellEffIndex effIndex)
if (unitTarget->HasAura(974))
AddPct(addhealth, aurEff->GetAmount());
// Blessing of the Eternals
if (AuraEffect const* aurEff = caster->GetDummyAuraEffect(SPELLFAMILY_SHAMAN, 3157, EFFECT_1))
if (unitTarget->HealthBelowPct(35))
if (roll_chance_i(aurEff->GetAmount()))
if (SpellInfo const* earthLivingSpell = sSpellMgr->GetSpellInfo(52007))
m_caster->CastSpell(unitTarget, earthLivingSpell->Effects[EFFECT_0].TriggerSpell, true, nullptr, aurEff);
// Vessel of the Naaru (Vial of the Sunwell trinket)
if (m_spellInfo->Id == 45064)
{

View File

@@ -82,7 +82,8 @@ enum ShamanSpells
SPELL_SHAMAN_TIDAL_WAVES = 53390,
SPELL_SHAMAN_TOTEMIC_MASTERY = 38437,
SPELL_SHAMAN_UNLEASH_LIFE = 73685,
SPELL_SHAMAN_WATER_SHIELD = 52127
SPELL_SHAMAN_WATER_SHIELD = 52127,
};
enum ShamanSpellIcons
@@ -90,6 +91,7 @@ enum ShamanSpellIcons
SHAMAN_ICON_ID_SOOTHING_RAIN = 2011,
SHAMAN_ICON_ID_SHAMAN_LAVA_FLOW = 3087,
SHAMAN_ICON_ID_CLEANSING_WATERS = 2020,
SHAMAN_ICON_ID_BLESSING_OF_THE_ETERNALS = 3157
};
enum MiscSpells
@@ -1717,6 +1719,38 @@ class spell_sha_healing_rain_triggered : public SpellScriptLoader
}
};
class spell_sha_earthliving_weapon : public SpellScriptLoader
{
public:
spell_sha_earthliving_weapon() : SpellScriptLoader("spell_sha_earthliving_weapon") { }
class spell_sha_earthliving_weapon_AuraScript : public AuraScript
{
PrepareAuraScript(spell_sha_earthliving_weapon_AuraScript);
bool CheckProc(ProcEventInfo& eventInfo)
{
// Blessing of the Eternals
// Increases the default 20% proc chance by additional 40%/80% when healing target is below 35% health
if (eventInfo.GetHealInfo()->GetTarget() && eventInfo.GetHealInfo()->GetTarget()->HealthBelowPct(35))
if (AuraEffect const* aurEff = GetUnitOwner()->GetDummyAuraEffect(SPELLFAMILY_SHAMAN, SHAMAN_ICON_ID_BLESSING_OF_THE_ETERNALS, EFFECT_1))
return roll_chance_i(20 + aurEff->GetBaseAmount());
// Default Proc Chance is 20%
return roll_chance_i(20);
}
void Register() override
{
DoCheckProc += AuraCheckProcFn(spell_sha_earthliving_weapon_AuraScript::CheckProc);
}
};
AuraScript* GetAuraScript() const override
{
return new spell_sha_earthliving_weapon_AuraScript();
}
};
void AddSC_shaman_spell_scripts()
{
@@ -1730,6 +1764,7 @@ void AddSC_shaman_spell_scripts()
new spell_sha_earth_shield();
new spell_sha_earthbind_totem();
new spell_sha_earthen_power();
new spell_sha_earthliving_weapon();
new spell_sha_earth_shock();
new spell_sha_elemental_overload();
new spell_sha_feedback();