diff --git a/data/sql/updates/pending_db_world/rev_1633798793231677400.sql b/data/sql/updates/pending_db_world/rev_1633798793231677400.sql new file mode 100644 index 000000000..dc4b3dae5 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1633798793231677400.sql @@ -0,0 +1,7 @@ +INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1633798793231677400'); + +DELETE FROM `event_scripts` WHERE `id` = 4975 AND `command` = 10; + +DELETE FROM `spell_script_names` WHERE `spell_id` = 16796 AND `ScriptName` = 'spell_q5056_summon_shy_rotam'; +INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES +(16796, 'spell_q5056_summon_shy_rotam'); diff --git a/src/server/scripts/Spells/spell_quest.cpp b/src/server/scripts/Spells/spell_quest.cpp index 2f0228b9e..a459caa2b 100644 --- a/src/server/scripts/Spells/spell_quest.cpp +++ b/src/server/scripts/Spells/spell_quest.cpp @@ -3077,6 +3077,42 @@ public: } }; +enum QuestShyRotam +{ + NPC_SHY_ROTAM = 10737, +}; + +// 16796 - Summon Shy-Rotam +class spell_q5056_summon_shy_rotam : public SpellScriptLoader +{ +public: + spell_q5056_summon_shy_rotam() : SpellScriptLoader("spell_q5056_summon_shy_rotam") {} + + class spell_q5056_summon_shy_rotam_SpellScript : public SpellScript + { + PrepareSpellScript(spell_q5056_summon_shy_rotam_SpellScript); + + void HandleFinish() + { + Position shyRotamSpawnPosition = Position(8072.38f, -3833.81f, 690.03f, 4.56f); + if (Creature* summon = GetCaster()->SummonCreature(NPC_SHY_ROTAM, shyRotamSpawnPosition, TEMPSUMMON_TIMED_DESPAWN, 15 * MINUTE * IN_MILLISECONDS)) + { + summon->AI()->AttackStart(GetCaster()); + } + } + + void Register() override + { + AfterCast += SpellCastFn(spell_q5056_summon_shy_rotam_SpellScript::HandleFinish); + } + }; + + SpellScript* GetSpellScript() const override + { + return new spell_q5056_summon_shy_rotam_SpellScript(); + }; +}; + void AddSC_quest_spell_scripts() { // Ours @@ -3148,4 +3184,5 @@ void AddSC_quest_spell_scripts() new spell_q12619_emblazon_runeblade_effect(); new spell_q12919_gymers_grab(); new spell_q12919_gymers_throw(); + new spell_q5056_summon_shy_rotam(); }