chore(Scripts/Ulduar): boss_kologarn_pit_kill_bunny (#24636)
Co-authored-by: Andrew <47818697+Nyeriah@users.noreply.github.com>
This commit is contained in:
@@ -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
|
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
|
void Reset() override
|
||||||
{
|
{
|
||||||
RectangleBoundary* _boundaryXY = new RectangleBoundary(1782.0f, 1832.0f, -56.0f, 8.0f);
|
scheduler.CancelAll();
|
||||||
ZRangeBoundary* _boundaryZ = new ZRangeBoundary(400.0f, 439.0f);
|
scheduler.Schedule(0s,
|
||||||
_boundaryIntersect = new BoundaryIntersectBoundary(_boundaryXY, _boundaryZ);
|
[this](TaskContext context)
|
||||||
|
|
||||||
scheduler.Schedule(0s, [this](TaskContext context)
|
|
||||||
{
|
{
|
||||||
me->GetMap()->DoForAllPlayers([&](Player* player)
|
me->GetMap()->DoForAllPlayers([&](Player* player)
|
||||||
{
|
{
|
||||||
if (_boundaryIntersect->IsWithinBoundary(player->GetPosition()) && !player->IsGameMaster())
|
if (pitKillBoundary::boundaryIntersect->IsWithinBoundary(player->GetPosition()) && !player->IsGameMaster())
|
||||||
{
|
|
||||||
player->KillSelf(false);
|
player->KillSelf(false);
|
||||||
}
|
|
||||||
});
|
});
|
||||||
|
|
||||||
context.Repeat(1s);
|
context.Repeat(1s);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
@@ -696,8 +700,6 @@ struct boss_kologarn_pit_kill_bunny : public NullCreatureAI
|
|||||||
{
|
{
|
||||||
scheduler.Update(diff);
|
scheduler.Update(diff);
|
||||||
}
|
}
|
||||||
private:
|
|
||||||
BoundaryIntersectBoundary const* _boundaryIntersect;
|
|
||||||
};
|
};
|
||||||
|
|
||||||
// predicate function to select non main tank target
|
// predicate function to select non main tank target
|
||||||
|
|||||||
Reference in New Issue
Block a user