mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-19 03:45:43 +00:00
fix(Scripts/Blackwing Lair): Supression traps should not be disarmed... (#11082)
…after Broodlord defeat.
This commit is contained in:
@@ -51,7 +51,8 @@ enum Events
|
||||
|
||||
enum Actions
|
||||
{
|
||||
ACTION_DISARMED = 0
|
||||
ACTION_DEACTIVATE = 0,
|
||||
ACTION_DISARMED = 1
|
||||
};
|
||||
|
||||
class boss_broodlord : public CreatureScript
|
||||
@@ -75,6 +76,18 @@ public:
|
||||
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())
|
||||
@@ -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));
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user