mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-24 19:06:49 +01:00
Scripts/Quest: Update 'It's All Fun and Games' (12887,12892) (#27394)
This commit is contained in:
21
sql/updates/world/3.3.5/2021_12_13_03_world.sql
Normal file
21
sql/updates/world/3.3.5/2021_12_13_03_world.sql
Normal file
@@ -0,0 +1,21 @@
|
||||
--
|
||||
UPDATE `creature_template` SET `unit_flags2` = 32 WHERE `entry` = 29747;
|
||||
UPDATE `creature_template_addon` SET `bytes2` = 1, `auras` = '55162 18950' WHERE `entry` = 29747;
|
||||
|
||||
UPDATE `creature_template_movement` SET `Flight` = 0 WHERE `CreatureId` = 29790;
|
||||
UPDATE `creature_template_addon` SET `bytes2` = 1, `auras` = '18950' WHERE `entry` = 29790;
|
||||
UPDATE `creature_template` SET `minlevel` = 80, `maxlevel` = 80, `exp` = 2, `unit_flags2` = `unit_flags2`|32 WHERE `entry` = 29790;
|
||||
|
||||
-- Less than 40, only CreateObject1
|
||||
UPDATE `creature` SET `spawntimesecs` = 30 WHERE `id` IN (29747,29790);
|
||||
|
||||
-- When he despawns (corpse removed), 29790 despawns too, NYI
|
||||
DELETE FROM `smart_scripts` WHERE `entryorguid` = 29747 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
|
||||
(29747,0,0,0,37,0,100,0,0,0,0,0,0,116,8,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Ocular - On AI Initialize - Set Corpse Delay"),
|
||||
(29747,0,1,0,0,0,100,0,0,0,4000,4000,0,11,55269,0,0,0,0,0,2,0,0,0,0,0,0,0,0,"The Ocular - In Combat - Cast 'Deathly Stare'"),
|
||||
(29747,0,2,0,6,0,100,0,0,0,0,0,0,11,55288,0,0,0,0,0,1,0,0,0,0,0,0,0,0,"The Ocular - On Death - Cast 'It's All Fun and Games: The Ocular On Death'");
|
||||
|
||||
DELETE FROM `spell_script_names` WHERE `spell_id` = 55288 AND `ScriptName` = 'spell_the_ocular_on_death';
|
||||
INSERT INTO `spell_script_names` (`spell_id`,`ScriptName`) VALUES
|
||||
(55288,'spell_the_ocular_on_death');
|
||||
@@ -23,6 +23,7 @@
|
||||
#include "ScriptedCreature.h"
|
||||
#include "ScriptedGossip.h"
|
||||
#include "SpellAuras.h"
|
||||
#include "SpellScript.h"
|
||||
#include "TemporarySummon.h"
|
||||
|
||||
/*######
|
||||
@@ -780,6 +781,28 @@ class npc_frostbrood_skytalon : public CreatureScript
|
||||
}
|
||||
};
|
||||
|
||||
// 55288 - It's All Fun and Games: The Ocular On Death
|
||||
class spell_the_ocular_on_death : public SpellScript
|
||||
{
|
||||
PrepareSpellScript(spell_the_ocular_on_death);
|
||||
|
||||
bool Validate(SpellInfo const* spellInfo) override
|
||||
{
|
||||
return ValidateSpellInfo({ uint32(spellInfo->GetEffect(EFFECT_0).CalcValue()) });
|
||||
}
|
||||
|
||||
void HandleScript(SpellEffIndex /*effIndex*/)
|
||||
{
|
||||
if (Player* target = GetHitPlayer())
|
||||
target->CastSpell(target, GetEffectInfo().CalcValue(), true);
|
||||
}
|
||||
|
||||
void Register() override
|
||||
{
|
||||
OnEffectHitTarget += SpellEffectFn(spell_the_ocular_on_death::HandleScript, EFFECT_0, SPELL_EFFECT_SCRIPT_EFFECT);
|
||||
}
|
||||
};
|
||||
|
||||
void AddSC_icecrown()
|
||||
{
|
||||
new npc_argent_valiant;
|
||||
@@ -787,4 +810,5 @@ void AddSC_icecrown()
|
||||
new npc_tournament_training_dummy;
|
||||
new npc_blessed_banner();
|
||||
new npc_frostbrood_skytalon();
|
||||
RegisterSpellScript(spell_the_ocular_on_death);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user