From 6788c7eace391064513041c4c5d74441fbbefa41 Mon Sep 17 00:00:00 2001 From: Kitzunu <24550914+Kitzunu@users.noreply.github.com> Date: Sat, 7 Jan 2023 20:06:17 +0100 Subject: [PATCH] fix(DB/Creature): Infested Root-Walker (#14515) * closes https://github.com/azerothcore/azerothcore-wotlk/issues/14490 Co-authored-by: Andrew Letson --- .../rev_1672970916826961100.sql | 7 ++++ .../scripts/Outland/zone_terokkar_forest.cpp | 34 ------------------- 2 files changed, 7 insertions(+), 34 deletions(-) create mode 100644 data/sql/updates/pending_db_world/rev_1672970916826961100.sql diff --git a/data/sql/updates/pending_db_world/rev_1672970916826961100.sql b/data/sql/updates/pending_db_world/rev_1672970916826961100.sql new file mode 100644 index 000000000..260d19950 --- /dev/null +++ b/data/sql/updates/pending_db_world/rev_1672970916826961100.sql @@ -0,0 +1,7 @@ +-- +UPDATE `creature_template` SET `ScriptName` = '', `AIName` = 'SmartAI' WHERE `Entry` = 22095; + +DELETE FROM `smart_scripts` WHERE `entryorguid`=22095; +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 +(22095, 0, 0, 0, 6, 0, 75, 0, 0, 0, 0, 0, 0, 11, 39130, 2, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Infested Root-Walker - On Just Died - Cast \'Summon Wood Mites\''), +(22095, 0, 1, 0, 0, 0, 100, 0, 15000, 20000, 32000, 38000, 0, 11, 39000, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Infested Root-Walker - In Combat - Cast \'Regrowth\' (No Repeat)'); diff --git a/src/server/scripts/Outland/zone_terokkar_forest.cpp b/src/server/scripts/Outland/zone_terokkar_forest.cpp index 567072a6c..f538ef0fd 100644 --- a/src/server/scripts/Outland/zone_terokkar_forest.cpp +++ b/src/server/scripts/Outland/zone_terokkar_forest.cpp @@ -24,7 +24,6 @@ EndScriptData */ /* ContentData npc_unkor_the_ruthless -npc_infested_root_walker npc_rotting_forest_rager npc_netherweb_victim npc_floon @@ -446,38 +445,6 @@ public: }; }; -/*###### -## npc_infested_root_walker -######*/ - -class npc_infested_root_walker : public CreatureScript -{ -public: - npc_infested_root_walker() : CreatureScript("npc_infested_root_walker") { } - - CreatureAI* GetAI(Creature* creature) const override - { - return new npc_infested_root_walkerAI(creature); - } - - struct npc_infested_root_walkerAI : public ScriptedAI - { - npc_infested_root_walkerAI(Creature* creature) : ScriptedAI(creature) { } - - void Reset() override { } - void EnterCombat(Unit* /*who*/) override { } - - void DamageTaken(Unit* done_by, uint32& damage, DamageEffectType, SpellSchoolMask) override - { - if (done_by && done_by->GetTypeId() == TYPEID_PLAYER) - if (me->GetHealth() <= damage) - if (rand() % 100 < 75) - //Summon Wood Mites - DoCast(me, 39130, true); - } - }; -}; - /*###### ## npc_rotting_forest_rager ######*/ @@ -872,7 +839,6 @@ void AddSC_terokkar_forest() // Theirs new npc_unkor_the_ruthless(); - new npc_infested_root_walker(); new npc_rotting_forest_rager(); new npc_floon(); new npc_isla_starmane();