aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAqua Deus <95978183+aquadeus@users.noreply.github.com>2022-01-17 23:36:12 +0100
committerGitHub <noreply@github.com>2022-01-17 23:36:12 +0100
commitd8efda4ff335ce6252f32e1736b1f99d443bce7b (patch)
tree885ff450c014b08408c199edc6d7ea74f72560d4
parent92335bf900021a8d9fb70e44ef9a2458e37b3468 (diff)
Scripts/Spells: Fix mage Flame On talent (#27622)
-rw-r--r--sql/updates/world/master/2022_01_17_01_world_mage_flame_on.sql2
-rw-r--r--src/server/scripts/Spells/spell_mage.cpp27
2 files changed, 29 insertions, 0 deletions
diff --git a/sql/updates/world/master/2022_01_17_01_world_mage_flame_on.sql b/sql/updates/world/master/2022_01_17_01_world_mage_flame_on.sql
new file mode 100644
index 00000000000..0218ab1c638
--- /dev/null
+++ b/sql/updates/world/master/2022_01_17_01_world_mage_flame_on.sql
@@ -0,0 +1,2 @@
+DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_mage_flame_on';
+INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (205029, 'spell_mage_flame_on');
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp
index eca01313d1d..70dce4eb7bc 100644
--- a/src/server/scripts/Spells/spell_mage.cpp
+++ b/src/server/scripts/Spells/spell_mage.cpp
@@ -22,6 +22,7 @@
*/
#include "ScriptMgr.h"
+#include "DB2Stores.h"
#include "GridNotifiers.h"
#include "ObjectAccessor.h"
#include "Pet.h"
@@ -51,6 +52,7 @@ enum MageSpells
SPELL_MAGE_DRAGONHAWK_FORM = 32818,
SPELL_MAGE_EVERWARM_SOCKS = 320913,
SPELL_MAGE_FINGERS_OF_FROST = 44544,
+ SPELL_MAGE_FIRE_BLAST = 108853,
SPELL_MAGE_FIRESTARTER = 205026,
SPELL_MAGE_FROST_NOVA = 122,
SPELL_MAGE_GIRAFFE_FORM = 32816,
@@ -564,6 +566,30 @@ class spell_mage_firestarter_dots : public AuraScript
}
};
+// 205029 - Flame On
+class spell_mage_flame_on : public AuraScript
+{
+ PrepareAuraScript(spell_mage_flame_on);
+
+ bool Validate(SpellInfo const* spellInfo) override
+ {
+ return ValidateSpellInfo({ SPELL_MAGE_FIRE_BLAST })
+ && sSpellCategoryStore.HasRecord(sSpellMgr->AssertSpellInfo(SPELL_MAGE_FIRE_BLAST, DIFFICULTY_NONE)->ChargeCategoryId)
+ && spellInfo->GetEffects().size() > EFFECT_2;
+ }
+
+ void CalculateAmount(AuraEffect const* /*aurEff*/, int32& amount, bool& canBeRecalculated)
+ {
+ canBeRecalculated = false;
+ amount = -GetPctOf(GetEffectInfo(EFFECT_2).CalcValue() * IN_MILLISECONDS, sSpellCategoryStore.AssertEntry(sSpellMgr->AssertSpellInfo(SPELL_MAGE_FIRE_BLAST, DIFFICULTY_NONE)->ChargeCategoryId)->ChargeRecoveryTime);
+ }
+
+ void Register() override
+ {
+ DoEffectCalcAmount += AuraEffectCalcAmountFn(spell_mage_flame_on::CalculateAmount, EFFECT_1, SPELL_AURA_CHARGE_RECOVERY_MULTIPLIER);
+ }
+};
+
// 11426 - Ice Barrier
class spell_mage_ice_barrier : public AuraScript
{
@@ -1205,6 +1231,7 @@ void AddSC_mage_spell_scripts()
RegisterAuraScript(spell_mage_fingers_of_frost);
RegisterSpellScript(spell_mage_firestarter);
RegisterAuraScript(spell_mage_firestarter_dots);
+ RegisterAuraScript(spell_mage_flame_on);
RegisterAuraScript(spell_mage_ice_barrier);
RegisterSpellScript(spell_mage_ice_block);
RegisterSpellScript(spell_mage_ice_lance);