fix(Core/Unit): -Wdeprecated-enum-enum-conversion warning (#6868)

This commit is contained in:
Francesco Borzì
2021-07-13 11:51:58 +02:00
committed by GitHub
parent 1fa51e5168
commit f73ef1cd5a
18 changed files with 77 additions and 87 deletions

View File

@@ -20,7 +20,7 @@ BattlegroundSA::BattlegroundSA()
StartMessageIds[BG_STARTING_EVENT_THIRD] = LANG_BG_SA_START_HALF_MINUTE;
StartMessageIds[BG_STARTING_EVENT_FOURTH] = LANG_BG_SA_HAS_BEGUN;
BgObjects.resize(BG_SA_MAXOBJ);
BgCreatures.resize(BG_SA_MAXNPC + BG_SA_MAX_GY);
BgCreatures.resize(static_cast<uint16>(BG_SA_MAXNPC) + BG_SA_MAX_GY);
TimerEnabled = false;
UpdateWaitTimer = 0;
SignaledRoundTwo = false;
@@ -85,7 +85,7 @@ bool BattlegroundSA::ResetObjs()
for (uint8 i = 0; i < BG_SA_MAXNPC; i++)
DelCreature(i);
for (uint8 i = BG_SA_MAXNPC; i < BG_SA_MAXNPC + BG_SA_MAX_GY; i++)
for (uint8 i = BG_SA_MAXNPC; i < static_cast<uint16>(BG_SA_MAXNPC) + BG_SA_MAX_GY; i++)
DelCreature(i);
for (uint8 i = 0; i < 6; ++i)
@@ -893,7 +893,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
GraveyardStatus[i] = Source->GetTeamId();
// Those who are waiting to resurrect at this node are taken to the closest own node's graveyard
GuidVector& ghost_list = m_ReviveQueue[BgCreatures[BG_SA_MAXNPC + i]];
GuidVector& ghost_list = m_ReviveQueue[BgCreatures[static_cast<uint16>(BG_SA_MAXNPC) + i]];
if (!ghost_list.empty())
{
GraveyardStruct const* ClosestGrave = nullptr;
@@ -914,7 +914,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
ghost_list.clear();
}
DelCreature(BG_SA_MAXNPC + i);
DelCreature(static_cast<uint16>(BG_SA_MAXNPC) + i);
GraveyardStruct const* sg = sGraveyard->GetGraveyard(BG_SA_GYEntries[i]);
if (!sg)
@@ -923,7 +923,7 @@ void BattlegroundSA::CaptureGraveyard(BG_SA_Graveyards i, Player* Source)
return;
}
AddSpiritGuide(i + BG_SA_MAXNPC, sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], GraveyardStatus[i]);
AddSpiritGuide(i + static_cast<uint16>(BG_SA_MAXNPC), sg->x, sg->y, sg->z, BG_SA_GYOrientation[i], GraveyardStatus[i]);
uint32 npc = 0;
uint32 flag = 0;