fix(Scripts/Hyjal): Workaround bosses getting stuck in progress (#19231)
This commit is contained in:
@@ -405,7 +405,22 @@ public:
|
|||||||
}
|
}
|
||||||
|
|
||||||
if (_bossWave != TO_BE_DECIDED)
|
if (_bossWave != TO_BE_DECIDED)
|
||||||
|
{
|
||||||
DoUpdateWorldState(WORLD_STATE_WAVES, 0);
|
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;
|
break;
|
||||||
case DATA_SPAWN_INFERNALS:
|
case DATA_SPAWN_INFERNALS:
|
||||||
@@ -479,8 +494,6 @@ public:
|
|||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
// LOG_DEBUG("scripts", "Instance Hyjal: Instance data updated for event {} (Data={})", type, data);
|
|
||||||
|
|
||||||
if (data == DONE)
|
if (data == DONE)
|
||||||
{
|
{
|
||||||
SaveToDB();
|
SaveToDB();
|
||||||
|
|||||||
Reference in New Issue
Block a user