mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +00:00
fix(Scripts/TempleOfAhnQiraj): Ouro double spawn in 3rd phase, interrupt immunity (#13405)
This commit is contained in:
@@ -0,0 +1,2 @@
|
|||||||
|
--
|
||||||
|
UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|33554432 WHERE `entry` = 15517;
|
||||||
@@ -78,8 +78,15 @@ struct npc_ouro_spawner : public ScriptedAI
|
|||||||
// Spawn Ouro on LoS check
|
// Spawn Ouro on LoS check
|
||||||
if (!hasSummoned && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 40.0f) && !who->ToPlayer()->IsGameMaster())
|
if (!hasSummoned && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 40.0f) && !who->ToPlayer()->IsGameMaster())
|
||||||
{
|
{
|
||||||
DoCastSelf(SPELL_SUMMON_OURO);
|
if (InstanceScript* instance = me->GetInstanceScript())
|
||||||
hasSummoned = true;
|
{
|
||||||
|
Creature* ouro = instance->GetCreature(DATA_OURO);
|
||||||
|
if (instance->GetBossState(DATA_OURO) != IN_PROGRESS && !ouro)
|
||||||
|
{
|
||||||
|
DoCastSelf(SPELL_SUMMON_OURO);
|
||||||
|
hasSummoned = true;
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
ScriptedAI::MoveInLineOfSight(who);
|
ScriptedAI::MoveInLineOfSight(who);
|
||||||
@@ -129,7 +136,7 @@ struct boss_ouro : public BossAI
|
|||||||
|
|
||||||
void Submerge()
|
void Submerge()
|
||||||
{
|
{
|
||||||
if (_enraged)
|
if (_enraged || _submerged)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
me->AttackStop();
|
me->AttackStop();
|
||||||
@@ -209,6 +216,9 @@ struct boss_ouro : public BossAI
|
|||||||
})
|
})
|
||||||
.Schedule(3s, GROUP_PHASE_TRANSITION, [this](TaskContext context)
|
.Schedule(3s, GROUP_PHASE_TRANSITION, [this](TaskContext context)
|
||||||
{
|
{
|
||||||
|
if (_enraged)
|
||||||
|
return;
|
||||||
|
|
||||||
if (!IsPlayerWithinMeleeRange() && !_submerged)
|
if (!IsPlayerWithinMeleeRange() && !_submerged)
|
||||||
{
|
{
|
||||||
if (_submergeMelee < 10)
|
if (_submergeMelee < 10)
|
||||||
@@ -217,8 +227,7 @@ struct boss_ouro : public BossAI
|
|||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
if (!_enraged)
|
Submerge();
|
||||||
Submerge();
|
|
||||||
_submergeMelee = 0;
|
_submergeMelee = 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -30,6 +30,7 @@ ObjectData const creatureData[] =
|
|||||||
{ NPC_SARTURA, DATA_SARTURA },
|
{ NPC_SARTURA, DATA_SARTURA },
|
||||||
{ NPC_CTHUN, DATA_CTHUN },
|
{ NPC_CTHUN, DATA_CTHUN },
|
||||||
{ NPC_EYE_OF_CTHUN, DATA_EYE_OF_CTHUN },
|
{ NPC_EYE_OF_CTHUN, DATA_EYE_OF_CTHUN },
|
||||||
|
{ NPC_OURO, DATA_OURO },
|
||||||
{ NPC_OURO_SPAWNER, DATA_OURO_SPAWNER },
|
{ NPC_OURO_SPAWNER, DATA_OURO_SPAWNER },
|
||||||
{ NPC_MASTERS_EYE, DATA_MASTERS_EYE },
|
{ NPC_MASTERS_EYE, DATA_MASTERS_EYE },
|
||||||
{ NPC_VEKLOR, DATA_VEKLOR },
|
{ NPC_VEKLOR, DATA_VEKLOR },
|
||||||
|
|||||||
Reference in New Issue
Block a user