From 1cec5d25343ce177ebe2ea9ea6b24d190bb6d02e Mon Sep 17 00:00:00 2001 From: Skjalf <47818697+Nyeriah@users.noreply.github.com> Date: Mon, 25 Jul 2022 12:12:43 -0300 Subject: [PATCH] =?UTF-8?q?refactor(Scripts/TempleOfAhnQiraj):=20Remove=20?= =?UTF-8?q?Giant=20Flesh=20Claw=20script=20as=E2=80=A6=20(#12526)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit refactor(Scripts/TempleOfAhnQiraj): Remove Giant Flesh Claw script as it is not needed --- .../rev_1658719876642198500.sql | 6 ++++ .../Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp | 36 ++----------------- 2 files changed, 9 insertions(+), 33 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1658719876642198500.sql diff --git a/data/sql/updates/pending_db_world/rev_1658719876642198500.sql b/data/sql/updates/pending_db_world/rev_1658719876642198500.sql new file mode 100644 index 000000000..b04cd7172 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1658719876642198500.sql @@ -0,0 +1,6 @@ +-- +DELETE FROM `creature_template_movement` WHERE `creatureId` = 15802; +INSERT INTO `creature_template_movement` (`CreatureId`, `Ground`, `Swim`, `Flight`, `Rooted`, `Chase`, `Random`, `InteractionPauseTimer`) VALUES +(15802, 1, 0, 0, 1, 0, 0, 0); + +UPDATE `creature_template` SET `ScriptName` = '' WHERE `entry` = 15802; diff --git a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp index c262aafe2..e2a9f9453 100644 --- a/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp +++ b/src/server/scripts/Kalimdor/TempleOfAhnQiraj/boss_cthun.cpp @@ -831,13 +831,11 @@ public: } } - void DoAction(int32 param) override + void SummonedCreatureDies(Creature* creature, Unit* /*killer*/) override { - switch (param) + if (creature->GetEntry() == NPC_FLESH_TENTACLE) { - case ACTION_FLESH_TENTACLE_KILLED: - ++FleshTentaclesKilled; - break; + ++FleshTentaclesKilled; } } }; @@ -1190,33 +1188,6 @@ public: }; }; -class npc_giant_flesh_tentacle : public CreatureScript -{ -public: - npc_giant_flesh_tentacle() : CreatureScript("npc_giant_flesh_tentacle") { } - - CreatureAI* GetAI(Creature* creature) const override - { - return new flesh_tentacleAI(creature); - } - - struct flesh_tentacleAI : public ScriptedAI - { - flesh_tentacleAI(Creature* creature) : ScriptedAI(creature) - { - SetCombatMovement(false); - } - - void JustDied(Unit* /*killer*/) override - { - if (TempSummon* summon = me->ToTempSummon()) - if (Unit* summoner = summon->GetSummonerUnit()) - if (summoner->IsAIEnabled) - summoner->GetAI()->DoAction(ACTION_FLESH_TENTACLE_KILLED); - } - }; -}; - //GetAIs void AddSC_boss_cthun() @@ -1227,5 +1198,4 @@ void AddSC_boss_cthun() new npc_claw_tentacle(); new npc_giant_claw_tentacle(); new npc_giant_eye_tentacle(); - new npc_giant_flesh_tentacle(); }