From e4d3f57d7c4f8321393865b68f81f7bc0c7be384 Mon Sep 17 00:00:00 2001 From: UltraNix <80540499+UltraNix@users.noreply.github.com> Date: Thu, 3 Mar 2022 11:29:31 +0100 Subject: [PATCH] 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 --- src/server/game/Spells/SpellEffects.cpp | 4 +++- .../game/Spells/SpellInfoCorrections.cpp | 6 ++++++ .../boss_broodlord_lashlayer.cpp | 21 ++----------------- 3 files changed, 11 insertions(+), 20 deletions(-) diff --git a/src/server/game/Spells/SpellEffects.cpp b/src/server/game/Spells/SpellEffects.cpp index ead3d08f4..11292371f 100644 --- a/src/server/game/Spells/SpellEffects.cpp +++ b/src/server/game/Spells/SpellEffects.cpp @@ -2138,8 +2138,10 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex) else if (m_spellInfo->Id == 1842 && gameObjTarget->GetGOInfo()->type == GAMEOBJECT_TYPE_TRAP) { gameObjTarget->SetLootState(GO_JUST_DEACTIVATED); - if (!gameObjTarget->GetOwner()) // pussywizard + if (gameObjTarget->getLootState() == GO_JUST_DEACTIVATED && !gameObjTarget->GetOwner()) // pussywizard + { gameObjTarget->SetRespawnTime(gameObjTarget->GetGOInfo()->GetAutoCloseTime() / IN_MILLISECONDS/*xinef*/); + } return; } // TODO: Add script for spell 41920 - Filling, becouse server it freze when use this spell diff --git a/src/server/game/Spells/SpellInfoCorrections.cpp b/src/server/game/Spells/SpellInfoCorrections.cpp index 2e421d188..93ce85f5a 100644 --- a/src/server/game/Spells/SpellInfoCorrections.cpp +++ b/src/server/game/Spells/SpellInfoCorrections.cpp @@ -4204,6 +4204,12 @@ void SpellMgr::LoadSpellInfoCorrections() spellInfo->AttributesEx |= SPELL_ATTR1_EXCLUDE_CASTER; }); + // Suppression Aura + ApplySpellFix({ 22247 }, [](SpellInfo* spellInfo) + { + spellInfo->AttributesEx2 |= SPELL_ATTR2_IGNORE_LINE_OF_SIGHT; + }); + for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i) { SpellInfo* spellInfo = mSpellInfoMap[i]; diff --git a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp index 5a2d94fae..1152b769c 100644 --- a/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp +++ b/src/server/scripts/EasternKingdoms/BlackrockMountain/BlackwingLair/boss_broodlord_lashlayer.cpp @@ -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 _goList; - GetGameObjectListWithEntryInGrid(_goList, me, GO_SUPPRESSION_DEVICE, 200.0f); - for (std::list::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);