diff --git a/sql/updates/world/custom/custom_2018_08_21_00_world.sql b/sql/updates/world/custom/custom_2018_08_21_00_world.sql index bab3a185e68..9ce46d762c0 100644 --- a/sql/updates/world/custom/custom_2018_08_21_00_world.sql +++ b/sql/updates/world/custom/custom_2018_08_21_00_world.sql @@ -48,7 +48,9 @@ DELETE FROM `spell_script_names` WHERE `ScriptName` IN 'spell_ozumat_jump_to_ground', 'spell_ozumat_shadow_blast', 'spell_ozumat_shadow_blast_missile', -'spell_ozumat_blight_of_ozumat'); +'spell_ozumat_blight_of_ozumat', +'spell_ozumat_purify'); + INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (83240, 'spell_ozumat_charge_to_window'), (83241, 'spell_ozumat_jump_to_ground'), @@ -56,7 +58,8 @@ INSERT INTO `spell_script_names` (`spell_id`, `ScriptName`) VALUES (83652, 'spell_ozumat_jump_to_ground'), (83929, 'spell_ozumat_shadow_blast'), (83931, 'spell_ozumat_shadow_blast_missile'), -(83518, 'spell_ozumat_blight_of_ozumat'); +(83518, 'spell_ozumat_blight_of_ozumat'), +(76953, 'spell_ozumat_purify'); -- Gossips DELETE FROM `gossip_menu_option` WHERE (`MenuID`=11469 AND `OptionID`=0); @@ -64,14 +67,16 @@ INSERT INTO `gossip_menu_option` (`MenuID`, `OptionID`, `OptionIcon`, `OptionTex (11469, 0, 0, 'We are ready!', 1, 1, 41133); -- Spellclicks -DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (44648); +DELETE FROM `npc_spellclick_spells` WHERE `npc_entry` IN (44648, 49104); INSERT INTO `npc_spellclick_spells` (`npc_entry`, `spell_id`, `cast_flags`, `user_type`) VALUES -(44648, 46598, 1, 1); +(44648, 46598, 1, 1), +(49104, 46598, 1, 1); -- Vehicle Accessories -DELETE FROM `vehicle_template_accessory` WHERE `entry` IN (44648); +DELETE FROM `vehicle_template_accessory` WHERE `entry` IN (44648, 49104); INSERT INTO `vehicle_template_accessory` (`entry`, `accessory_entry`, `seat_id`, `minion`, `description`, `summontype`, `summontimer`) VALUES -(44648, 44950, 0, 1, 'Unyielding Behemoth - Hand Visual', 8, 0); +(44648, 44950, 0, 1, 'Unyielding Behemoth - Hand Visual', 8, 0), +(49104, 44950, 0, 1, 'Unyielding Behemoth - Hand Visual', 8, 0); -- Texts DELETE FROM `creature_text` WHERE `CreatureID`= 40792; @@ -120,7 +125,7 @@ INSERT INTO `creature_onkill_reward` (`creature_id`, `CurrencyId1`, `CurrencyCou (49097, 395, 7000); -- Loot -UPDATE `gameobject_template_addon`SET `flags`= 16,`mingold`= 19800, `maxgold`= 20000 WHERE `entry` IN (205216, 207973); +UPDATE `gameobject_template_addon`SET `flags`= 16, `mingold`= 19800, `maxgold`= 20000 WHERE `entry` IN (205216, 207973); DELETE FROM `gameobject_loot_template` WHERE `Entry` IN (29711, 36142); DELETE FROM `reference_loot_template` WHERE `Entry` IN (297110, 361420); diff --git a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_ozumat.cpp b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_ozumat.cpp index 586f21025b6..f5fe8d7266b 100644 --- a/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_ozumat.cpp +++ b/src/server/scripts/EasternKingdoms/ThroneOfTheTides/boss_ozumat.cpp @@ -116,6 +116,7 @@ enum Events // Vicious Mindlasher EVENT_BRAIN_SPIKE, EVENT_VEIL_OF_SHADOW, + EVENT_SHADOW_BOLT, // Unyielding Behemoth EVENT_BLIGHT_SPRAY, @@ -599,7 +600,8 @@ struct npc_ozumat_vicious_mindlasher : public ScriptedAI void JustEngagedWith(Unit* /*who*/) override { _events.ScheduleEvent(EVENT_BRAIN_SPIKE, 44s, 45s); - _events.ScheduleEvent(SPELL_VEIL_OF_SHADOW, 8s, 9s); + _events.ScheduleEvent(EVENT_VEIL_OF_SHADOW, 8s, 9s); + _events.ScheduleEvent(EVENT_SHADOW_BOLT, 1ms); } void JustDied(Unit* /*killer*/) override @@ -625,16 +627,19 @@ struct npc_ozumat_vicious_mindlasher : public ScriptedAI case EVENT_BRAIN_SPIKE: DoCastAOE(SPELL_BRAIN_SPIKE); break; - case SPELL_VEIL_OF_SHADOW: + case EVENT_VEIL_OF_SHADOW: if (Unit* target = SelectTarget(SELECT_TARGET_RANDOM, 0, 50.0f, true, 0)) DoCast(target, SPELL_VEIL_OF_SHADOW); break; + case EVENT_SHADOW_BOLT: + if (Unit* target = me->GetVictim()) + DoCast(target, SPELL_SHADOW_BOLT); + _events.Repeat(2s + 500ms); + break; default: break; } } - - DoSpellAttackIfReady(SPELL_SHADOW_BOLT); } private: @@ -882,6 +887,35 @@ class spell_ozumat_blight_of_ozumat : public SpellScript } }; +class PurifyHeightCheck +{ + public: + PurifyHeightCheck() { } + + bool operator()(WorldObject* object) + { + return (object->GetPositionZ() < 265.42f); + } +}; + +class spell_ozumat_purify : public SpellScript +{ + PrepareSpellScript(spell_ozumat_purify); + + void FilterTargets(std::list& targets) + { + if (targets.empty()) + return; + + targets.remove_if(PurifyHeightCheck()); + } + + void Register() override + { + OnObjectAreaTargetSelect += SpellObjectAreaTargetSelectFn(spell_ozumat_purify::FilterTargets, EFFECT_0, TARGET_UNIT_SRC_AREA_ENTRY); + } +}; + void AddSC_boss_ozumat() { RegisterThroneOfTheTidesCreatureAI(boss_ozumat); @@ -893,4 +927,5 @@ void AddSC_boss_ozumat() RegisterSpellAndAuraScriptPair(spell_ozumat_shadow_blast, spell_ozumat_shadow_blast_AuraScript); RegisterSpellScript(spell_ozumat_shadow_blast_missile); RegisterSpellScript(spell_ozumat_blight_of_ozumat); + RegisterSpellScript(spell_ozumat_purify); }