mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-24 06:06:23 +00:00
refactor(Core): code cleanup (part 1) (#6361)
This commit is contained in:
@@ -624,21 +624,28 @@ void BattlegroundSA::EventPlayerDamagedGO(Player* /*player*/, GameObject* go, ui
|
||||
case BG_SA_BLUE_GATE:
|
||||
case BG_SA_GREEN_GATE:
|
||||
{
|
||||
GameObject* go = nullptr;
|
||||
if ((go = GetBGObject(BG_SA_RED_GATE)))
|
||||
go->SetDestructibleBuildingModifyState(true);
|
||||
if ((go = GetBGObject(BG_SA_PURPLE_GATE)))
|
||||
go->SetDestructibleBuildingModifyState(true);
|
||||
if (auto redGate = GetBGObject(BG_SA_RED_GATE))
|
||||
{
|
||||
redGate->SetDestructibleBuildingModifyState(true);
|
||||
}
|
||||
if (auto purpleGate = GetBGObject(BG_SA_PURPLE_GATE))
|
||||
{
|
||||
purpleGate->SetDestructibleBuildingModifyState(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
case BG_SA_RED_GATE:
|
||||
case BG_SA_PURPLE_GATE:
|
||||
if (GameObject* go = GetBGObject(BG_SA_YELLOW_GATE))
|
||||
go->SetDestructibleBuildingModifyState(true);
|
||||
if (auto yellowGate = GetBGObject(BG_SA_YELLOW_GATE))
|
||||
{
|
||||
yellowGate->SetDestructibleBuildingModifyState(true);
|
||||
}
|
||||
break;
|
||||
case BG_SA_YELLOW_GATE:
|
||||
if (GameObject* go = GetBGObject(BG_SA_ANCIENT_GATE))
|
||||
go->SetDestructibleBuildingModifyState(true);
|
||||
if (auto ancientGate = GetBGObject(BG_SA_ANCIENT_GATE))
|
||||
{
|
||||
ancientGate->SetDestructibleBuildingModifyState(true);
|
||||
}
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -876,7 +883,7 @@ void BattlegroundSA::EventPlayerClickedOnFlag(Player* Source, GameObject* gameOb
|
||||
break;
|
||||
default:
|
||||
return;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
|
||||
@@ -996,7 +1003,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
|
||||
default:
|
||||
ABORT();
|
||||
break;
|
||||
};
|
||||
}
|
||||
}
|
||||
|
||||
void BattlegroundSA::EventPlayerUsedGO(Player* Source, GameObject* object)
|
||||
|
||||
Reference in New Issue
Block a user