aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/server/game/Spells/SpellMgr.cpp6
-rw-r--r--src/server/scripts/Spells/spell_mage.cpp60
2 files changed, 65 insertions, 1 deletions
diff --git a/src/server/game/Spells/SpellMgr.cpp b/src/server/game/Spells/SpellMgr.cpp
index c3bbd3d3516..8edab4394a4 100644
--- a/src/server/game/Spells/SpellMgr.cpp
+++ b/src/server/game/Spells/SpellMgr.cpp
@@ -5414,6 +5414,12 @@ void SpellMgr::LoadSpellInfoTargetCaps()
spellInfo->_LoadSqrtTargetLimit(5, 0, 385059, EFFECT_5, {}, {});
});
+ // Flame Patch
+ ApplySpellFix({ 205472 }, [](SpellInfo* spellInfo)
+ {
+ spellInfo->_LoadSqrtTargetLimit(8, 0, {}, EFFECT_1, {}, {});
+ }
+
// Flamestrike
ApplySpellFix({ 2120 }, [](SpellInfo* spellInfo)
{
diff --git a/src/server/scripts/Spells/spell_mage.cpp b/src/server/scripts/Spells/spell_mage.cpp
index c61bab59c8f..4540717fb28 100644
--- a/src/server/scripts/Spells/spell_mage.cpp
+++ b/src/server/scripts/Spells/spell_mage.cpp
@@ -32,6 +32,7 @@
#include "SpellHistory.h"
#include "SpellMgr.h"
#include "SpellScript.h"
+#include "TaskScheduler.h"
#include "TemporarySummon.h"
enum MageSpells
@@ -62,8 +63,11 @@ enum MageSpells
SPELL_MAGE_FEEL_THE_BURN = 383391,
SPELL_MAGE_FINGERS_OF_FROST = 44544,
SPELL_MAGE_FIRE_BLAST = 108853,
- SPELL_MAGE_FLURRY_DAMAGE = 228596,
SPELL_MAGE_FIRESTARTER = 205026,
+ SPELL_MAGE_FLAME_PATCH_AREATRIGGER = 205470,
+ SPELL_MAGE_FLAME_PATCH_DAMAGE = 205472,
+ SPELL_MAGE_FLAME_PATCH_TALENT = 205037,
+ SPELL_MAGE_FLURRY_DAMAGE = 228596,
SPELL_MAGE_FROST_NOVA = 122,
SPELL_MAGE_GIRAFFE_FORM = 32816,
SPELL_MAGE_ICE_BARRIER = 11426,
@@ -778,6 +782,58 @@ class spell_mage_flame_on : public AuraScript
}
};
+// 205037 - Flame Patch (attached to 2120 - Flamestrike)
+class spell_mage_flame_patch : public SpellScript
+{
+ bool Validate(SpellInfo const* /*spellInfo*/) override
+ {
+ return ValidateSpellInfo({ SPELL_MAGE_FLAME_PATCH_TALENT, SPELL_MAGE_FLAME_PATCH_AREATRIGGER });
+ }
+
+ bool Load() override
+ {
+ return GetCaster()->HasAura(SPELL_MAGE_FLAME_PATCH_TALENT);
+ }
+
+ void HandleFlamePatch() const
+ {
+ GetCaster()->CastSpell(GetExplTargetDest()->GetPosition(), SPELL_MAGE_FLAME_PATCH_AREATRIGGER, CastSpellExtraArgsInit{
+ .TriggerFlags = TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR,
+ .TriggeringSpell = GetSpell()
+ });
+ }
+
+ void Register() override
+ {
+ AfterCast += SpellCastFn(spell_mage_flame_patch::HandleFlamePatch);
+ }
+};
+
+// 205470 - Flame Patch
+// Id - 6122
+struct at_mage_flame_patch : public AreaTriggerAI
+{
+ using AreaTriggerAI::AreaTriggerAI;
+
+ void OnCreate(Spell const* /*creatingSpell*/) override
+ {
+ _scheduler.Schedule(1s, [this](TaskContext task)
+ {
+ if (Unit* caster = at->GetCaster())
+ caster->CastSpell(at->GetPosition(), SPELL_MAGE_FLAME_PATCH_DAMAGE, TRIGGERED_IGNORE_CAST_IN_PROGRESS | TRIGGERED_DONT_REPORT_CAST_ERROR);
+ task.Repeat(1s);
+ });
+ }
+
+ void OnUpdate(uint32 diff) override
+ {
+ _scheduler.Update(diff);
+ }
+
+private:
+ TaskScheduler _scheduler;
+};
+
// 44614 - Flurry
class spell_mage_flurry : public SpellScript
{
@@ -1621,6 +1677,8 @@ void AddSC_mage_spell_scripts()
RegisterSpellScript(spell_mage_firestarter);
RegisterSpellScript(spell_mage_firestarter_dots);
RegisterSpellScript(spell_mage_flame_on);
+ RegisterSpellScript(spell_mage_flame_patch);
+ RegisterAreaTriggerAI(at_mage_flame_patch);
RegisterSpellScript(spell_mage_flurry);
RegisterSpellScript(spell_mage_flurry_damage);
RegisterSpellScript(spell_mage_frostbolt);