Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(Scripts/Blackwing Lair): Supression traps should not be disarmed … #11082

Merged
merged 4 commits into from
Mar 27, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,8 @@ enum Events

enum Actions
{
ACTION_DISARMED = 0
ACTION_DEACTIVATE = 0,
ACTION_DISARMED = 1
};

class boss_broodlord : public CreatureScript
Expand All @@ -75,6 +76,18 @@ class boss_broodlord : public CreatureScript
events.ScheduleEvent(EVENT_CHECK, 1000);
}

void JustDied(Unit* /*killer*/) override
{
_JustDied();

std::list<GameObject*> _goList;
GetGameObjectListWithEntryInGrid(_goList, me, GO_SUPPRESSION_DEVICE, 200.0f);
for (std::list<GameObject*>::const_iterator itr = _goList.begin(); itr != _goList.end(); itr++)
{
((*itr)->AI()->DoAction(ACTION_DEACTIVATE));
}
}

void UpdateAI(uint32 diff) override
{
if (!UpdateVictim())
Expand Down Expand Up @@ -183,11 +196,19 @@ class go_suppression_device : public GameObjectScript

void DoAction(int32 action) override
{
if (action == ACTION_DISARMED)
if (action == ACTION_DEACTIVATE)
{
_events.CancelEvent(EVENT_SUPPRESSION_RESET);
}
else if (action == ACTION_DISARMED)
{
Deactivate();
_events.CancelEvent(EVENT_SUPPRESSION_CAST);
_events.ScheduleEvent(EVENT_SUPPRESSION_RESET, urand(30000, 120000));

if (_instance->GetBossState(DATA_BROODLORD_LASHLAYER) != DONE)
{
_events.ScheduleEvent(EVENT_SUPPRESSION_RESET, urand(30000, 120000));
}
}
}

Expand Down