diff --git a/data/sql/updates/pending_db_world/rev_1637968467142598700.sql b/data/sql/updates/pending_db_world/rev_1637968467142598700.sql
new file mode 100644
index 000000000..120699c86
--- /dev/null
+++ b/data/sql/updates/pending_db_world/rev_1637968467142598700.sql
@@ -0,0 +1,9 @@
+INSERT INTO `version_db_world` (`sql_rev`) VALUES ('1637968467142598700');
+
+DELETE FROM `creature_text` WHERE `CreatureID` = 16097;
+INSERT INTO `creature_text` (`CreatureID`, `GroupID`, `ID`, `Text`, `Type`, `Language`, `Probability`, `Emote`, `Duration`, `Sound`, `BroadcastTextId`, `TextRange`, `comment`) VALUES
+(16097, 0, 0, 'My torture is ended and now I can join the Goddess. Thank you so very much!', 14, 0, 100, 0, 0, 0, 11860, 0, 'Isalien - ON DEATH');
+
+UPDATE `creature_template` SET `AIName` = '', `ScriptName` = 'boss_isalien' WHERE `entry` = 16097;
+
+DELETE FROM `smart_scripts` WHERE `entryorguid` = 16097 AND `source_type` = 0;
diff --git a/src/server/scripts/Kalimdor/DireMaul/boss_isalien.cpp b/src/server/scripts/Kalimdor/DireMaul/boss_isalien.cpp
new file mode 100644
index 000000000..0a0d61fe5
--- /dev/null
+++ b/src/server/scripts/Kalimdor/DireMaul/boss_isalien.cpp
@@ -0,0 +1,141 @@
+/*
+ * 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 "dire_maul.h"
+#include "TaskScheduler.h"
+
+enum Texts
+{
+ SAY_DEATH = 0
+};
+
+enum Spells
+{
+ SPELL_CALL_EMPYREAN = 27639,
+ SPELL_MULTI_SHOT = 14443,
+ SPELL_NET = 12024,
+ SPELL_STARSHARDS = 27636,
+ SPELL_REGROWTH = 27637
+};
+
+enum Phases
+{
+ PHASE_NONE = 0,
+ PHASE_REGROWTH
+};
+
+enum Points
+{
+ POINT_RANDOM = 1
+};
+
+struct boss_isalien : public BossAI
+{
+ boss_isalien(Creature* creature) : BossAI(creature, DATA_ISALIEN) { }
+
+ void Reset() override
+ {
+ _Reset();
+ _scheduler.CancelAll();
+ summons.DespawnAll();
+ _phase = PHASE_NONE;
+
+ _scheduler.SetValidator([this]
+ {
+ return !me->HasUnitState(UNIT_STATE_CASTING);
+ });
+ }
+
+ void DamageTaken(Unit* /*attacker*/, uint32& /*damage*/, DamageEffectType /*type*/, SpellSchoolMask /*school*/) override
+ {
+ if (_phase != PHASE_REGROWTH && me->HealthBelowPct(80.f))
+ {
+ _phase = PHASE_REGROWTH;
+ _scheduler.Schedule(25s, 30s, [this](TaskContext context)
+ {
+ Position randomPos = me->GetRandomPoint(me->GetPosition(), 15.f);
+ me->GetMotionMaster()->MovePoint(POINT_RANDOM, randomPos);
+ context.Schedule(3s, [this](TaskContext /*context*/)
+ {
+ me->GetMotionMaster()->Clear();
+ me->GetMotionMaster()->MoveChase(me->GetVictim());
+ DoCastSelf(SPELL_REGROWTH);
+ });
+ context.Repeat(25s, 30s);
+ });
+ }
+ }
+
+ void JustSummoned(Creature* summon) override
+ {
+ summons.Summon(summon);
+ }
+
+ void EnterCombat(Unit* /*who*/) override
+ {
+ _EnterCombat();
+ _scheduler.Schedule(4s, 5s, [this](TaskContext context)
+ {
+ DoCastRandomTarget(SPELL_NET);
+ context.Repeat(12s, 15s);
+ })
+ .Schedule(7s, 12s, [this](TaskContext context)
+ {
+ DoCastRandomTarget(SPELL_MULTI_SHOT);
+ context.Repeat(7s, 12s);
+ })
+ .Schedule(20s, 30s, [this](TaskContext context)
+ {
+ DoCastAOE(SPELL_STARSHARDS);
+ context.Repeat(20s, 30s);
+ })
+ .Schedule(8s, 10s, [this](TaskContext /*context*/)
+ {
+ DoCastAOE(SPELL_CALL_EMPYREAN);
+ });
+ }
+
+ void UpdateAI(uint32 diff) override
+ {
+ if (!UpdateVictim())
+ {
+ return;
+ }
+
+ _scheduler.Update(diff, [this]
+ {
+ DoMeleeAttackIfReady();
+ });
+ }
+
+ void JustDied(Unit* /*killer*/) override
+ {
+ _JustDied();
+ Talk(SAY_DEATH);
+ }
+
+protected:
+ TaskScheduler _scheduler;
+ uint8 _phase;
+};
+
+void AddSC_boss_isalien()
+{
+ RegisterDireMaulCreatureAI(boss_isalien);
+}
diff --git a/src/server/scripts/Kalimdor/DireMaul/dire_maul.h b/src/server/scripts/Kalimdor/DireMaul/dire_maul.h
index af03abf39..a1c60c8b5 100644
--- a/src/server/scripts/Kalimdor/DireMaul/dire_maul.h
+++ b/src/server/scripts/Kalimdor/DireMaul/dire_maul.h
@@ -18,7 +18,9 @@
#ifndef DEF_DIRE_MAUL_H
#define DEF_DIRE_MAUL_H
-#include "UnitAI.h"
+#include "CreatureAIImpl.h"
+
+constexpr auto DMScriptName = "instance_dire_maul";
enum DataTypes
{
@@ -27,6 +29,7 @@ enum DataTypes
TYPE_PYLONS_STATE = 2,
TYPE_NORTH_WING_PROGRESS = 3,
TYPE_NORTH_WING_BOSSES = 4,
+ DATA_ISALIEN = 32,
ALL_PYLONS_OFF = 0x1F
};
@@ -43,4 +46,12 @@ enum NpcIds
NPC_HIGHBORNE_SUMMONER = 11466
};
+template
+inline AI* GetDireMaulAI(T* obj)
+{
+ return GetInstanceAI(obj, DMScriptName);
+}
+
+#define RegisterDireMaulCreatureAI(ai_name) RegisterCreatureAIWithFactory(ai_name, GetDireMaulAI)
+
#endif
diff --git a/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp b/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp
index c22aa439c..0b9c3cd2d 100644
--- a/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp
+++ b/src/server/scripts/Kalimdor/DireMaul/instance_dire_maul.cpp
@@ -22,7 +22,7 @@
class instance_dire_maul : public InstanceMapScript
{
public:
- instance_dire_maul() : InstanceMapScript("instance_dire_maul", 429) { }
+ instance_dire_maul() : InstanceMapScript(DMScriptName, 429) { }
struct instance_dire_maul_InstanceMapScript : public InstanceScript
{
diff --git a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp
index e22bc4c82..c3391cbdd 100644
--- a/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp
+++ b/src/server/scripts/Kalimdor/kalimdor_script_loader.cpp
@@ -42,6 +42,7 @@ void AddSC_boss_mal_ganis();
void AddSC_boss_meathook();
void AddSC_culling_of_stratholme();
void AddSC_instance_culling_of_stratholme();
+void AddSC_boss_isalien();
void AddSC_instance_dire_maul(); //Dire Maul
void AddSC_instance_maraudon(); //Maraudon
void AddSC_boss_onyxia(); //Onyxia's Lair
@@ -123,6 +124,7 @@ void AddKalimdorScripts()
AddSC_boss_meathook();
AddSC_culling_of_stratholme();
AddSC_instance_culling_of_stratholme();
+ AddSC_boss_isalien();
AddSC_instance_dire_maul(); //Dire Maul
AddSC_instance_maraudon(); //Maraudon
AddSC_boss_onyxia(); //Onyxia's Lair