Scripts/Quest: Update 'Warning: Some Assembly Required' (11310) (#27888)

This commit is contained in:
offl
2022-03-27 21:15:43 +03:00
committed by GitHub
parent ce98938ab8
commit dbdf008295
2 changed files with 69 additions and 56 deletions

View File

@@ -0,0 +1,22 @@
--
DELETE FROM `spell_linked_spell` WHERE `spell_trigger` = 43392;
DELETE FROM `spell_script_names` WHERE `ScriptName` = 'spell_fjord_mindless_abomination_ping_master';
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
(43393,'spell_fjord_mindless_abomination_ping_master');
UPDATE `creature_template` SET `AIName` = 'SmartAI', `ScriptName` = '' WHERE `entry` = 23575;
DELETE FROM `smart_scripts` WHERE `entryorguid` = 23575 AND `source_type` = 0;
INSERT INTO `smart_scripts` (`entryorguid`,`source_type`,`id`,`link`,`event_type`,`event_phase_mask`,`event_chance`,`event_flags`,`event_param1`,`event_param2`,`event_param3`,`event_param4`,`event_param5`,`action_type`,`action_param1`,`action_param2`,`action_param3`,`action_param4`,`action_param5`,`action_param6`,`target_type`,`target_param1`,`target_param2`,`target_param3`,`target_param4`,`target_x`,`target_y`,`target_z`,`target_o`,`comment`) VALUES
(23575,0,0,0,11,0,100,512,0,0,0,0,0,11,43393,0,0,0,0,0,23,0,0,0,0,0,0,0,0,"Mindless Abomination - On Spawn - Cast 'Ping Master'"),
(23575,0,1,0,29,0,100,512,1,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Mindless Abomination - On Charm Break - Despawn"),
(23575,0,2,0,6,0,100,512,0,0,0,0,0,41,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"Mindless Abomination - On Death - Despawn");
UPDATE `spell_script_names` SET `ScriptName` = 'spell_fjord_mindless_abomination_explosion_fx_master' WHERE `ScriptName` = 'spell_mindless_abomination_explosion_fx_master';
UPDATE `spell_script_names` SET `ScriptName` = 'spell_fjord_rivenwood_captives_not_on_quest' WHERE `ScriptName` = 'spell_rivenwood_captives_not_on_quest';
UPDATE `spell_script_names` SET `ScriptName` = 'spell_fjord_rivenwood_captives_on_quest' WHERE `ScriptName` = 'spell_rivenwood_captives_on_quest';
UPDATE `spell_script_names` SET `ScriptName` = 'spell_fjord_the_cleansing_shrine_cast' WHERE `ScriptName` = 'spell_the_cleansing_shrine_cast';
UPDATE `spell_script_names` SET `ScriptName` = 'spell_fjord_the_cleansing_cleansing_soul' WHERE `ScriptName` = 'spell_the_cleansing_cleansing_soul';
UPDATE `spell_script_names` SET `ScriptName` = 'spell_fjord_the_cleansing_mirror_image_script_effect' WHERE `ScriptName` = 'spell_the_cleansing_mirror_image_script_effect';
UPDATE `spell_script_names` SET `ScriptName` = 'spell_fjord_the_cleansing_on_death_cast_on_master' WHERE `ScriptName` = 'spell_the_cleansing_on_death_cast_on_master';
UPDATE `spell_script_names` SET `ScriptName` = 'spell_fjord_the_way_to_his_heart_anuniaq_net' WHERE `ScriptName` = 'spell_the_way_to_his_heart_anuniaq_net';

View File

@@ -210,44 +210,37 @@ private:
enum SomeAssemblyRequired
{
SPELL_PING_MASTER = 43393, // casted on owner after spawn, presumably has a spell script to force owner cast SPELL_MINDLESS_ABOMINATION_CONTROL (currently handled by linked spells)
SPELL_MINDLESS_ABOMINATION_CONTROL = 42168,
SPELL_RANDOM_CIRCUMFERENCE_POINT_POISON = 42266,
SPELL_RANDOM_CIRCUMFERENCE_POINT_BONE = 42267,
SPELL_RANDOM_CIRCUMFERENCE_POINT_BONE_2 = 42274
};
struct npc_mindless_abomination : public ScriptedAI
// 43393 - Ping Master
class spell_fjord_mindless_abomination_ping_master : public SpellScript
{
npc_mindless_abomination(Creature* creature) : ScriptedAI(creature) { }
PrepareSpellScript(spell_fjord_mindless_abomination_ping_master);
void JustAppeared() override
bool Validate(SpellInfo const* /*spellInfo*/) override
{
me->SetCorpseDelay(0, true);
_scheduler.Schedule(1s, [this](TaskContext task)
{
if (!me->IsCharmedOwnedByPlayerOrPlayer())
me->DespawnOrUnsummon();
else
task.Repeat();
});
return ValidateSpellInfo({ SPELL_MINDLESS_ABOMINATION_CONTROL });
}
void UpdateAI(uint32 diff) override
void HandleScript(SpellEffIndex /*effIndex*/)
{
_scheduler.Update(diff);
GetHitUnit()->CastSpell(GetHitUnit(), SPELL_MINDLESS_ABOMINATION_CONTROL);
}
private:
TaskScheduler _scheduler;
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_fjord_mindless_abomination_ping_master::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
// 42268 - Quest - Mindless Abomination Explosion FX Master
class spell_mindless_abomination_explosion_fx_master : public SpellScript
class spell_fjord_mindless_abomination_explosion_fx_master : public SpellScript
{
PrepareSpellScript(spell_mindless_abomination_explosion_fx_master);
PrepareSpellScript(spell_fjord_mindless_abomination_explosion_fx_master);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -261,9 +254,7 @@ class spell_mindless_abomination_explosion_fx_master : public SpellScript
void HandleScript(SpellEffIndex /*eff*/)
{
Creature* caster = GetCaster()->ToCreature();
if (!caster)
return;
Unit* caster = GetCaster();
for (uint8 i = 0; i < 11; ++i)
caster->CastSpell(caster, SPELL_RANDOM_CIRCUMFERENCE_POINT_POISON);
@@ -277,7 +268,7 @@ class spell_mindless_abomination_explosion_fx_master : public SpellScript
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_mindless_abomination_explosion_fx_master::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHit += SpellEffectFn(spell_fjord_mindless_abomination_explosion_fx_master::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -317,9 +308,9 @@ std::array<uint32, 11> const CocoonSummonSpells =
};
// 43288 - Rivenwood Captives: Player Not On Quest
class spell_rivenwood_captives_not_on_quest : public SpellScript
class spell_fjord_rivenwood_captives_not_on_quest : public SpellScript
{
PrepareSpellScript(spell_rivenwood_captives_not_on_quest);
PrepareSpellScript(spell_fjord_rivenwood_captives_not_on_quest);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -333,14 +324,14 @@ class spell_rivenwood_captives_not_on_quest : public SpellScript
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_rivenwood_captives_not_on_quest::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget += SpellEffectFn(spell_fjord_rivenwood_captives_not_on_quest::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
// 43287 - Rivenwood Captives: Player On Quest
class spell_rivenwood_captives_on_quest : public SpellScript
class spell_fjord_rivenwood_captives_on_quest : public SpellScript
{
PrepareSpellScript(spell_rivenwood_captives_on_quest);
PrepareSpellScript(spell_fjord_rivenwood_captives_on_quest);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -360,7 +351,7 @@ class spell_rivenwood_captives_on_quest : public SpellScript
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_rivenwood_captives_on_quest::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHitTarget += SpellEffectFn(spell_fjord_rivenwood_captives_on_quest::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
@@ -380,9 +371,9 @@ enum TheCleansing
};
// 43365 - The Cleansing: Shrine Cast
class spell_the_cleansing_shrine_cast : public SpellScript
class spell_fjord_the_cleansing_shrine_cast : public SpellScript
{
PrepareSpellScript(spell_the_cleansing_shrine_cast);
PrepareSpellScript(spell_fjord_the_cleansing_shrine_cast);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -413,15 +404,15 @@ class spell_the_cleansing_shrine_cast : public SpellScript
void Register() override
{
OnCheckCast += SpellCheckCastFn(spell_the_cleansing_shrine_cast::CheckCast);
OnEffectHitTarget += SpellEffectFn(spell_the_cleansing_shrine_cast::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
OnCheckCast += SpellCheckCastFn(spell_fjord_the_cleansing_shrine_cast::CheckCast);
OnEffectHitTarget += SpellEffectFn(spell_fjord_the_cleansing_shrine_cast::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
// 43351 - Cleansing Soul
class spell_the_cleansing_cleansing_soul : public AuraScript
class spell_fjord_the_cleansing_cleansing_soul : public AuraScript
{
PrepareAuraScript(spell_the_cleansing_cleansing_soul);
PrepareAuraScript(spell_fjord_the_cleansing_cleansing_soul);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -443,15 +434,15 @@ class spell_the_cleansing_cleansing_soul : public AuraScript
void Register() override
{
AfterEffectApply += AuraEffectApplyFn(spell_the_cleansing_cleansing_soul::AfterApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_the_cleansing_cleansing_soul::AfterRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
AfterEffectApply += AuraEffectApplyFn(spell_fjord_the_cleansing_cleansing_soul::AfterApply, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
AfterEffectRemove += AuraEffectRemoveFn(spell_fjord_the_cleansing_cleansing_soul::AfterRemove, EFFECT_0, SPELL_AURA_DUMMY, AURA_EFFECT_HANDLE_REAL);
}
};
// 50217 - The Cleansing: Script Effect Player Cast Mirror Image
class spell_the_cleansing_mirror_image_script_effect : public SpellScript
class spell_fjord_the_cleansing_mirror_image_script_effect : public SpellScript
{
PrepareSpellScript(spell_the_cleansing_mirror_image_script_effect);
PrepareSpellScript(spell_fjord_the_cleansing_mirror_image_script_effect);
bool Validate(SpellInfo const* /*spellInfo*/) override
{
@@ -465,14 +456,14 @@ class spell_the_cleansing_mirror_image_script_effect : public SpellScript
void Register() override
{
OnEffectHitTarget += SpellEffectFn(spell_the_cleansing_mirror_image_script_effect::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHitTarget += SpellEffectFn(spell_fjord_the_cleansing_mirror_image_script_effect::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
// 50238 - The Cleansing: Your Inner Turmoil's On Death Cast on Master
class spell_the_cleansing_on_death_cast_on_master : public SpellScript
class spell_fjord_the_cleansing_on_death_cast_on_master : public SpellScript
{
PrepareSpellScript(spell_the_cleansing_on_death_cast_on_master);
PrepareSpellScript(spell_fjord_the_cleansing_on_death_cast_on_master);
bool Validate(SpellInfo const* spellInfo) override
{
@@ -488,7 +479,7 @@ class spell_the_cleansing_on_death_cast_on_master : public SpellScript
void Register() override
{
OnEffectHit += SpellEffectFn(spell_the_cleansing_on_death_cast_on_master::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
OnEffectHit += SpellEffectFn(spell_fjord_the_cleansing_on_death_cast_on_master::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
}
};
@@ -503,9 +494,9 @@ enum TheWayToHisHeart
};
// 21014 - Anuniaq's Net
class spell_the_way_to_his_heart_anuniaq_net : public SpellScript
class spell_fjord_the_way_to_his_heart_anuniaq_net : public SpellScript
{
PrepareSpellScript(spell_the_way_to_his_heart_anuniaq_net);
PrepareSpellScript(spell_fjord_the_way_to_his_heart_anuniaq_net);
bool Validate(SpellInfo const* /*spell*/) override
{
@@ -520,20 +511,20 @@ class spell_the_way_to_his_heart_anuniaq_net : public SpellScript
void Register() override
{
OnEffectHit += SpellEffectFn(spell_the_way_to_his_heart_anuniaq_net::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
OnEffectHit += SpellEffectFn(spell_fjord_the_way_to_his_heart_anuniaq_net::HandleDummy, EFFECT_0, SPELL_EFFECT_DUMMY);
}
};
void AddSC_howling_fjord()
{
RegisterCreatureAI(npc_daegarn);
RegisterCreatureAI(npc_mindless_abomination);
RegisterSpellScript(spell_mindless_abomination_explosion_fx_master);
RegisterSpellScript(spell_rivenwood_captives_not_on_quest);
RegisterSpellScript(spell_rivenwood_captives_on_quest);
RegisterSpellScript(spell_the_cleansing_shrine_cast);
RegisterSpellScript(spell_the_cleansing_cleansing_soul);
RegisterSpellScript(spell_the_cleansing_mirror_image_script_effect);
RegisterSpellScript(spell_the_cleansing_on_death_cast_on_master);
RegisterSpellScript(spell_the_way_to_his_heart_anuniaq_net);
RegisterSpellScript(spell_fjord_mindless_abomination_ping_master);
RegisterSpellScript(spell_fjord_mindless_abomination_explosion_fx_master);
RegisterSpellScript(spell_fjord_rivenwood_captives_not_on_quest);
RegisterSpellScript(spell_fjord_rivenwood_captives_on_quest);
RegisterSpellScript(spell_fjord_the_cleansing_shrine_cast);
RegisterSpellScript(spell_fjord_the_cleansing_cleansing_soul);
RegisterSpellScript(spell_fjord_the_cleansing_mirror_image_script_effect);
RegisterSpellScript(spell_fjord_the_cleansing_on_death_cast_on_master);
RegisterSpellScript(spell_fjord_the_way_to_his_heart_anuniaq_net);
}