fix(Scripts/Icecrown): Fix idle scourge NPCs in The Battle For Crusaders' Pinnacle (#25224)

Co-authored-by: blinkysc <blinkysc@users.noreply.github.com>
Co-authored-by: sogla <sogladev@gmail.com>
Co-authored-by: ccrs <ccrs@users.noreply.github.com>
This commit is contained in:
blinkysc
2026-03-26 20:16:21 -05:00
committed by GitHub
parent 43769b9099
commit 3c854bb162
+22 -41
View File
@@ -1659,7 +1659,7 @@ enum BlessedBanner
NPC_ARGENT_MASON = 30900, NPC_ARGENT_MASON = 30900,
NPC_REANIMATED_CAPTAIN = 30986, NPC_REANIMATED_CAPTAIN = 30986,
NPC_SCOURGE_DRUDGE = 30984, NPC_SCOURGE_DRUDGE = 30984,
NPC_HIDEOUS_PLAGEBRINGER = 30987, NPC_HIDEOUS_PLAGUEBRINGER = 30987,
NPC_HALOF_THE_DEATHBRINGER = 30989, NPC_HALOF_THE_DEATHBRINGER = 30989,
NPC_LK = 31013, NPC_LK = 31013,
@@ -1771,9 +1771,20 @@ public:
void MoveInLineOfSight(Unit* /*who*/) override { } void MoveInLineOfSight(Unit* /*who*/) override { }
void JustSummoned(Creature* Summoned) override void JustSummoned(Creature* summon) override
{ {
Summons.Summon(Summoned); Summons.Summon(summon);
if (summon->GetEntry() == NPC_SCOURGE_DRUDGE || summon->GetEntry() == NPC_REANIMATED_CAPTAIN ||
summon->GetEntry() == NPC_HIDEOUS_PLAGUEBRINGER || summon->GetEntry() == NPC_HALOF_THE_DEATHBRINGER)
{
summon->SetHomePosition(DalforsPos[2]);
summon->SetReactState(REACT_PASSIVE);
summon->EngageWithTarget(me);
summon->m_Events.AddEventAtOffset([summon]()
{
summon->SetReactState(REACT_AGGRESSIVE);
}, 2s);
}
} }
void JustDied(Unit* /*killer*/) override void JustDied(Unit* /*killer*/) override
@@ -1926,36 +1937,16 @@ public:
if (Creature* LK = GetClosestCreatureWithEntry(me, NPC_LK, 100)) if (Creature* LK = GetClosestCreatureWithEntry(me, NPC_LK, 100))
LK->AI()->Talk(LK_TALK_3); LK->AI()->Talk(LK_TALK_3);
} }
if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE, Mason3Pos[0])) DoSummon(NPC_SCOURGE_DRUDGE, Mason3Pos[0]);
{
tempsum->SetHomePosition(DalforsPos[2]);
tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
}
if (urand(0, 1) == 0) if (urand(0, 1) == 0)
{ {
if (Creature* tempsum = DoSummon(NPC_HIDEOUS_PLAGEBRINGER, Mason1Pos[0])) DoSummon(NPC_HIDEOUS_PLAGUEBRINGER, Mason1Pos[0]);
{ DoSummon(NPC_HIDEOUS_PLAGUEBRINGER, Mason2Pos[0]);
tempsum->SetHomePosition(DalforsPos[2]);
tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
}
if (Creature* tempsum = DoSummon(NPC_HIDEOUS_PLAGEBRINGER, Mason2Pos[0]))
{
tempsum->SetHomePosition(DalforsPos[2]);
tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
}
} }
else else
{ {
if (Creature* tempsum = DoSummon(NPC_REANIMATED_CAPTAIN, Mason1Pos[0])) DoSummon(NPC_REANIMATED_CAPTAIN, Mason1Pos[0]);
{ DoSummon(NPC_REANIMATED_CAPTAIN, Mason2Pos[0]);
tempsum->SetHomePosition(DalforsPos[2]);
tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
}
if (Creature* tempsum = DoSummon(NPC_REANIMATED_CAPTAIN, Mason2Pos[0]))
{
tempsum->SetHomePosition(DalforsPos[2]);
tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
}
} }
PhaseCount++; PhaseCount++;
@@ -1970,22 +1961,12 @@ public:
{ {
if (Creature* LK = GetClosestCreatureWithEntry(me, NPC_LK, 100)) if (Creature* LK = GetClosestCreatureWithEntry(me, NPC_LK, 100))
LK->AI()->Talk(LK_TALK_4); LK->AI()->Talk(LK_TALK_4);
if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE, Mason1Pos[0])) DoSummon(NPC_SCOURGE_DRUDGE, Mason1Pos[0]);
{ DoSummon(NPC_SCOURGE_DRUDGE, Mason2Pos[0]);
tempsum->SetHomePosition(DalforsPos[2]);
tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
}
if (Creature* tempsum = DoSummon(NPC_SCOURGE_DRUDGE, Mason2Pos[0]))
{
tempsum->SetHomePosition(DalforsPos[2]);
tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
}
if (Creature* tempsum = DoSummon(NPC_HALOF_THE_DEATHBRINGER, DalforsPos[0])) if (Creature* tempsum = DoSummon(NPC_HALOF_THE_DEATHBRINGER, DalforsPos[0]))
{ {
HalofSpawned = true; HalofSpawned = true;
guidHalof = tempsum->GetGUID(); guidHalof = tempsum->GetGUID();
tempsum->SetHomePosition(DalforsPos[2]);
tempsum->AI()->AttackStart(GetClosestCreatureWithEntry(me, NPC_BLESSED_BANNER, 100));
} }
} }
break; break;
@@ -2002,7 +1983,7 @@ public:
if (Halof->isDead()) if (Halof->isDead())
{ {
DoCast(me, SPELL_CRUSADERS_SPIRE_VICTORY, true); DoCast(me, SPELL_CRUSADERS_SPIRE_VICTORY, true);
Summons.DespawnEntry(NPC_HIDEOUS_PLAGEBRINGER); Summons.DespawnEntry(NPC_HIDEOUS_PLAGUEBRINGER);
Summons.DespawnEntry(NPC_REANIMATED_CAPTAIN); Summons.DespawnEntry(NPC_REANIMATED_CAPTAIN);
Summons.DespawnEntry(NPC_SCOURGE_DRUDGE); Summons.DespawnEntry(NPC_SCOURGE_DRUDGE);
Summons.DespawnEntry(NPC_HALOF_THE_DEATHBRINGER); Summons.DespawnEntry(NPC_HALOF_THE_DEATHBRINGER);