fix(Scripts/AzjolNerub): Rework Kirthik the Gatewatcher event (#23763)

This commit is contained in:
Andrew
2025-11-18 02:51:04 -03:00
committed by GitHub
parent 4e619ffa0c
commit 5978d33312
4 changed files with 74 additions and 18 deletions

View File

@@ -0,0 +1,44 @@
--
DELETE FROM `smart_scripts` WHERE (`source_type` = 0) AND (`entryorguid` IN (28732, 28733, 28734));
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`, `event_param6`, `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
(28732, 0, 0, 0, 0, 0, 100, 0, 2000, 5000, 6000, 8000, 0, 0, 11, 52532, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Warrior - In Combat - Cast \'Strike\''),
(28732, 0, 1, 0, 0, 0, 100, 0, 2000, 10000, 15000, 15000, 0, 0, 11, 49806, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Warrior - In Combat - Cast \'Cleave\''),
(28733, 0, 0, 0, 0, 0, 100, 0, 0, 0, 2000, 2500, 0, 0, 11, 52534, 64, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Shadowcaster - In Combat - Cast \'Shadow Bolt\''),
(28733, 0, 1, 0, 0, 0, 100, 0, 6000, 12000, 12000, 20000, 0, 0, 11, 52535, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Shadowcaster - In Combat - Cast \'Shadow Nova\''),
(28734, 0, 0, 0, 67, 0, 100, 0, 7000, 7000, 7000, 7000, 0, 5, 11, 52540, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Skirmisher - On Behind Target - Cast \'Backstab\''),
(28734, 0, 1, 0, 0, 0, 100, 0, 5000, 10000, 15000, 15000, 0, 0, 11, 52536, 0, 0, 0, 0, 0, 5, 40, 0, 0, 0, 0, 0, 0, 0, 'Anub\'ar Skirmisher - In Combat - Cast \'Fixate Trigger\'');
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28729) AND (`source_type` = 0) AND (`id` IN (6));
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28730) AND (`source_type` = 0) AND (`id` IN (5));
DELETE FROM `smart_scripts` WHERE (`entryorguid` = 28731) AND (`source_type` = 0) AND (`id` IN (6));
SET @CGUID := 12758;
DELETE FROM `creature` WHERE `guid` BETWEEN @CGUID+0 AND @CGUID+8;
INSERT INTO `creature` (`guid`, `id1`, `map`, `zoneId`, `areaId`, `spawnMask`, `phaseMask`, `equipment_id`, `position_x`, `position_y`, `position_z`, `orientation`, `spawntimesecs`, `wander_distance`, `currentwaypoint`, `curhealth`, `curmana`, `MovementType`, `npcflag`, `unit_flags`,`dynamicflags`, `VerifiedBuild`) VALUES
(@CGUID+0, 28731, 601, 4277, 4405, 3, 1, 0, 543.82611083984375, 665.12335205078125, 776.24530029296875, 1.553343057632446289, 7200, 0, 0, 11210, 0, 0, 0, 0, 0, 64395), -- 28731 (Area: 4405 - Difficulty: 1) CreateObject1 -- silthik
(@CGUID+1, 28730, 601, 4277, 4405, 3, 1, 0, 526.66357421875, 663.6053466796875, 775.80523681640625, 1.239183783531188964, 7200, 0, 0, 11210, 0, 0, 0, 0, 0, 64395), -- 28730 (Area: 4405 - Difficulty: 1) CreateObject1 gashra
(@CGUID+2, 28729, 601, 4277, 4405, 3, 1, 0, 511.809722900390625, 666.493408203125, 776.27813720703125, 0.977384388446807861, 7200, 0, 0, 11210, 0, 0, 0, 0, 0, 64395), -- 28729 (Area: 4405 - Difficulty: 1) CreateObject1 -- narjil
(@CGUID+3, 28733, 601, 4277, 4405, 3, 1, 0, 549.69268798828125, 662.0069580078125, 776.99273681640625, 1.640609502792358398,7200, 0, 0, 5028, 6525, 0, 0, 0, 0, 64395),
(@CGUID+4, 28734, 601, 4277, 4405, 3, 1, 0, 550.046142578125, 668.1309814453125, 776.2789306640625, 1.65806281566619873, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 64395),
(@CGUID+5, 28732, 601, 4277, 4405, 3, 1, 0, 531.03082275390625, 658.173095703125, 776.2396240234375, 1.343903541564941406, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 64395),
(@CGUID+6, 28734, 601, 4277, 4405, 3, 1, 0, 521.81475830078125, 659.4708251953125, 776.3131103515625, 1.186823844909667968, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 64395),
(@CGUID+7, 28733, 601, 4277, 4405, 3, 1, 0, 506.17828369140625, 669.9266357421875, 776.3056640625, 0.855211317539215087, 7200, 0, 0, 5028, 6525, 0, 0, 0, 0, 64395),
(@CGUID+8, 28732, 601, 4277, 4405, 3, 1, 0, 506.515625, 664.38018798828125, 776.97589111328125, 0.92502450942993164, 7200, 0, 0, 6285, 0, 0, 0, 0, 0, 64395);
-- Prevent combat assist
UPDATE `creature_template` SET `flags_extra` = `flags_extra`|33554432 WHERE `entry` IN (28732, 28733, 28734, 28731, 28730, 28729, 28684, 31612, 31616, 31615, 31617, 31608, 31605, 31606);
DELETE FROM `creature_formations` WHERE `leaderGUID` IN (12758, 12759, 12760);
INSERT INTO `creature_formations` (`leaderGUID`, `memberGUID`, `groupAI`) VALUES
(12758, 12758, 11),
(12758, 12762, 11),
(12758, 12761, 11),
(12759, 12759, 11),
(12759, 12763, 11),
(12759, 12764, 11),
(12760, 12760, 11),
(12760, 12765, 11),
(12760, 12766, 11);

View File

@@ -29,7 +29,11 @@ enum ANData
DATA_KRIKTHIR = 0,
DATA_HADRONOX = 1,
DATA_ANUBARAK = 2,
MAX_ENCOUNTERS = 3
MAX_ENCOUNTERS = 3,
DATA_GASHRA = 4,
DATA_NARJIL = 5,
DATA_SILTHIK = 6
};
enum ANIds

View File

@@ -16,6 +16,7 @@
*/
#include "AchievementCriteriaScript.h"
#include "CreatureGroups.h"
#include "CreatureScript.h"
#include "ScriptedCreature.h"
#include "azjol_nerub.h"
@@ -75,16 +76,6 @@ public:
{
BossAI::Reset();
me->SummonCreature(NPC_WATCHER_NARJIL, 511.8f, 666.493f, 776.278f, 0.977f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
me->SummonCreature(NPC_SHADOWCASTER, 511.63f, 672.44f, 775.71f, 0.90f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
me->SummonCreature(NPC_WARRIOR, 506.75f, 670.7f, 776.24f, 0.92f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
me->SummonCreature(NPC_WATCHER_GASHRA, 526.66f, 663.605f, 775.805f, 1.23f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
me->SummonCreature(NPC_SKIRMISHER, 522.91f, 660.18f, 776.19f, 1.28f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
me->SummonCreature(NPC_WARRIOR, 528.14f, 659.72f, 776.14f, 1.37f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
me->SummonCreature(NPC_WATCHER_SILTHIK, 543.826f, 665.123f, 776.245f, 1.55f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
me->SummonCreature(NPC_SKIRMISHER, 547.5f, 669.96f, 776.1f, 2.3f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
me->SummonCreature(NPC_SHADOWCASTER, 548.64f, 664.27f, 776.74f, 1.77f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 30000);
ScheduleHealthCheckEvent(25, [&] {
DoCastSelf(SPELL_FRENZY, true);
@@ -100,6 +91,16 @@ public:
_canTalk = true;
_minionInCombat = false;
Creature* narjil = instance->GetCreature(DATA_NARJIL);
Creature* gashra = instance->GetCreature(DATA_GASHRA);
Creature* silthik = instance->GetCreature(DATA_SILTHIK);
for (Creature* watcher : { narjil, gashra, silthik })
{
if (watcher && watcher->GetFormation())
watcher->GetFormation()->RespawnFormation(true);
}
}
void MoveInLineOfSight(Unit* who) override
@@ -142,7 +143,17 @@ public:
uint32 GetData(uint32 data) const override
{
if (data == me->GetEntry())
return summons.HasEntry(NPC_WATCHER_NARJIL) && summons.HasEntry(NPC_WATCHER_GASHRA) && summons.HasEntry(NPC_WATCHER_SILTHIK);
{
Creature* narjil = instance->GetCreature(DATA_NARJIL);
Creature* gashra = instance->GetCreature(DATA_GASHRA);
Creature* silthik = instance->GetCreature(DATA_SILTHIK);
if (!narjil || !gashra || !silthik)
return false;
return narjil->IsAlive() && gashra->IsAlive() && silthik->IsAlive();
}
return 0;
}
@@ -192,12 +203,6 @@ public:
}
}
void JustSummoned(Creature* summon) override
{
summon->SetNoCallAssistance(true);
summons.Summon(summon);
}
void SummonedCreatureDies(Creature* summon, Unit*) override
{
summons.Despawn(summon);

View File

@@ -37,6 +37,9 @@ ObjectData const creatureData[] =
{ NPC_KRIKTHIR_THE_GATEWATCHER, DATA_KRIKTHIR },
{ NPC_HADRONOX, DATA_HADRONOX },
{ NPC_ANUBARAK, DATA_ANUBARAK },
{ NPC_WATCHER_GASHRA, DATA_GASHRA },
{ NPC_WATCHER_NARJIL, DATA_NARJIL },
{ NPC_WATCHER_SILTHIK, DATA_SILTHIK },
{ 0, 0 }
};