fix(Scripts/TempleOfAhnQiraj): Ouro double spawn in 3rd phase, interrupt immunity (#13405)

This commit is contained in:
Angelo Venturini
2022-10-14 16:28:30 -03:00
committed by GitHub
parent 2bc6a81457
commit 2c42682989
3 changed files with 17 additions and 5 deletions

View File

@@ -0,0 +1,2 @@
--
UPDATE `creature_template` SET `mechanic_immune_mask` = `mechanic_immune_mask`|33554432 WHERE `entry` = 15517;

View File

@@ -78,8 +78,15 @@ struct npc_ouro_spawner : public ScriptedAI
// Spawn Ouro on LoS check
if (!hasSummoned && who->GetTypeId() == TYPEID_PLAYER && me->IsWithinDistInMap(who, 40.0f) && !who->ToPlayer()->IsGameMaster())
{
DoCastSelf(SPELL_SUMMON_OURO);
hasSummoned = true;
if (InstanceScript* instance = me->GetInstanceScript())
{
Creature* ouro = instance->GetCreature(DATA_OURO);
if (instance->GetBossState(DATA_OURO) != IN_PROGRESS && !ouro)
{
DoCastSelf(SPELL_SUMMON_OURO);
hasSummoned = true;
}
}
}
ScriptedAI::MoveInLineOfSight(who);
@@ -129,7 +136,7 @@ struct boss_ouro : public BossAI
void Submerge()
{
if (_enraged)
if (_enraged || _submerged)
return;
me->AttackStop();
@@ -209,6 +216,9 @@ struct boss_ouro : public BossAI
})
.Schedule(3s, GROUP_PHASE_TRANSITION, [this](TaskContext context)
{
if (_enraged)
return;
if (!IsPlayerWithinMeleeRange() && !_submerged)
{
if (_submergeMelee < 10)
@@ -217,8 +227,7 @@ struct boss_ouro : public BossAI
}
else
{
if (!_enraged)
Submerge();
Submerge();
_submergeMelee = 0;
}
}

View File

@@ -30,6 +30,7 @@ ObjectData const creatureData[] =
{ NPC_SARTURA, DATA_SARTURA },
{ NPC_CTHUN, DATA_CTHUN },
{ NPC_EYE_OF_CTHUN, DATA_EYE_OF_CTHUN },
{ NPC_OURO, DATA_OURO },
{ NPC_OURO_SPAWNER, DATA_OURO_SPAWNER },
{ NPC_MASTERS_EYE, DATA_MASTERS_EYE },
{ NPC_VEKLOR, DATA_VEKLOR },