From ae48c37914fde1b326b038052f06f6d33e9171da Mon Sep 17 00:00:00 2001 From: avarishd <46330494+avarishd@users.noreply.github.com> Date: Sat, 24 May 2025 21:49:59 +0300 Subject: [PATCH] fix(Scripts/Spells): - Weapon Coating Enchant (#22060) Righteous and Blessed Weapon Coating will now properly proc. --- .../rev_1746468531979768200.sql | 13 +++++++ .../zone_isle_of_queldanas.cpp | 38 +++++++++++-------- 2 files changed, 35 insertions(+), 16 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1746468531979768200.sql diff --git a/data/sql/updates/pending_db_world/rev_1746468531979768200.sql b/data/sql/updates/pending_db_world/rev_1746468531979768200.sql new file mode 100644 index 000000000..e05b20b12 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1746468531979768200.sql @@ -0,0 +1,13 @@ +-- +DELETE FROM `spell_proc_event` WHERE `entry` IN (45396,45398); +INSERT INTO `spell_proc_event` (`entry`, `SchoolMask`, `SpellFamilyName`, `SpellFamilyMask0`, `SpellFamilyMask1`, `SpellFamilyMask2`, `procFlags`, `procEx`, `procPhase`, `ppmRate`, `CustomChance`, `Cooldown`) VALUES +(45396, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 45000), +(45398, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 45000); + +DELETE FROM `spell_script_names` WHERE `spell_id` IN (45396,45398) AND `ScriptName`='spell_gen_weapon_coating_enchant'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(45396, 'spell_gen_weapon_coating_enchant'), +(45398, 'spell_gen_weapon_coating_enchant'); + +UPDATE `spell_dbc` SET `ProcTypeMask` = 81920,`ProcChance` = 100,`Effect_1` = 6,`EffectBasePoints_1` = 99,`EffectDieSides_1` = 1,`EffectTriggerSpell_1` = 45403,`EffectAura_1` = 42,`ImplicitTargetA_1` = 1 WHERE `ID` = 45396; +UPDATE `spell_dbc` SET `ProcTypeMask` = 68,`ProcChance` = 100,`Effect_1` = 6,`EffectBasePoints_1` = 99,`EffectDieSides_1` = 1,`EffectTriggerSpell_1` = 45401,`EffectAura_1` = 42,`ImplicitTargetA_1` = 1 WHERE `ID` = 45398; diff --git a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp index f301171e3..be0caf53d 100644 --- a/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp +++ b/src/server/scripts/EasternKingdoms/zone_isle_of_queldanas.cpp @@ -15,6 +15,7 @@ * with this program. If not, see . */ +#include "AreaDefines.h" #include "CreatureScript.h" #include "PassiveAI.h" #include "Pet.h" @@ -23,19 +24,6 @@ #include "SpellInfo.h" #include "SpellScript.h" #include "SpellScriptLoader.h" -/* ScriptData -SDName: Isle_of_Queldanas -SD%Complete: 100 -SDComment: Quest support: 11524, 11525, 11532, 11533, 11542, 11543, 11541 -SDCategory: Isle Of Quel'Danas -EndScriptData */ - -/* ContentData -npc_converted_sentry -npc_greengill_slave -EndContentData */ - -/*###### OUR: ######*/ enum ThalorienNpcs { @@ -677,13 +665,31 @@ public: }; }; +// 45396, 45398 - Weapon Coating Enchant +class spell_gen_weapon_coating_enchant : public AuraScript +{ + PrepareAuraScript(spell_gen_weapon_coating_enchant); + + bool CheckProc(ProcEventInfo& eventInfo) + { + Unit* caster = eventInfo.GetActor(); + if (!caster) + return false; + + return (caster->GetZoneId() == AREA_ISLE_OF_QUEL_DANAS || caster->GetZoneId() == AREA_SUNWELL_PLATEAU || caster->GetZoneId() == AREA_MAGISTERS_TERRACE); + } + + void Register() override + { + DoCheckProc += AuraCheckProcFn(spell_gen_weapon_coating_enchant::CheckProc); + } +}; + void AddSC_isle_of_queldanas() { - // OUR: new npc_bh_thalorien_dawnseeker(); RegisterSpellScript(spell_bh_cleanse_quel_delar); new npc_grand_magister_rommath(); - - // THEIR: new npc_greengill_slave(); + RegisterSpellScript(spell_gen_weapon_coating_enchant); }