From e8128413d8dec8c342c2b1d58e9c8ee26caea899 Mon Sep 17 00:00:00 2001 From: blinkysc <37940565+blinkysc@users.noreply.github.com> Date: Thu, 23 Jan 2025 23:38:47 -0600 Subject: [PATCH] Update boss_janalai.cpp --- src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp index 2e356bbad74bf4..34866f0dba66d6 100644 --- a/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp +++ b/src/server/scripts/EasternKingdoms/ZulAman/boss_janalai.cpp @@ -301,10 +301,9 @@ struct boss_janalai : public BossAI float angle = float(rand()) / float(RAND_MAX) * 2.0f * M_PI; float radius = (static_cast(i) / static_cast(MAX_BOMB_COUNT)) * maxRadius; radius += frand(-2.0f, 2.0f); - float dx = radius * cos(angle); float dy = radius * sin(angle); - + me->m_Events.AddEventAtOffset([this, dx, dy] { DoSpawnCreature(NPC_FIRE_BOMB, dx, dy, 0, 0, TEMPSUMMON_TIMED_DESPAWN, 15000); }, spawnTimer); @@ -361,7 +360,6 @@ struct boss_janalai : public BossAI { std::chrono::milliseconds bombTimer = 0ms; const std::chrono::milliseconds throwDuration = 5000ms; - summons.DoForAllSummons([this, &bombTimer, throwDuration](WorldObject* summon) { if (summon->GetEntry() == NPC_FIRE_BOMB) { @@ -369,14 +367,12 @@ struct boss_janalai : public BossAI { // Calculate timing to spread throws over 5 seconds std::chrono::milliseconds throwTime = bombTimer % throwDuration; - bomb->m_Events.AddEventAtOffset([this, bomb] { bomb->RemoveUnitFlag(UNIT_FLAG_NOT_SELECTABLE); DoCast(bomb, SPELL_FIRE_BOMB_THROW, true); bomb->SetUnitFlag(UNIT_FLAG_NOT_SELECTABLE); }, throwTime); } - bombTimer += throwDuration / MAX_BOMB_COUNT; } });