From 5e454e58e5027b719599b1c34858bc9d6b05288f Mon Sep 17 00:00:00 2001 From: Miraco Date: Sun, 23 Jun 2024 14:59:35 +0200 Subject: [PATCH] BF: Completly remove boss the maker script, and add it to acid and spell_list Closes https://github.com/cmangos/mangos-tbc/pull/681 --- sql/scriptdev2/scriptdev2.sql | 1 - .../blood_furnace/boss_the_maker.cpp | 112 ------------------ .../AI/ScriptDevAI/system/ScriptLoader.cpp | 2 - 3 files changed, 115 deletions(-) delete mode 100644 src/game/AI/ScriptDevAI/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp diff --git a/sql/scriptdev2/scriptdev2.sql b/sql/scriptdev2/scriptdev2.sql index 28487677727..541d4a41a9f 100644 --- a/sql/scriptdev2/scriptdev2.sql +++ b/sql/scriptdev2/scriptdev2.sql @@ -775,7 +775,6 @@ UPDATE creature_template SET ScriptName='boss_krosh_firehand' WHERE entry=18832; /* BLOOD FURNACE */ /* The Maker,Broggok,Kelidan,Broggok's cloud */ -UPDATE creature_template SET ScriptName='boss_the_maker' WHERE entry=17381; UPDATE creature_template SET ScriptName='boss_broggok' WHERE entry=17380; UPDATE creature_template SET ScriptName='boss_kelidan_the_breaker' WHERE entry=17377; UPDATE creature_template SET ScriptName='mob_shadowmoon_channeler' WHERE entry=17653; diff --git a/src/game/AI/ScriptDevAI/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp b/src/game/AI/ScriptDevAI/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp deleted file mode 100644 index 6687c6b3342..00000000000 --- a/src/game/AI/ScriptDevAI/scripts/outland/hellfire_citadel/blood_furnace/boss_the_maker.cpp +++ /dev/null @@ -1,112 +0,0 @@ -/* This file is part of the ScriptDev2 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 General Public License as published by - * the Free Software Foundation; either version 2 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 General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA - */ - -/* ScriptData -SDName: Boss_The_Maker -SD%Complete: 80 -SDComment: Mind control no support -SDCategory: Hellfire Citadel, Blood Furnace -EndScriptData */ - -#include "AI/ScriptDevAI/include/sc_common.h" -#include "blood_furnace.h" -#include "AI/ScriptDevAI/base/CombatAI.h" - -enum -{ - SAY_AGGRO_1 = 17679, - SAY_AGGRO_2 = 17680, - SAY_AGGRO_3 = 17681, - SAY_KILL_1 = 17683, - SAY_KILL_2 = 17684, - SAY_DIE = 17685, - - SPELL_EXPLODING_BREAKER = 30925, - SPELL_EXPLODING_BREAKER_H = 40059, - SPELL_DOMINATION = 30923 -}; - -enum MakerActions -{ - MAKER_EXPLODING_BEAKER, - MAKER_DOMINATION, - MAKER_ACTION_MAX, -}; - -struct boss_the_makerAI : public CombatAI -{ - boss_the_makerAI(Creature* creature) : CombatAI(creature, MAKER_ACTION_MAX), m_instance(static_cast(creature->GetInstanceData())), - m_isRegularMode(creature->GetMap()->IsRegularDifficulty()) - { - AddCombatAction(MAKER_EXPLODING_BEAKER, 6000u); - AddCombatAction(MAKER_DOMINATION, 20000u); - AddOnKillText(SAY_KILL_1, SAY_KILL_2); - } - - ScriptedInstance* m_instance; - bool m_isRegularMode; - - void Aggro(Unit* /*who*/) override - { - switch (urand(0, 2)) - { - case 0: DoBroadcastText(SAY_AGGRO_1, m_creature); break; - case 1: DoBroadcastText(SAY_AGGRO_2, m_creature); break; - case 2: DoBroadcastText(SAY_AGGRO_3, m_creature); break; - } - - if (m_instance) - m_instance->SetData(TYPE_THE_MAKER_EVENT, IN_PROGRESS); - } - - void JustReachedHome() override - { - if (m_instance) - m_instance->SetData(TYPE_THE_MAKER_EVENT, FAIL); - } - - void JustDied(Unit* /*killer*/) override - { - DoBroadcastText(SAY_DIE, m_creature); - - if (m_instance) - m_instance->SetData(TYPE_THE_MAKER_EVENT, DONE); - } - - void ExecuteAction(uint32 action) override - { - switch (action) - { - case MAKER_EXPLODING_BEAKER: - if (DoCastSpellIfCan(m_creature->GetVictim(), m_isRegularMode ? SPELL_EXPLODING_BREAKER : SPELL_EXPLODING_BREAKER_H) == CAST_OK) - ResetCombatAction(action, urand(4000, 12000)); - break; - case MAKER_DOMINATION: - if (Unit* target = m_creature->SelectAttackingTarget(ATTACKING_TARGET_RANDOM, 1, nullptr, SELECT_FLAG_PLAYER)) - if (DoCastSpellIfCan(target, SPELL_DOMINATION) == CAST_OK) - ResetCombatAction(action, urand(20000, 25000)); - break; - } - } -}; - -void AddSC_boss_the_maker() -{ - Script* pNewScript = new Script; - pNewScript->Name = "boss_the_maker"; - pNewScript->GetAI = &GetNewAIInstance; - pNewScript->RegisterSelf(); -} diff --git a/src/game/AI/ScriptDevAI/system/ScriptLoader.cpp b/src/game/AI/ScriptDevAI/system/ScriptLoader.cpp index e4381c36e87..5de11baa907 100644 --- a/src/game/AI/ScriptDevAI/system/ScriptLoader.cpp +++ b/src/game/AI/ScriptDevAI/system/ScriptLoader.cpp @@ -319,7 +319,6 @@ extern void AddSC_boss_high_king_maulgar(); extern void AddSC_instance_gruuls_lair(); extern void AddSC_boss_broggok(); // HC, blood_furnace extern void AddSC_boss_kelidan_the_breaker(); -extern void AddSC_boss_the_maker(); extern void AddSC_instance_blood_furnace(); extern void AddSC_boss_nazan_and_vazruden(); // HC, hellfire_ramparts extern void AddSC_boss_omor_the_unscarred(); @@ -684,7 +683,6 @@ void AddScripts() AddSC_instance_gruuls_lair(); AddSC_boss_broggok(); // HC, blood_furnace AddSC_boss_kelidan_the_breaker(); - AddSC_boss_the_maker(); AddSC_instance_blood_furnace(); AddSC_boss_nazan_and_vazruden(); // HC, hellfire_ramparts AddSC_boss_omor_the_unscarred();