1
0
mirror of https://github.com/vcmi/vcmi.git synced 2025-11-23 22:37:55 +02:00

Fix issues detected by Sonar

This commit is contained in:
Ivan Savenko
2025-05-05 16:05:59 +03:00
parent cb5295b9ec
commit 4b30336d03
37 changed files with 94 additions and 114 deletions

View File

@@ -382,7 +382,7 @@ void ApplyOnServerNetPackVisitor::visitLobbyPvPAction(LobbyPvPAction & pack)
switch(pack.action) {
case LobbyPvPAction::COIN:
txt.appendTextID("vcmi.lobby.pvp.coin.hover");
txt.appendRawString(" - " + std::to_string(std::rand()%2));
txt.appendRawString(" - " + std::to_string(srv.gh->getRandomGenerator().nextInt(1)));
srv.announceTxt(txt);
break;
case LobbyPvPAction::RANDOM_TOWN: