Browse Source

small fixes

Laserlicht 1 year ago
parent
commit
5b8b75da22

+ 1 - 2
Mods/vcmi/config/vcmi/english.json

@@ -132,6 +132,7 @@
 	"vcmi.lobby.pvp.randomTown.help" : "Write a random city in the chat",
 	"vcmi.lobby.pvp.randomTownVs.hover" : "Random town vs.",
 	"vcmi.lobby.pvp.randomTownVs.help" : "Write two random cities in the chat",
+	"vcmi.lobby.pvp.versus" : "vs.",
 
 	"vcmi.client.errors.invalidMap" : "{Invalid map or campaign}\n\nFailed to start game! Selected map or campaign might be invalid or corrupted. Reason:\n%s",
 	"vcmi.client.errors.missingCampaigns" : "{Missing data files}\n\nCampaigns data files were not found! You may be using incomplete or corrupted Heroes 3 data files. Please reinstall game data.",
@@ -260,8 +261,6 @@
 
 	"vcmi.battleResultsWindow.applyResultsLabel" : "Accept battle result?",
 
-	"vcmi.chat.versus" : "vs.",
-
 	"vcmi.tutorialWindow.title" : "Touchscreen Introduction",
 	"vcmi.tutorialWindow.decription.RightClick" : "Touch and hold the element on which you want to right-click. Touch the free area to close.",
 	"vcmi.tutorialWindow.decription.MapPanning" : "Touch and drag with one finger to move the map.",

+ 2 - 0
client/lobby/CSelectionBase.cpp

@@ -488,6 +488,8 @@ void FactionSelector::updateListItems()
 			auto getImageIndex = [](FactionID factionID, bool enabled){ return (*CGI->townh)[factionID]->town->clientInfo.icons[true][!enabled] + 2; }; 
 			towns[factionID] = std::make_shared<CAnimImage>(AnimationPath::builtin("ITPA"), getImageIndex(factionID, townsEnabled[factionID]), 0, x_offset + 48 * x, 32 * (y - line));
 			townsArea[factionID] = std::make_shared<LRClickableArea>(Rect(x_offset + 48 * x, 32 * (y - line), 48, 32), [this, getImageIndex, factionID](){
+				if(CSH->isGuest())
+					return;
 				townsEnabled[factionID] = !townsEnabled[factionID];
 				towns[factionID]->setFrame(getImageIndex(factionID, townsEnabled[factionID]));
 				redraw();

+ 1 - 1
server/NetPacksLobbyServer.cpp

@@ -397,7 +397,7 @@ void ApplyOnServerNetPackVisitor::visitLobbyPvPAction(LobbyPvPAction & pack)
 			break;
 		case LobbyPvPAction::RANDOM_TOWN_VS:
 			if(allowedTowns.size())
-				srv.announceTxt("~~core.overview.3~~ - ~~" + VLC->townh->getById(randomFaction1[0])->getNameTextID() + "~~ ~~vcmi.chat.versus~~ ~~" + VLC->townh->getById(randomFaction2[0])->getNameTextID() + "~~");
+				srv.announceTxt("~~core.overview.3~~ - ~~" + VLC->townh->getById(randomFaction1[0])->getNameTextID() + "~~ ~~vcmi.lobby.pvp.versus~~ ~~" + VLC->townh->getById(randomFaction2[0])->getNameTextID() + "~~");
 			break;
 	}
 	result = true;