From 0fc991192ebe6da4b676b89dac10b18de613889f Mon Sep 17 00:00:00 2001 From: killerwife Date: Thu, 9 Nov 2023 09:45:41 +0100 Subject: [PATCH] Mage: Implement all missing mage glyphs --- sql/base/dbc/cmangos_fixes/Spell.sql | 2 + sql/scriptdev2/spell.sql | 41 +++++++++++++++++++ .../Scripts/Scripting/ClassScripts/Mage.cpp | 38 +++++++++++++++++ 3 files changed, 81 insertions(+) diff --git a/sql/base/dbc/cmangos_fixes/Spell.sql b/sql/base/dbc/cmangos_fixes/Spell.sql index 447e157a530..ca4e09244bb 100644 --- a/sql/base/dbc/cmangos_fixes/Spell.sql +++ b/sql/base/dbc/cmangos_fixes/Spell.sql @@ -3486,6 +3486,8 @@ UPDATE spell_template SET EffectSpellClassMask1_3=0x00010000 WHERE Id IN(63086); UPDATE spell_template SET EffectSpellClassMask1_1=0x00000000,EffectSpellClassMask1_2=0x00000001 WHERE Id IN(56826); -- Glyph of Mend Pet - wrong mask UPDATE spell_template SET EffectSpellClassMask1_1=8388608 WHERE Id IN(57870); +-- Glyph of Remove Curse - wrong mask +UPDATE spell_template SET EffectSpellClassMask1_2=0x01000000 WHERE Id IN(56364); -- fully custom, modelled after 65220 - glyph of snake trap avoidance INSERT INTO spell_template(Id, Category, Dispel, Mechanic, Attributes, AttributesEx, AttributesEx2, AttributesEx3, AttributesEx4, AttributesEx5, AttributesEx6, AttributesEx7, Stances, Stances2, StancesNot, StancesNot2, Targets, TargetCreatureType, RequiresSpellFocus, FacingCasterFlags, CasterAuraState, TargetAuraState, CasterAuraStateNot, TargetAuraStateNot, CasterAuraSpell, TargetAuraSpell, ExcludeCasterAuraSpell, ExcludeTargetAuraSpell, CastingTimeIndex, RecoveryTime, CategoryRecoveryTime, InterruptFlags, AuraInterruptFlags, ChannelInterruptFlags, ProcFlags, ProcChance, ProcCharges, MaxLevel, BaseLevel, SpellLevel, DurationIndex, PowerType, ManaCost, ManaCostPerlevel, ManaPerSecond, ManaPerSecondPerLevel, RangeIndex, Speed, ModalNextSpell, StackAmount, Totem1, Totem2, Reagent1, Reagent2, Reagent3, Reagent4, Reagent5, Reagent6, Reagent7, Reagent8, ReagentCount1, ReagentCount2, ReagentCount3, ReagentCount4, ReagentCount5, ReagentCount6, ReagentCount7, ReagentCount8, EquippedItemClass, EquippedItemSubClassMask, EquippedItemInventoryTypeMask, Effect1, Effect2, Effect3, EffectDieSides1, EffectDieSides2, EffectDieSides3, EffectRealPointsPerLevel1, EffectRealPointsPerLevel2, EffectRealPointsPerLevel3, EffectBasePoints1, EffectBasePoints2, EffectBasePoints3, EffectMechanic1, EffectMechanic2, EffectMechanic3, EffectImplicitTargetA1, EffectImplicitTargetA2, EffectImplicitTargetA3, EffectImplicitTargetB1, EffectImplicitTargetB2, EffectImplicitTargetB3, EffectRadiusIndex1, EffectRadiusIndex2, EffectRadiusIndex3, EffectApplyAuraName1, EffectApplyAuraName2, EffectApplyAuraName3, EffectAmplitude1, EffectAmplitude2, EffectAmplitude3, EffectMultipleValue1, EffectMultipleValue2, EffectMultipleValue3, EffectChainTarget1, EffectChainTarget2, EffectChainTarget3, EffectItemType1, EffectItemType2, EffectItemType3, EffectMiscValue1, EffectMiscValue2, EffectMiscValue3, EffectMiscValueB1, EffectMiscValueB2, EffectMiscValueB3, EffectTriggerSpell1, EffectTriggerSpell2, EffectTriggerSpell3, EffectPointsPerComboPoint1, EffectPointsPerComboPoint2, EffectPointsPerComboPoint3, EffectSpellClassMask1_1, EffectSpellClassMask1_2, EffectSpellClassMask1_3, EffectSpellClassMask2_1, EffectSpellClassMask2_2, EffectSpellClassMask2_3, EffectSpellClassMask3_1, EffectSpellClassMask3_2, EffectSpellClassMask3_3, SpellVisual, SpellVisual2, SpellIconID, ActiveIconID, SpellPriority, SpellName, SpellName2, SpellName3, SpellName4, SpellName5, SpellName6, SpellName7, SpellName8, SpellName9, SpellName10, SpellName11, SpellName12, SpellName13, SpellName14, SpellName15, SpellName16, Rank1, Rank2, Rank3, Rank4, Rank5, Rank6, Rank7, Rank8, Rank9, Rank10, Rank11, Rank12, Rank13, Rank14, Rank15, Rank16, ManaCostPercentage, StartRecoveryCategory, StartRecoveryTime, MaxTargetLevel, SpellFamilyName, SpellFamilyFlags, SpellFamilyFlags2, MaxAffectedTargets, DmgClass, PreventionType, StanceBarOrder, DmgMultiplier1, DmgMultiplier2, DmgMultiplier3, MinFactionId, MinReputation, RequiredAuraVision, TotemCategory1, TotemCategory2, AreaId, SchoolMask, RuneCostID, SpellMissileID, PowerDisplayId, EffectBonusCoefficient1, EffectBonusCoefficient2, EffectBonusCoefficient3, SpellDescriptionVariableID, SpellDifficultyId, IsServerSide, AttributesServerside) VALUES diff --git a/sql/scriptdev2/spell.sql b/sql/scriptdev2/spell.sql index f50ead77dee..7e1ee24e739 100644 --- a/sql/scriptdev2/spell.sql +++ b/sql/scriptdev2/spell.sql @@ -1426,6 +1426,47 @@ INSERT INTO spell_scripts(Id, ScriptName) VALUES (12824,'spell_polymorph'), (12825,'spell_polymorph'), (12826,'spell_polymorph'), +(116,'spell_frostbolt_mage'), +(205,'spell_frostbolt_mage'), +(837,'spell_frostbolt_mage'), +(7322,'spell_frostbolt_mage'), +(8406,'spell_frostbolt_mage'), +(8407,'spell_frostbolt_mage'), +(8408,'spell_frostbolt_mage'), +(10179,'spell_frostbolt_mage'), +(10180,'spell_frostbolt_mage'), +(10181,'spell_frostbolt_mage'), +(25304,'spell_frostbolt_mage'), +(27071,'spell_frostbolt_mage'), +(27072,'spell_frostbolt_mage'), +(38697,'spell_frostbolt_mage'), +(42841,'spell_frostbolt_mage'), +(42842,'spell_frostbolt_mage'), +(133,'spell_fireball_mage'), +(143,'spell_fireball_mage'), +(145,'spell_fireball_mage'), +(3140,'spell_fireball_mage'), +(8400,'spell_fireball_mage'), +(8401,'spell_fireball_mage'), +(8402,'spell_fireball_mage'), +(10148,'spell_fireball_mage'), +(10149,'spell_fireball_mage'), +(10150,'spell_fireball_mage'), +(10151,'spell_fireball_mage'), +(25306,'spell_fireball_mage'), +(27070,'spell_fireball_mage'), +(38692,'spell_fireball_mage'), +(42832,'spell_fireball_mage'), +(42833,'spell_fireball_mage'), +(11113,'spell_blast_wave_mage'), +(13018,'spell_blast_wave_mage'), +(13019,'spell_blast_wave_mage'), +(13020,'spell_blast_wave_mage'), +(13021,'spell_blast_wave_mage'), +(27133,'spell_blast_wave_mage'), +(33933,'spell_blast_wave_mage'), +(42944,'spell_blast_wave_mage'), +(42945,'spell_blast_wave_mage'), (543,'spell_frost_warding'), (8457,'spell_frost_warding'), (8458,'spell_frost_warding'), diff --git a/src/game/Spells/Scripts/Scripting/ClassScripts/Mage.cpp b/src/game/Spells/Scripts/Scripting/ClassScripts/Mage.cpp index 085e6a97c3a..674c9cf7a39 100644 --- a/src/game/Spells/Scripts/Scripting/ClassScripts/Mage.cpp +++ b/src/game/Spells/Scripts/Scripting/ClassScripts/Mage.cpp @@ -117,6 +117,7 @@ struct IceLance : public SpellScript } }; +// 12654 - Ignite struct MageIgnite : public AuraScript { // implemented this way because we do not support proccing in spellscript on empty aura slot @@ -144,6 +145,7 @@ struct MageIgnite : public AuraScript } }; +// 44543, 44545 - Fingers of Frost struct FingersOfFrostProc : public AuraScript { bool OnCheckProc(Aura* aura, ProcExecutionData& /*data*/) const override @@ -152,6 +154,7 @@ struct FingersOfFrostProc : public AuraScript } }; +// 44544 - Fingers of Frost struct FingersOfFrostIgnore : public SpellScript { void OnCast(Spell* spell) const override @@ -160,6 +163,7 @@ struct FingersOfFrostIgnore : public SpellScript } }; +// 74396 - Fingers of Frost struct FingersOfFrostDummy : public AuraScript { void OnHolderInit(SpellAuraHolder* holder, WorldObject* /*caster*/) const override @@ -180,6 +184,7 @@ struct FingersOfFrostDummy : public AuraScript } }; +// 44572 - Deep Freeze struct DeepFreezeImmunityState : public AuraScript { bool OnCheckProc(Aura* /*aura*/, ProcExecutionData& data) const override @@ -255,6 +260,36 @@ struct TormentTheWeak : public AuraScript } }; +// 116 - Frostbolt +struct FrostboltMage : public SpellScript +{ + void OnInit(Spell* spell) const override + { + if (spell->GetCaster()->HasAura(56370)) // Glyph of Frostbolt + spell->SetEffectSkipMask((1 << EFFECT_INDEX_0)); + } +}; + +// 133 - Fireball +struct FireballMage : public SpellScript +{ + void OnInit(Spell* spell) const override + { + if (spell->GetCaster()->HasAura(56368)) // Glyph of Fireball + spell->SetEffectSkipMask((1 << EFFECT_INDEX_1)); + } +}; + +// 11113 - Blast Wave +struct BlastWaveMage : public SpellScript +{ + void OnInit(Spell* spell) const override + { + if (spell->GetCaster()->HasAura(62126)) // Glyph of Blast Wave + spell->SetEffectSkipMask((1 << EFFECT_INDEX_2)); + } +}; + void LoadMageScripts() { RegisterSpellScript("spell_arcane_concentration"); @@ -271,4 +306,7 @@ void LoadMageScripts() RegisterSpellScript("spell_frost_warding"); RegisterSpellScript("spell_glyph_of_fire_blast"); RegisterSpellScript("spell_torment_the_weak"); + RegisterSpellScript("spell_frostbolt_mage"); + RegisterSpellScript("spell_fireball_mage"); + RegisterSpellScript("spell_blast_wave_mage"); } \ No newline at end of file