42
42
SPELL_SUMMON_OURO_MOUND = 26058 , // summons 5 dirt mounds
43
43
SPELL_SUMMON_TRIGGER = 26284 ,
44
44
45
- SPELL_SUMMON_OURO = 26642 ,
45
+ // SPELL_SUMMON_OURO_TRIGG = 26642,
46
+ SPELL_SUMMON_OURO = 26061 , // used by the script to summon the boss directly
46
47
SPELL_QUAKE = 26093 ,
47
48
48
49
// other spells - not used
@@ -266,16 +267,13 @@ struct npc_ouro_spawnerAI : public Scripted_NoMovementAI
266
267
m_bHasSummoned = false ;
267
268
}
268
269
269
- void MoveInLineOfSight (Unit* pWho) override
270
+ void Aggro (Unit* /* pWho*/ ) override
270
271
{
271
- // Spawn Ouro on LoS check
272
- if (!m_bHasSummoned && pWho->GetTypeId () == TYPEID_PLAYER && !((Player*)pWho)->isGameMaster () && m_creature->IsWithinDistInMap (pWho, 50 .0f ))
272
+ if (!m_bHasSummoned)
273
273
{
274
- if ( DoCastSpellIfCan (m_creature, SPELL_SUMMON_OURO) == CAST_OK)
275
- m_bHasSummoned = true ;
274
+ DoCastSpellIfCan (m_creature, SPELL_SUMMON_OURO, CAST_TRIGGERED);
275
+ m_bHasSummoned = true ;
276
276
}
277
-
278
- ScriptedAI::MoveInLineOfSight (pWho);
279
277
}
280
278
281
279
void JustSummoned (Creature* pSummoned) override
@@ -291,16 +289,14 @@ struct npc_ouro_spawnerAI : public Scripted_NoMovementAI
291
289
292
290
void UpdateAI (const uint32 uiDiff) override
293
291
{
294
- if (m_bHasSummoned)
292
+ // triggered by missing spell 26092
293
+ if (m_uiQuakeTimer < uiDiff)
295
294
{
296
- if (m_uiQuakeTimer < uiDiff)
297
- {
298
- if (DoCastSpellIfCan (m_creature, SPELL_QUAKE) == CAST_OK)
299
- m_uiQuakeTimer = 1000 ;
300
- }
301
- else
302
- m_uiQuakeTimer -= uiDiff;
295
+ if (DoCastSpellIfCan (m_creature, SPELL_QUAKE) == CAST_OK)
296
+ m_uiQuakeTimer = 1000 ;
303
297
}
298
+ else
299
+ m_uiQuakeTimer -= uiDiff;
304
300
}
305
301
};
306
302
0 commit comments