Skip to content

Commit e73cd17

Browse files
committed
[3149] Fix summoning event for Ouro - AQ40
Thanks to @Tobschinski for providing the data Close scriptdev2/scriptdev2-classic#46
1 parent 03c27ae commit e73cd17

File tree

2 files changed

+13
-17
lines changed

2 files changed

+13
-17
lines changed

scripts/kalimdor/temple_of_ahnqiraj/boss_ouro.cpp

+12-16
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,8 @@ enum
4242
SPELL_SUMMON_OURO_MOUND = 26058, // summons 5 dirt mounds
4343
SPELL_SUMMON_TRIGGER = 26284,
4444

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
4647
SPELL_QUAKE = 26093,
4748

4849
// other spells - not used
@@ -266,16 +267,13 @@ struct npc_ouro_spawnerAI : public Scripted_NoMovementAI
266267
m_bHasSummoned = false;
267268
}
268269

269-
void MoveInLineOfSight(Unit* pWho) override
270+
void Aggro(Unit* /*pWho*/) override
270271
{
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)
273273
{
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;
276276
}
277-
278-
ScriptedAI::MoveInLineOfSight(pWho);
279277
}
280278

281279
void JustSummoned(Creature* pSummoned) override
@@ -291,16 +289,14 @@ struct npc_ouro_spawnerAI : public Scripted_NoMovementAI
291289

292290
void UpdateAI(const uint32 uiDiff) override
293291
{
294-
if (m_bHasSummoned)
292+
// triggered by missing spell 26092
293+
if (m_uiQuakeTimer < uiDiff)
295294
{
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;
303297
}
298+
else
299+
m_uiQuakeTimer -= uiDiff;
304300
}
305301
};
306302

sd2_revision_nr.h

+1-1
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 "3148"
3+
#define SD2_REVISION_NR "3149"
44
#endif // __SD2_REVISION_NR_H__

0 commit comments

Comments
 (0)