chore(Scripts/Ulduar): boss_kologarn_pit_kill_bunny (#24636)

Co-authored-by: Andrew <47818697+Nyeriah@users.noreply.github.com>
This commit is contained in:
sogladev
2026-02-22 15:00:03 +01:00
committed by GitHub
parent 7137295d69
commit f7ab757970

View File

@@ -669,25 +669,29 @@ class spell_kologarn_focused_eyebeam : public SpellScript
}
};
namespace pitKillBoundary {
static auto const boundaryIntersect = new BoundaryIntersectBoundary(
new RectangleBoundary(1782.0f, 1832.0f, -56.0f, 8.0f),
new ZRangeBoundary(400.0f, 439.0f)
);
}
struct boss_kologarn_pit_kill_bunny : public NullCreatureAI
{
boss_kologarn_pit_kill_bunny(Creature* creature) : NullCreatureAI(creature) { }
explicit boss_kologarn_pit_kill_bunny(Creature* creature) : NullCreatureAI(creature) { }
void Reset() override
{
RectangleBoundary* _boundaryXY = new RectangleBoundary(1782.0f, 1832.0f, -56.0f, 8.0f);
ZRangeBoundary* _boundaryZ = new ZRangeBoundary(400.0f, 439.0f);
_boundaryIntersect = new BoundaryIntersectBoundary(_boundaryXY, _boundaryZ);
scheduler.Schedule(0s, [this](TaskContext context)
scheduler.CancelAll();
scheduler.Schedule(0s,
[this](TaskContext context)
{
me->GetMap()->DoForAllPlayers([&](Player* player)
{
if (_boundaryIntersect->IsWithinBoundary(player->GetPosition()) && !player->IsGameMaster())
{
if (pitKillBoundary::boundaryIntersect->IsWithinBoundary(player->GetPosition()) && !player->IsGameMaster())
player->KillSelf(false);
}
});
context.Repeat(1s);
});
}
@@ -696,8 +700,6 @@ struct boss_kologarn_pit_kill_bunny : public NullCreatureAI
{
scheduler.Update(diff);
}
private:
BoundaryIntersectBoundary const* _boundaryIntersect;
};
// predicate function to select non main tank target