Skip to content

Commit e4247dd

Browse files
committed
[s2841] Fix some small details on quest 836
(based on commit SD2-TBC[3128] - 00d5fcf) Signed-off-by: xfurry <xfurry@scriptdev2.com>
1 parent aa67170 commit e4247dd

File tree

2 files changed

+19
-2
lines changed

2 files changed

+19
-2
lines changed

scripts/eastern_kingdoms/hinterlands.cpp

Lines changed: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,13 @@ struct npc_00x09hlAI : public npc_escortAI
5151
{
5252
npc_00x09hlAI(Creature* pCreature) : npc_escortAI(pCreature) { Reset(); }
5353

54-
void Reset() override { }
54+
uint8 m_uiSummonCount;
55+
56+
void Reset() override
57+
{
58+
if (!HasEscortState(STATE_ESCORT_ESCORTING))
59+
m_uiSummonCount = 0;
60+
}
5561

5662
void WaypointReached(uint32 uiPointId) override
5763
{
@@ -76,24 +82,35 @@ struct npc_00x09hlAI : public npc_escortAI
7682
switch (uiPointId)
7783
{
7884
case 27:
85+
if (m_uiSummonCount >= 3)
86+
break;
87+
7988
for (uint8 i = 0; i < 3; ++i)
8089
{
8190
float fX, fY, fZ;
8291
m_creature->GetRandomPoint(147.927444f, -3851.513428f, 130.893f, 7.0f, fX, fY, fZ);
8392

8493
m_creature->SummonCreature(NPC_MARAUDING_OWL, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 25000);
94+
++m_uiSummonCount;
8595
}
8696
break;
8797
case 44:
98+
if (m_uiSummonCount >= 6)
99+
break;
100+
88101
for (uint8 i = 0; i < 3; ++i)
89102
{
90103
float fX, fY, fZ;
91104
m_creature->GetRandomPoint(-141.151581f, -4291.213867f, 120.130f, 7.0f, fX, fY, fZ);
92105

93106
m_creature->SummonCreature(NPC_VILE_AMBUSHER, fX, fY, fZ, 0.0f, TEMPSUMMON_CORPSE_TIMED_DESPAWN, 25000);
107+
++m_uiSummonCount;
94108
}
95109
break;
96110
}
111+
112+
// make sure we always have the right stand state
113+
m_creature->SetStandState(UNIT_STAND_STATE_STAND);
97114
}
98115

99116
void Aggro(Unit* pWho) override

sd2_revision_nr.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
#ifndef __SD2_REVISION_NR_H__
22
#define __SD2_REVISION_NR_H__
3-
#define SD2_REVISION_NR "s2840"
3+
#define SD2_REVISION_NR "s2841"
44
#endif // __SD2_REVISION_NR_H__

0 commit comments

Comments
 (0)