Fix server crash when bots apply strategies on a custom naxx raid (#1052)

This commit is contained in:
valsan-azerty-boi
2025-03-04 20:35:36 +01:00
committed by GitHub
parent bf22f20997
commit a4fe45afbb
3 changed files with 31 additions and 4 deletions

View File

@@ -41,8 +41,11 @@ float HeiganDanceMultiplier::GetValue(Action* action)
{
return 1.0f;
}
auto* boss_ai = dynamic_cast<Heigan::boss_heigan::boss_heiganAI*>(boss->GetAI());
if (!boss_ai || boss_ai->events.Empty())
{
return 1.0f;
}
EventMap* eventMap = &boss_ai->events;
uint32 curr_phase = boss_ai->currentPhase;
uint32 curr_dance = eventMap->GetNextEventTime(4);