mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 10:30:27 +00:00
fix(Scripts/Ulduar): falling down Kologarn's pit should kill (#18945)
* add insersectboundary * add kill bunny to kologarn's pit * Update data/sql/updates/pending_db_world/rev_1716571588345702920.sql Co-authored-by: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com> * refactor: use Map DoForAllPlayers --------- Co-authored-by: Benjamin Jackson <38561765+heyitsbench@users.noreply.github.com>
This commit is contained in:
@@ -665,6 +665,37 @@ public:
|
||||
};
|
||||
};
|
||||
|
||||
struct boss_kologarn_pit_kill_bunny : public NullCreatureAI
|
||||
{
|
||||
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)
|
||||
{
|
||||
me->GetMap()->DoForAllPlayers([&](Player* player)
|
||||
{
|
||||
if (_boundaryIntersect->IsWithinBoundary(player->GetPosition()) && !player->IsGameMaster())
|
||||
{
|
||||
player->KillSelf(false);
|
||||
}
|
||||
});
|
||||
context.Repeat(1s);
|
||||
});
|
||||
}
|
||||
|
||||
void UpdateAI(uint32 diff) override
|
||||
{
|
||||
scheduler.Update(diff);
|
||||
}
|
||||
private:
|
||||
BoundaryIntersectBoundary const* _boundaryIntersect;
|
||||
};
|
||||
|
||||
// predicate function to select non main tank target
|
||||
class StoneGripTargetSelector
|
||||
{
|
||||
@@ -894,6 +925,7 @@ void AddSC_boss_kologarn()
|
||||
new boss_kologarn();
|
||||
new boss_kologarn_arms();
|
||||
new boss_kologarn_eyebeam();
|
||||
RegisterUlduarCreatureAI(boss_kologarn_pit_kill_bunny);
|
||||
|
||||
// Spells
|
||||
new spell_ulduar_stone_grip_cast_target();
|
||||
|
||||
Reference in New Issue
Block a user