mirror of
https://github.com/liyunfan1223/azerothcore-wotlk.git
synced 2026-08-08 15:58:04 +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:
@@ -2138,8 +2138,10 @@ void Spell::EffectOpenLock(SpellEffIndex effIndex)
|
|||||||
else if (m_spellInfo->Id == 1842 && gameObjTarget->GetGOInfo()->type == GAMEOBJECT_TYPE_TRAP)
|
else if (m_spellInfo->Id == 1842 && gameObjTarget->GetGOInfo()->type == GAMEOBJECT_TYPE_TRAP)
|
||||||
{
|
{
|
||||||
gameObjTarget->SetLootState(GO_JUST_DEACTIVATED);
|
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*/);
|
gameObjTarget->SetRespawnTime(gameObjTarget->GetGOInfo()->GetAutoCloseTime() / IN_MILLISECONDS/*xinef*/);
|
||||||
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
// TODO: Add script for spell 41920 - Filling, becouse server it freze when use this spell
|
// TODO: Add script for spell 41920 - Filling, becouse server it freze when use this spell
|
||||||
|
|||||||
@@ -4204,6 +4204,12 @@ void SpellMgr::LoadSpellInfoCorrections()
|
|||||||
spellInfo->AttributesEx |= SPELL_ATTR1_EXCLUDE_CASTER;
|
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)
|
for (uint32 i = 0; i < GetSpellInfoStoreSize(); ++i)
|
||||||
{
|
{
|
||||||
SpellInfo* spellInfo = mSpellInfoMap[i];
|
SpellInfo* spellInfo = mSpellInfoMap[i];
|
||||||
|
|||||||
@@ -51,8 +51,7 @@ enum Events
|
|||||||
|
|
||||||
enum Actions
|
enum Actions
|
||||||
{
|
{
|
||||||
ACTION_DEACTIVATE = 0,
|
ACTION_DISARMED = 0
|
||||||
ACTION_DISARMED = 1
|
|
||||||
};
|
};
|
||||||
|
|
||||||
class boss_broodlord : public CreatureScript
|
class boss_broodlord : public CreatureScript
|
||||||
@@ -76,16 +75,6 @@ public:
|
|||||||
events.ScheduleEvent(EVENT_CHECK, 1000);
|
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
|
void UpdateAI(uint32 diff) override
|
||||||
{
|
{
|
||||||
if (!UpdateVictim())
|
if (!UpdateVictim())
|
||||||
@@ -145,7 +134,6 @@ class go_suppression_device : public GameObjectScript
|
|||||||
{
|
{
|
||||||
switch (state)
|
switch (state)
|
||||||
{
|
{
|
||||||
|
|
||||||
case GO_JUST_DEACTIVATED: // This case prevents the Gameobject despawn by Disarm Trap
|
case GO_JUST_DEACTIVATED: // This case prevents the Gameobject despawn by Disarm Trap
|
||||||
go->SetLootState(GO_READY);
|
go->SetLootState(GO_READY);
|
||||||
[[fallthrough]];
|
[[fallthrough]];
|
||||||
@@ -195,12 +183,7 @@ class go_suppression_device : public GameObjectScript
|
|||||||
|
|
||||||
void DoAction(int32 action) override
|
void DoAction(int32 action) override
|
||||||
{
|
{
|
||||||
if (action == ACTION_DEACTIVATE)
|
if (action == ACTION_DISARMED)
|
||||||
{
|
|
||||||
Deactivate();
|
|
||||||
_events.CancelEvent(EVENT_SUPPRESSION_RESET);
|
|
||||||
}
|
|
||||||
else if (action == ACTION_DISARMED)
|
|
||||||
{
|
{
|
||||||
Deactivate();
|
Deactivate();
|
||||||
_events.CancelEvent(EVENT_SUPPRESSION_CAST);
|
_events.CancelEvent(EVENT_SUPPRESSION_CAST);
|
||||||
|
|||||||
Reference in New Issue
Block a user