Skip to content

Commit

Permalink
fix(Scripts/Hyjal): Workaround bosses getting stuck in progress (azer…
Browse files Browse the repository at this point in the history
  • Loading branch information
Nyeriah authored Jun 30, 2024
1 parent a4ad7a1 commit 8b81b1d
Showing 1 changed file with 15 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -405,7 +405,22 @@ class instance_hyjal : public InstanceMapScript
}

if (_bossWave != TO_BE_DECIDED)
{
DoUpdateWorldState(WORLD_STATE_WAVES, 0);
scheduler.Schedule(30s, [this](TaskContext context)
{
if (IsEncounterInProgress())
{
// Reset the instance if its empty.
// This is necessary because bosses get stuck fighting unreachable mobs.
// Remove this when we are sure pathing no longer causes this.
if (!instance->GetPlayersCountExceptGMs())
SetData(DATA_RESET_ALLIANCE, 0);
else
context.Repeat();
}
});
}

break;
case DATA_SPAWN_INFERNALS:
Expand Down Expand Up @@ -479,8 +494,6 @@ class instance_hyjal : public InstanceMapScript
break;
}

// LOG_DEBUG("scripts", "Instance Hyjal: Instance data updated for event {} (Data={})", type, data);

if (data == DONE)
{
SaveToDB();
Expand Down

0 comments on commit 8b81b1d

Please sign in to comment.