mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-15 23:20:36 +01:00
Scripts/Spells: Implement mage talent Improved Combustion (#31088)
This commit is contained in:
3
sql/updates/world/master/2025_07_17_01_world.sql
Normal file
3
sql/updates/world/master/2025_07_17_01_world.sql
Normal file
@@ -0,0 +1,3 @@
|
||||
DELETE FROM `spell_script_names` WHERE `ScriptName`='spell_mage_improved_combustion';
|
||||
INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES
|
||||
(190319, 'spell_mage_improved_combustion');
|
||||
@@ -73,6 +73,7 @@ enum MageSpells
|
||||
SPELL_MAGE_ICE_BARRIER = 11426,
|
||||
SPELL_MAGE_ICE_BLOCK = 45438,
|
||||
SPELL_MAGE_IGNITE = 12654,
|
||||
SPELL_MAGE_IMPROVED_COMBUSTION = 383967,
|
||||
SPELL_MAGE_INCANTERS_FLOW = 116267,
|
||||
SPELL_MAGE_LIVING_BOMB_EXPLOSION = 44461,
|
||||
SPELL_MAGE_LIVING_BOMB_PERIODIC = 217694,
|
||||
@@ -1155,6 +1156,36 @@ class spell_mage_imp_mana_gems : public AuraScript
|
||||
}
|
||||
};
|
||||
|
||||
// 383967 - Improved Combustion (attached to 190319 - Combustion)
|
||||
class spell_mage_improved_combustion : public AuraScript
|
||||
{
|
||||
bool Load() override
|
||||
{
|
||||
return GetUnitOwner()->HasAura(SPELL_MAGE_IMPROVED_COMBUSTION);
|
||||
}
|
||||
|
||||
void CalcAmount(AuraEffect const* /*aurEff*/, int32& amount, bool const& /*canBeRecalculated*/) const
|
||||
{
|
||||
if (AuraEffect const* amountHolder = GetEffect(EFFECT_2))
|
||||
{
|
||||
int32 critRating = GetUnitOwner()->ToPlayer()->m_activePlayerData->CombatRatings[CR_CRIT_SPELL];
|
||||
amount = CalculatePct(critRating, amountHolder->GetAmount());
|
||||
}
|
||||
}
|
||||
|
||||
void UpdatePeriodic(AuraEffect const* aurEff) const
|
||||
{
|
||||
if (AuraEffect* bonus = GetEffect(EFFECT_1))
|
||||
bonus->RecalculateAmount(aurEff);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_improved_combustion::CalcAmount, EFFECT_1, SPELL_AURA_MOD_RATING);
|
||||
OnEffectPeriodic += AuraEffectPeriodicFn(spell_mage_improved_combustion::UpdatePeriodic, EFFECT_2, SPELL_AURA_PERIODIC_DUMMY);
|
||||
}
|
||||
};
|
||||
|
||||
// 1463 - Incanter's Flow
|
||||
class spell_mage_incanters_flow : public AuraScript
|
||||
{
|
||||
@@ -1757,6 +1788,7 @@ void AddSC_mage_spell_scripts()
|
||||
RegisterSpellScript(spell_mage_ice_lance_damage);
|
||||
RegisterSpellScript(spell_mage_ignite);
|
||||
RegisterSpellScript(spell_mage_imp_mana_gems);
|
||||
RegisterSpellScript(spell_mage_improved_combustion);
|
||||
RegisterSpellScript(spell_mage_incanters_flow);
|
||||
RegisterSpellScript(spell_mage_living_bomb);
|
||||
RegisterSpellScript(spell_mage_living_bomb_explosion);
|
||||
|
||||
Reference in New Issue
Block a user