mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-26 20:02:25 +01:00
Core/Spells: Implement mage talent "Wildfire" (#31248)
Co-authored-by: ModoX <moardox@gmail.com>
This commit is contained in:
8
sql/updates/world/master/2025_09_14_01_world.sql
Normal file
8
sql/updates/world/master/2025_09_14_01_world.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
DELETE FROM `spell_proc` WHERE `SpellId` IN (383490);
|
||||
INSERT INTO `spell_proc` (`SpellId`,`SchoolMask`,`SpellFamilyName`,`SpellFamilyMask0`,`SpellFamilyMask1`,`SpellFamilyMask2`,`SpellFamilyMask3`,`ProcFlags`,`ProcFlags2`,`SpellTypeMask`,`SpellPhaseMask`,`HitMask`,`AttributesMask`,`DisableEffectsMask`,`ProcsPerMinute`,`Chance`,`Cooldown`,`Charges`) VALUES
|
||||
(383490,0x00,3,0x00000000,0x04000000,0x00000000,0x00000000,0x0,0x0,0x0,0x1,0x0,0x0,0x0,0,0,0,0); -- Wildfire
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName` IN ('spell_mage_wildfire', 'spell_mage_wildfire_area');
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(383492, 'spell_mage_wildfire_caster_crit'),
|
||||
(383493, 'spell_mage_wildfire_area_crit');
|
||||
@@ -110,6 +110,7 @@ enum MageSpells
|
||||
SPELL_MAGE_CHAIN_REACTION_DUMMY = 278309,
|
||||
SPELL_MAGE_CHAIN_REACTION = 278310,
|
||||
SPELL_MAGE_TOUCH_OF_THE_MAGI_EXPLODE = 210833,
|
||||
SPELL_MAGE_WILDFIRE_TALENT = 383489,
|
||||
SPELL_MAGE_WINTERS_CHILL = 228358
|
||||
};
|
||||
|
||||
@@ -1842,6 +1843,62 @@ class spell_mage_water_elemental_freeze : public SpellScript
|
||||
}
|
||||
};
|
||||
|
||||
// 383493 - Wildfire
|
||||
class spell_mage_wildfire_area_crit : public AuraScript
|
||||
{
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellEffect({ { SPELL_MAGE_WILDFIRE_TALENT, EFFECT_3 } });
|
||||
}
|
||||
|
||||
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
AuraEffect const* wildfireCritEffect = caster->GetAuraEffect(SPELL_MAGE_WILDFIRE_TALENT, EFFECT_3);
|
||||
if (!wildfireCritEffect)
|
||||
return;
|
||||
|
||||
canBeRecalculated = false;
|
||||
amount = wildfireCritEffect->GetAmount();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_wildfire_area_crit::CalculateAmount, EFFECT_0, SPELL_AURA_MOD_CRIT_PCT);
|
||||
}
|
||||
};
|
||||
|
||||
// 383492 - Wildfire
|
||||
class spell_mage_wildfire_caster_crit : public AuraScript
|
||||
{
|
||||
bool Validate(SpellInfo const* /*spellInfo*/) override
|
||||
{
|
||||
return ValidateSpellEffect({ { SPELL_MAGE_WILDFIRE_TALENT, EFFECT_2 } });
|
||||
}
|
||||
|
||||
void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
|
||||
{
|
||||
Unit* caster = GetCaster();
|
||||
if (!caster)
|
||||
return;
|
||||
|
||||
AuraEffect const* wildfireCritEffect = caster->GetAuraEffect(SPELL_MAGE_WILDFIRE_TALENT, EFFECT_2);
|
||||
if (!wildfireCritEffect)
|
||||
return;
|
||||
|
||||
canBeRecalculated = false;
|
||||
amount = wildfireCritEffect->GetAmount();
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_wildfire_caster_crit::CalculateAmount, EFFECT_0, SPELL_AURA_ADD_PCT_MODIFIER);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_mage_spell_scripts()
|
||||
{
|
||||
RegisterSpellScript(spell_mage_alter_time_aura);
|
||||
@@ -1902,4 +1959,6 @@ void AddSC_mage_spell_scripts()
|
||||
RegisterSpellScript(spell_mage_tempest_barrier);
|
||||
RegisterSpellScript(spell_mage_touch_of_the_magi_aura);
|
||||
RegisterSpellScript(spell_mage_water_elemental_freeze);
|
||||
RegisterSpellScript(spell_mage_wildfire_area_crit);
|
||||
RegisterSpellScript(spell_mage_wildfire_caster_crit);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user