fix(Script/Spells): Summon Shy-Rotam (#8382)
* Move creature summon script to core spell scripts from event_scripts * Fixes it not engaging player when summoned
This commit is contained in:
@@ -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');
|
||||||
@@ -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()
|
void AddSC_quest_spell_scripts()
|
||||||
{
|
{
|
||||||
// Ours
|
// Ours
|
||||||
@@ -3148,4 +3184,5 @@ void AddSC_quest_spell_scripts()
|
|||||||
new spell_q12619_emblazon_runeblade_effect();
|
new spell_q12619_emblazon_runeblade_effect();
|
||||||
new spell_q12919_gymers_grab();
|
new spell_q12919_gymers_grab();
|
||||||
new spell_q12919_gymers_throw();
|
new spell_q12919_gymers_throw();
|
||||||
|
new spell_q5056_summon_shy_rotam();
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user