mirror of
https://github.com/vcmi/vcmi.git
synced 2024-11-28 08:48:48 +02:00
Merge pull request #4616 from Laserlicht/show_level
show creature level
This commit is contained in:
commit
26aeb1dd48
@ -12,6 +12,7 @@
|
||||
"vcmi.adventureMap.monsterThreat.levels.9" : "Overpowering",
|
||||
"vcmi.adventureMap.monsterThreat.levels.10" : "Deadly",
|
||||
"vcmi.adventureMap.monsterThreat.levels.11" : "Impossible",
|
||||
"vcmi.adventureMap.monsterLevel" : "\n\nLevel %LEVEL %TOWN unit",
|
||||
|
||||
"vcmi.adventureMap.confirmRestartGame" : "Are you sure you want to restart the game?",
|
||||
"vcmi.adventureMap.noTownWithMarket" : "There are no available marketplaces!",
|
||||
|
@ -12,6 +12,7 @@
|
||||
"vcmi.adventureMap.monsterThreat.levels.9" : "Überwältigend",
|
||||
"vcmi.adventureMap.monsterThreat.levels.10" : "Tödlich",
|
||||
"vcmi.adventureMap.monsterThreat.levels.11" : "Unmöglich",
|
||||
"vcmi.adventureMap.monsterLevel" : "\n\nStufe %LEVEL %TOWN-Einheit",
|
||||
|
||||
"vcmi.adventureMap.confirmRestartGame" : "Seid Ihr sicher, dass Ihr das Spiel neu starten wollt?",
|
||||
"vcmi.adventureMap.noTownWithMarket" : "Kein Marktplatz verfügbar!",
|
||||
|
@ -22,6 +22,7 @@
|
||||
#include "../networkPacks/PacksForClientBattle.h"
|
||||
#include "../networkPacks/StackLocation.h"
|
||||
#include "../serializer/JsonSerializeFormat.h"
|
||||
#include "../entities/faction/CTownHandler.h"
|
||||
|
||||
#include <vstd/RNG.h>
|
||||
|
||||
@ -101,6 +102,11 @@ std::string CGCreature::getPopupText(const CGHeroInstance * hero) const
|
||||
|
||||
if (settings["general"]["enableUiEnhancements"].Bool())
|
||||
{
|
||||
std::string monsterLevel = VLC->generaltexth->translate("vcmi.adventureMap.monsterLevel");
|
||||
boost::replace_first(monsterLevel, "%TOWN", (*VLC->townh)[VLC->creatures()->getById(getCreature())->getFaction()]->getNameTranslated());
|
||||
boost::replace_first(monsterLevel, "%LEVEL", std::to_string(VLC->creatures()->getById(getCreature())->getLevel()));
|
||||
hoverName += monsterLevel;
|
||||
|
||||
hoverName += VLC->generaltexth->translate("vcmi.adventureMap.monsterThreat.title");
|
||||
|
||||
int choice;
|
||||
|
Loading…
Reference in New Issue
Block a user