diff --git a/data/sql/updates/pending_db_world/tavarok_darkweaver_sai_removal.sql b/data/sql/updates/pending_db_world/tavarok_darkweaver_sai_removal.sql new file mode 100644 index 000000000..7145c3b87 --- /dev/null +++ b/data/sql/updates/pending_db_world/tavarok_darkweaver_sai_removal.sql @@ -0,0 +1,5 @@ +-- +UPDATE `creature_template` SET `ScriptName` = 'boss_tavarok', `AIName` = '' WHERE `entry` = 18343; +UPDATE `creature_template` SET `ScriptName` = 'boss_darkweaver_syth', `AIName` = '' WHERE `entry` = 18472; + +DELETE FROM `smart_scripts` WHERE `entryorguid` IN (18343, 18472, 1847200) AND (`source_type` = 0 OR `source_type` = 9); diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_tavarok.cpp b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_tavarok.cpp new file mode 100644 index 000000000..ce0c30e62 --- /dev/null +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/boss_tavarok.cpp @@ -0,0 +1,77 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "mana_tombs.h" + +enum Spells +{ + SPELL_EARTHQUAKE = 33919, + SPELL_CRYSTAL_PRISON = 32361, + SPELL_ARCING_SMASH_N = 8374, + SPELL_ARCING_SMASH_H = 38761 +}; + +struct boss_tavarok : public BossAI +{ + boss_tavarok(Creature* creature) : BossAI(creature, DATA_TAVAROK) + { + scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); + } + + void Reset() override + { + _Reset(); + } + + void JustEngagedWith(Unit* /*who*/) override + { + _JustEngagedWith(); + + scheduler.Schedule(10s, 14200ms, [this](TaskContext context) + { + DoCastSelf(SPELL_EARTHQUAKE); + context.Repeat(20s, 31s); + }).Schedule(12s, 22s, [this](TaskContext context) + { + DoCastRandomTarget(SPELL_CRYSTAL_PRISON); + context.Repeat(15s, 22s); + }).Schedule(5900ms, [this](TaskContext context) + { + DoCastVictim(DUNGEON_MODE(SPELL_ARCING_SMASH_N, SPELL_ARCING_SMASH_H)); + context.Repeat(8s, 12s); + }); + } + + void JustDied(Unit* /*killer*/) override + { + _JustDied(); + } + + void KilledUnit(Unit* /*victim*/) override + { + } +}; + +void AddSC_boss_tavarok() +{ + RegisterManaTombsCreatureAI(boss_tavarok); +} \ No newline at end of file diff --git a/src/server/scripts/Outland/Auchindoun/ManaTombs/mana_tombs.h b/src/server/scripts/Outland/Auchindoun/ManaTombs/mana_tombs.h index 8ed9d3ce8..5db1dc75d 100644 --- a/src/server/scripts/Outland/Auchindoun/ManaTombs/mana_tombs.h +++ b/src/server/scripts/Outland/Auchindoun/ManaTombs/mana_tombs.h @@ -40,4 +40,6 @@ inline AI* GetManaTombsAI(T* obj) return GetInstanceAI(obj, MTScriptName); } +#define RegisterManaTombsCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetManaTombsAI) + #endif // MANA_TOMBS_H_ diff --git a/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp new file mode 100644 index 000000000..45267f342 --- /dev/null +++ b/src/server/scripts/Outland/Auchindoun/SethekkHalls/boss_darkweaver_syth.cpp @@ -0,0 +1,115 @@ +/* + * This file is part of the AzerothCore Project. See AUTHORS file for Copyright information + * + * This program is free software; you can redistribute it and/or modify it + * under the terms of the GNU Affero General Public License as published by the + * Free Software Foundation; either version 3 of the License, or (at your + * option) any later version. + * + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for + * more details. + * + * You should have received a copy of the GNU General Public License along + * with this program. If not, see . + */ + +#include "ScriptMgr.h" +#include "ScriptedCreature.h" +#include "sethekk_halls.h" + +enum Spells +{ + SPELL_FLAME_SHOCK_N = 15039, + SPELL_FLAME_SHOCK_H = 15616, + SPELL_ARCANE_SHOCK_N = 33534, + SPELL_ARCANE_SHOCK_H = 38135, + SPELL_FROST_SHOCK_N = 12548, + SPELL_FROST_SHOCK_H = 21401, + SPELL_SHADOW_SHOCK_N = 33620, + SPELL_SHADOW_SHOCK_H = 38137, + SPELL_CHAIN_LIGHTNING_N = 15659, + SPELL_CHAIN_LIGHTNING_H = 15305, + SPELL_SUMMON_ARC_ELE = 33538, + SPELL_SUMMON_FIRE_ELE = 33537, + SPELL_SUMMON_FROST_ELE = 33539, + SPELL_SUMMON_SHADOW_ELE = 33540 +}; + +enum Text +{ + SAY_SUMMON = 0, + SAY_AGGRO = 1, + SAY_SLAY = 2, + SAY_DEATH = 3 +}; + +struct boss_darkweaver_syth : public BossAI +{ + boss_darkweaver_syth(Creature* creature) : BossAI(creature, DATA_DARKWEAVER_SYTH) + { + scheduler.SetValidator([this] + { + return !me->HasUnitState(UNIT_STATE_CASTING); + }); + } + + void Reset() override + { + _Reset(); + + ScheduleHealthCheckEvent({90, 50, 10}, [&] { + Talk(SAY_SUMMON); + DoCastSelf(SPELL_SUMMON_ARC_ELE); + DoCastSelf(SPELL_SUMMON_FIRE_ELE); + DoCastSelf(SPELL_SUMMON_FROST_ELE); + DoCastSelf(SPELL_SUMMON_SHADOW_ELE); + }); + } + + void JustEngagedWith(Unit* /*who*/) override + { + _JustEngagedWith(); + Talk(SAY_AGGRO); + + scheduler.Schedule(2s, [this](TaskContext context) + { + DoCastRandomTarget(DUNGEON_MODE(SPELL_FLAME_SHOCK_N, SPELL_FLAME_SHOCK_H)); + context.Repeat(10s, 15s); + }).Schedule(4s, [this](TaskContext context) + { + DoCastRandomTarget(DUNGEON_MODE(SPELL_ARCANE_SHOCK_N, SPELL_ARCANE_SHOCK_H)); + context.Repeat(10s, 15s); + }).Schedule(6s, [this](TaskContext context) + { + DoCastRandomTarget(DUNGEON_MODE(SPELL_FROST_SHOCK_N, SPELL_FROST_SHOCK_H)); + context.Repeat(10s, 15s); + }).Schedule(8s, [this](TaskContext context) + { + DoCastRandomTarget(DUNGEON_MODE(SPELL_SHADOW_SHOCK_N, SPELL_SHADOW_SHOCK_H)); + context.Repeat(10s, 15s); + }).Schedule(15s, [this](TaskContext context) + { + DoCastRandomTarget(DUNGEON_MODE(SPELL_CHAIN_LIGHTNING_N, SPELL_CHAIN_LIGHTNING_H)); + context.Repeat(10s, 15s); + }); + } + + void JustDied(Unit* /*killer*/) override + { + _JustDied(); + + Talk(SAY_DEATH); + } + + void KilledUnit(Unit* /*victim*/) override + { + Talk(SAY_SLAY); + } +}; + +void AddSC_boss_darkweaver_syth() +{ + RegisterSethekkHallsCreatureAI(boss_darkweaver_syth); +} \ No newline at end of file diff --git a/src/server/scripts/Outland/outland_script_loader.cpp b/src/server/scripts/Outland/outland_script_loader.cpp index aa72e7127..4600cd559 100644 --- a/src/server/scripts/Outland/outland_script_loader.cpp +++ b/src/server/scripts/Outland/outland_script_loader.cpp @@ -21,9 +21,11 @@ void AddSC_instance_auchenai_crypts(); void AddSC_boss_shirrak_the_dead_watcher(); void AddSC_boss_nexusprince_shaffar(); //Auchindoun Mana Tombs void AddSC_boss_pandemonius(); +void AddSC_boss_tavarok(); void AddSC_instance_mana_tombs(); void AddSC_boss_talon_king_ikiss(); //Auchindoun Sekketh Halls void AddSC_boss_anzu(); +void AddSC_boss_darkweaver_syth(); void AddSC_instance_sethekk_halls(); void AddSC_instance_shadow_labyrinth(); //Auchindoun Shadow Labyrinth void AddSC_boss_ambassador_hellmaw(); @@ -122,9 +124,11 @@ void AddOutlandScripts() AddSC_boss_shirrak_the_dead_watcher(); AddSC_boss_nexusprince_shaffar(); //Auchindoun Mana Tombs AddSC_boss_pandemonius(); + AddSC_boss_tavarok(); AddSC_instance_mana_tombs(); AddSC_boss_talon_king_ikiss(); //Auchindoun Sekketh Halls AddSC_boss_anzu(); + AddSC_boss_darkweaver_syth(); AddSC_instance_sethekk_halls(); AddSC_instance_shadow_labyrinth(); //Auchindoun Shadow Labyrinth AddSC_boss_ambassador_hellmaw();