mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-16 18:40:28 +00:00
fix(Scripts/Raids): some corrections to Broodlord Supression Room: (#10834)
Supression traps should always hit players. Supression traps should not be disarmed after Broodlord defeat. Supression traps should be visible after disarm. Fixes #10768
This commit is contained in:
@@ -51,8 +51,7 @@ enum Events
|
||||
|
||||
enum Actions
|
||||
{
|
||||
ACTION_DEACTIVATE = 0,
|
||||
ACTION_DISARMED = 1
|
||||
ACTION_DISARMED = 0
|
||||
};
|
||||
|
||||
class boss_broodlord : public CreatureScript
|
||||
@@ -76,16 +75,6 @@ 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())
|
||||
@@ -145,7 +134,6 @@ class go_suppression_device : public GameObjectScript
|
||||
{
|
||||
switch (state)
|
||||
{
|
||||
|
||||
case GO_JUST_DEACTIVATED: // This case prevents the Gameobject despawn by Disarm Trap
|
||||
go->SetLootState(GO_READY);
|
||||
[[fallthrough]];
|
||||
@@ -195,12 +183,7 @@ class go_suppression_device : public GameObjectScript
|
||||
|
||||
void DoAction(int32 action) override
|
||||
{
|
||||
if (action == ACTION_DEACTIVATE)
|
||||
{
|
||||
Deactivate();
|
||||
_events.CancelEvent(EVENT_SUPPRESSION_RESET);
|
||||
}
|
||||
else if (action == ACTION_DISARMED)
|
||||
if (action == ACTION_DISARMED)
|
||||
{
|
||||
Deactivate();
|
||||
_events.CancelEvent(EVENT_SUPPRESSION_CAST);
|
||||
|
||||
Reference in New Issue
Block a user