@@ -51,7 +51,13 @@ struct npc_00x09hlAI : public npc_escortAI
51
51
{
52
52
npc_00x09hlAI (Creature* pCreature) : npc_escortAI(pCreature) { Reset (); }
53
53
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
+ }
55
61
56
62
void WaypointReached (uint32 uiPointId) override
57
63
{
@@ -76,24 +82,35 @@ struct npc_00x09hlAI : public npc_escortAI
76
82
switch (uiPointId)
77
83
{
78
84
case 27 :
85
+ if (m_uiSummonCount >= 3 )
86
+ break ;
87
+
79
88
for (uint8 i = 0 ; i < 3 ; ++i)
80
89
{
81
90
float fX , fY , fZ ;
82
91
m_creature->GetRandomPoint (147 .927444f , -3851 .513428f , 130 .893f , 7 .0f , fX , fY , fZ );
83
92
84
93
m_creature->SummonCreature (NPC_MARAUDING_OWL, fX , fY , fZ , 0 .0f , TEMPSUMMON_CORPSE_TIMED_DESPAWN, 25000 );
94
+ ++m_uiSummonCount;
85
95
}
86
96
break ;
87
97
case 44 :
98
+ if (m_uiSummonCount >= 6 )
99
+ break ;
100
+
88
101
for (uint8 i = 0 ; i < 3 ; ++i)
89
102
{
90
103
float fX , fY , fZ ;
91
104
m_creature->GetRandomPoint (-141 .151581f , -4291 .213867f , 120 .130f , 7 .0f , fX , fY , fZ );
92
105
93
106
m_creature->SummonCreature (NPC_VILE_AMBUSHER, fX , fY , fZ , 0 .0f , TEMPSUMMON_CORPSE_TIMED_DESPAWN, 25000 );
107
+ ++m_uiSummonCount;
94
108
}
95
109
break ;
96
110
}
111
+
112
+ // make sure we always have the right stand state
113
+ m_creature->SetStandState (UNIT_STAND_STATE_STAND);
97
114
}
98
115
99
116
void Aggro (Unit* pWho) override
0 commit comments