mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-09 00:08:01 +00:00
fix(Core/Spell): Earthliving weapon proc (#4015)
This commit is contained in:
@@ -0,0 +1,6 @@
|
|||||||
|
INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1608429976729774300');
|
||||||
|
|
||||||
|
UPDATE `spell_proc_event` SET `procFlags` = 16384, `CustomChance` = 0 WHERE `entry` = -51940;
|
||||||
|
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_sha_earthliving_weapon';
|
||||||
|
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||||
|
(-51940, 'spell_sha_earthliving_weapon');
|
||||||
@@ -16640,16 +16640,6 @@ bool Unit::IsTriggeredAtSpellProcEvent(Unit* victim, Aura* aura, SpellInfo const
|
|||||||
// Custom chances
|
// Custom chances
|
||||||
switch (spellProto->SpellFamilyName)
|
switch (spellProto->SpellFamilyName)
|
||||||
{
|
{
|
||||||
case SPELLFAMILY_SHAMAN:
|
|
||||||
{
|
|
||||||
// Blessing of the Eternals, Earthliving proc
|
|
||||||
if (spellProto->SpellIconID == 1929)
|
|
||||||
{
|
|
||||||
if (victim && (float(victim->GetHealth() * 100.0f / victim->GetMaxHealth()) > 35.0f))
|
|
||||||
return roll_chance_f(chance);
|
|
||||||
}
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
case SPELLFAMILY_WARRIOR:
|
case SPELLFAMILY_WARRIOR:
|
||||||
{
|
{
|
||||||
// Recklessness, allow to proc only once for whirlwind
|
// Recklessness, allow to proc only once for whirlwind
|
||||||
|
|||||||
@@ -47,7 +47,8 @@ enum ShamanSpells
|
|||||||
SPELL_SHAMAN_TOTEM_EARTHBIND_EARTHGRAB = 64695,
|
SPELL_SHAMAN_TOTEM_EARTHBIND_EARTHGRAB = 64695,
|
||||||
SPELL_SHAMAN_TOTEM_EARTHBIND_TOTEM = 6474,
|
SPELL_SHAMAN_TOTEM_EARTHBIND_TOTEM = 6474,
|
||||||
SPELL_SHAMAN_TOTEM_EARTHEN_POWER = 59566,
|
SPELL_SHAMAN_TOTEM_EARTHEN_POWER = 59566,
|
||||||
SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL = 52042
|
SPELL_SHAMAN_TOTEM_HEALING_STREAM_HEAL = 52042,
|
||||||
|
SPELL_SHAMAN_BLESSING_OF_THE_ETERNALS_R1 = 51554
|
||||||
};
|
};
|
||||||
|
|
||||||
enum ShamanSpellIcons
|
enum ShamanSpellIcons
|
||||||
@@ -796,6 +797,48 @@ public:
|
|||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
// -51940 - Earthliving Weapon (Passive)
|
||||||
|
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 Validate(SpellInfo const* /*spellInfo*/) override
|
||||||
|
{
|
||||||
|
return sSpellMgr->GetSpellInfo(SPELL_SHAMAN_BLESSING_OF_THE_ETERNALS_R1);
|
||||||
|
}
|
||||||
|
|
||||||
|
bool CheckProc(ProcEventInfo& eventInfo)
|
||||||
|
{
|
||||||
|
auto chance = 20;
|
||||||
|
Unit* caster = eventInfo.GetActor();
|
||||||
|
if (AuraEffect const* aurEff = caster->GetAuraEffectOfRankedSpell(SPELL_SHAMAN_BLESSING_OF_THE_ETERNALS_R1, EFFECT_1, caster->GetGUID()))
|
||||||
|
{
|
||||||
|
if (eventInfo.GetProcTarget()->HasAuraState(AURA_STATE_HEALTHLESS_35_PERCENT))
|
||||||
|
{
|
||||||
|
chance += aurEff->GetAmount();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
return roll_chance_i(chance);
|
||||||
|
}
|
||||||
|
|
||||||
|
void Register() override
|
||||||
|
{
|
||||||
|
DoCheckProc += AuraCheckProcFn(spell_sha_earthliving_weapon_AuraScript::CheckProc);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
AuraScript* GetAuraScript() const override
|
||||||
|
{
|
||||||
|
return new spell_sha_earthliving_weapon_AuraScript();
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
// -1535 - Fire Nova
|
// -1535 - Fire Nova
|
||||||
class spell_sha_fire_nova : public SpellScriptLoader
|
class spell_sha_fire_nova : public SpellScriptLoader
|
||||||
{
|
{
|
||||||
@@ -1371,6 +1414,7 @@ void AddSC_shaman_spell_scripts()
|
|||||||
new spell_sha_earth_shield();
|
new spell_sha_earth_shield();
|
||||||
new spell_sha_earthbind_totem();
|
new spell_sha_earthbind_totem();
|
||||||
new spell_sha_earthen_power();
|
new spell_sha_earthen_power();
|
||||||
|
new spell_sha_earthliving_weapon();
|
||||||
new spell_sha_fire_nova();
|
new spell_sha_fire_nova();
|
||||||
new spell_sha_flame_shock();
|
new spell_sha_flame_shock();
|
||||||
new spell_sha_healing_stream_totem();
|
new spell_sha_healing_stream_totem();
|
||||||
|
|||||||
Reference in New Issue
Block a user