mirror of
https://github.com/araxiaonline/TrinityCore.git
synced 2026-06-13 03:32:28 -04:00
Scrips/Spells: Implement druid talent Thorns of Iron (#31537)
This commit is contained in:
7
sql/updates/world/master/2026_02_01_03_world.sql
Normal file
7
sql/updates/world/master/2026_02_01_03_world.sql
Normal file
@@ -0,0 +1,7 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_dru_thorns_of_iron_damage');
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(400223, 'spell_dru_thorns_of_iron_damage');
|
||||
|
||||
DELETE FROM `spell_proc` WHERE `SpellId` IN (400222);
|
||||
INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
|
||||
(400222,0x00,7,0x00000000,0x00000000,0x00004000,0x00000000,0x0,0x0,0x0,0x4,0x0,0x0,0x0,0,0,0,0); -- Thorns of Iron
|
||||
@@ -2134,6 +2134,26 @@ class spell_dru_t10_restoration_4p_bonus_dummy : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 400223 - Thorns of Iron (Damage)
|
||||
class spell_dru_thorns_of_iron_damage : public SpellScript
|
||||
{
|
||||
void HandleEffectHit(SpellEffIndex effIndex)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
|
||||
int32 noTargets = GetUnitTargetCountForEffect(effIndex);
|
||||
int32 pct = GetTriggeringSpell()->GetEffect(effIndex).CalcValue(caster);
|
||||
int32 damage = CalculatePct(caster->GetArmor(), pct) / noTargets;
|
||||
|
||||
SetHitDamage(damage);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_dru_thorns_of_iron_damage::HandleEffectHit, EFFECT_0, SPELL_EFFECT_SCHOOL_DAMAGE);
|
||||
}
|
||||
};
|
||||
|
||||
// 77758 - Thrash
|
||||
class spell_dru_thrash : public SpellScript
|
||||
{
|
||||
@@ -2621,6 +2641,7 @@ void AddSC_druid_spell_scripts()
|
||||
RegisterSpellScript(spell_dru_t10_balance_4p_bonus);
|
||||
RegisterSpellScript(spell_dru_t10_restoration_4p_bonus);
|
||||
RegisterSpellScript(spell_dru_t10_restoration_4p_bonus_dummy);
|
||||
RegisterSpellScript(spell_dru_thorns_of_iron_damage);
|
||||
RegisterSpellScript(spell_dru_thrash);
|
||||
RegisterSpellScript(spell_dru_thrash_aura);
|
||||
RegisterSpellScript(spell_dru_travel_form);
|
||||
|
||||
Reference in New Issue
Block a user