Skip to content

Commit

Permalink
fix(Scripts/Raids): some corrections to Broodlord Supression Room: (#…
Browse files Browse the repository at this point in the history
…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
  • Loading branch information
UltraNix committed Mar 3, 2022
1 parent d682398 commit e4d3f57
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 20 deletions.
4 changes: 3 additions & 1 deletion src/server/game/Spells/SpellEffects.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions src/server/game/Spells/SpellInfoCorrections.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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];
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,7 @@ enum Events

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

class boss_broodlord : public CreatureScript
Expand All @@ -76,16 +75,6 @@ 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 @@ -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]];
Expand Down Expand Up @@ -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);
Expand Down

0 comments on commit e4d3f57

Please sign in to comment.