From 6825a29f2e42fc16b72b62b148fc616e59418b19 Mon Sep 17 00:00:00 2001 From: trickerer Date: Tue, 27 Feb 2024 09:03:18 +0700 Subject: [PATCH] NPCBots: Fix MSVC 5054 warnings --- src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp | 6 +++--- src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp index 6e71fef381870..64dc668677569 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAB.cpp @@ -610,7 +610,7 @@ void BattlegroundAB::EventBotClickedOnFlag(Creature* bot, GameObject* /*target_o { UpdateBotScore(bot, SCORE_BASES_ASSAULTED, 1); m_prevNodes[node] = m_Nodes[node]; - m_Nodes[node] = teamIndex + BG_AB_NODE_TYPE_CONTESTED; + m_Nodes[node] = uint8(teamIndex) + BG_AB_NODE_TYPE_CONTESTED; // burn current contested banner _DelBanner(node, BG_AB_NODE_TYPE_CONTESTED, !teamIndex); // create new contested banner @@ -628,7 +628,7 @@ void BattlegroundAB::EventBotClickedOnFlag(Creature* bot, GameObject* /*target_o { UpdateBotScore(bot, SCORE_BASES_DEFENDED, 1); m_prevNodes[node] = m_Nodes[node]; - m_Nodes[node] = teamIndex + BG_AB_NODE_TYPE_OCCUPIED; + m_Nodes[node] = uint8(teamIndex) + BG_AB_NODE_TYPE_OCCUPIED; // burn current contested banner _DelBanner(node, BG_AB_NODE_TYPE_CONTESTED, !teamIndex); // create new occupied banner @@ -649,7 +649,7 @@ void BattlegroundAB::EventBotClickedOnFlag(Creature* bot, GameObject* /*target_o { UpdateBotScore(bot, SCORE_BASES_ASSAULTED, 1); m_prevNodes[node] = m_Nodes[node]; - m_Nodes[node] = teamIndex + BG_AB_NODE_TYPE_CONTESTED; + m_Nodes[node] = uint8(teamIndex) + BG_AB_NODE_TYPE_CONTESTED; // burn current occupied banner _DelBanner(node, BG_AB_NODE_TYPE_OCCUPIED, !teamIndex); // create new contested banner diff --git a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp index 39750e5122488..564bb8680761f 100644 --- a/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp +++ b/src/server/game/Battlegrounds/Zones/BattlegroundAV.cpp @@ -1135,8 +1135,8 @@ void BattlegroundAV::EventBotDefendsPoint(Creature* bot, uint32 object) if (!IsTower(node)) { - SpawnBGObject(BG_AV_OBJECT_AURA_N_FIRSTAID_STATION+3*node, RESPAWN_ONE_DAY); - SpawnBGObject(BG_AV_OBJECT_AURA_A_FIRSTAID_STATION+GetTeamIndexByTeamId(team)+3*node, RESPAWN_IMMEDIATELY); + SpawnBGObject(BG_AV_OBJECT_AURA_N_FIRSTAID_STATION + 3 * node, RESPAWN_ONE_DAY); + SpawnBGObject(BG_AV_OBJECT_AURA_A_FIRSTAID_STATION + uint32(GetTeamIndexByTeamId(team)) + 3 * node, RESPAWN_IMMEDIATELY); } // despawn old go SpawnBGObject(object, RESPAWN_ONE_DAY); @@ -1332,8 +1332,8 @@ void BattlegroundAV::EventBotAssaultsPoint(Creature* bot, uint32 object) else { //spawning/despawning of aura - SpawnBGObject(BG_AV_OBJECT_AURA_N_FIRSTAID_STATION+3*node, RESPAWN_IMMEDIATELY); //neutral aura spawn - SpawnBGObject(BG_AV_OBJECT_AURA_A_FIRSTAID_STATION+GetTeamIndexByTeamId(owner)+3*node, RESPAWN_ONE_DAY); //teeamaura despawn + SpawnBGObject(BG_AV_OBJECT_AURA_N_FIRSTAID_STATION + 3 * node, RESPAWN_IMMEDIATELY); //neutral aura spawn + SpawnBGObject(BG_AV_OBJECT_AURA_A_FIRSTAID_STATION + uint32(GetTeamIndexByTeamId(owner)) + 3 * node, RESPAWN_ONE_DAY); //teeamaura despawn RelocateDeadPlayers(BgCreatures[node]); }