mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-27 15:46:24 +00:00
fix(Core/Misc): all GCC warnings (#3457)
This commit is contained in:
@@ -305,6 +305,7 @@ void BattlegroundMgr::BuildPvpLogDataPacket(WorldPacket* data, Battleground* bg)
|
||||
*data << uint32(0x00000002); // count of next fields
|
||||
*data << uint32(((BattlegroundICScore*)itr2->second)->BasesAssaulted); // bases asssulted
|
||||
*data << uint32(((BattlegroundICScore*)itr2->second)->BasesDefended); // bases defended
|
||||
[[fallthrough]]; // TODO: Not sure whether the fallthrough was a mistake (forgetting a break) or intended. This should be double-checked.
|
||||
default:
|
||||
if (BattlegroundMgr::getBgFromMap.find(bg->GetMapId()) != BattlegroundMgr::getBgFromMap.end())
|
||||
BattlegroundMgr::getBgFromMap[bg->GetMapId()](data, itr2);
|
||||
@@ -947,7 +948,7 @@ bool BattlegroundMgr::IsBGWeekend(BattlegroundTypeId bgTypeId)
|
||||
|
||||
BattlegroundTypeId BattlegroundMgr::GetRandomBG(BattlegroundTypeId bgTypeId)
|
||||
{
|
||||
if (CreateBattlegroundData const* bgTemplate = GetBattlegroundTemplateByTypeId(bgTypeId))
|
||||
if (GetBattlegroundTemplateByTypeId(bgTypeId))
|
||||
{
|
||||
std::vector<BattlegroundTypeId> ids;
|
||||
ids.reserve(16);
|
||||
|
||||
@@ -197,6 +197,7 @@ void BattlegroundAV::HandleQuestComplete(uint32 questid, Player* player)
|
||||
case AV_QUEST_A_BOSS1:
|
||||
case AV_QUEST_H_BOSS1:
|
||||
m_Team_QuestStatus[teamId][4] += 9; //you can turn in 10 or 1 item..
|
||||
[[fallthrough]];
|
||||
case AV_QUEST_A_BOSS2:
|
||||
case AV_QUEST_H_BOSS2:
|
||||
m_Team_QuestStatus[teamId][4]++;
|
||||
|
||||
@@ -813,16 +813,22 @@ bool BattlegroundSA::CanInteractWithObject(uint32 objectId)
|
||||
{
|
||||
case BG_SA_TITAN_RELIC:
|
||||
if (GateStatus[BG_SA_ANCIENT_GATE] != BG_SA_GATE_DESTROYED || GateStatus[BG_SA_YELLOW_GATE] != BG_SA_GATE_DESTROYED)
|
||||
{
|
||||
return false;
|
||||
// no break
|
||||
}
|
||||
[[fallthrough]];
|
||||
case BG_SA_CENTRAL_FLAG:
|
||||
if (GateStatus[BG_SA_RED_GATE] != BG_SA_GATE_DESTROYED && GateStatus[BG_SA_PURPLE_GATE] != BG_SA_GATE_DESTROYED)
|
||||
{
|
||||
return false;
|
||||
// no break
|
||||
}
|
||||
[[fallthrough]];
|
||||
case BG_SA_LEFT_FLAG:
|
||||
case BG_SA_RIGHT_FLAG:
|
||||
if (GateStatus[BG_SA_GREEN_GATE] != BG_SA_GATE_DESTROYED && GateStatus[BG_SA_BLUE_GATE] != BG_SA_GATE_DESTROYED)
|
||||
{
|
||||
return false;
|
||||
}
|
||||
break;
|
||||
default:
|
||||
ABORT();
|
||||
|
||||
Reference in New Issue
Block a user