summaryrefslogtreecommitdiff
path: root/src/gui/windows/charselectdialog.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/gui/windows/charselectdialog.cpp')
-rw-r--r--src/gui/windows/charselectdialog.cpp8
1 files changed, 5 insertions, 3 deletions
diff --git a/src/gui/windows/charselectdialog.cpp b/src/gui/windows/charselectdialog.cpp
index c44464de1..d7ba2ea83 100644
--- a/src/gui/windows/charselectdialog.cpp
+++ b/src/gui/windows/charselectdialog.cpp
@@ -48,6 +48,7 @@
#include "net/net.h"
#include "net/serverfeatures.h"
+#include "utils/cast.h"
#include "utils/foreach.h"
#include "resources/db/unitsdb.h"
@@ -241,10 +242,12 @@ void CharSelectDialog::action(const ActionEvent &event)
if (data == nullptr)
return;
+ const std::string strExp = toString(CAST_U64(
+ character->data.mAttributes[Attributes::PLAYER_EXP]));
const std::string msg = strprintf(
// TRANSLATORS: char select dialog. player info message.
_("Hp: %u/%u\nMp: %u/%u\nLevel: %u\n"
- "Experience: %u\nMoney: %s"),
+ "Experience: %s\nMoney: %s"),
CAST_U32(
character->data.mAttributes[Attributes::PLAYER_HP]),
CAST_U32(
@@ -255,8 +258,7 @@ void CharSelectDialog::action(const ActionEvent &event)
character->data.mAttributes[Attributes::PLAYER_MAX_MP]),
CAST_U32(
character->data.mAttributes[Attributes::PLAYER_LEVEL]),
- CAST_U32(
- character->data.mAttributes[Attributes::PLAYER_EXP]),
+ strExp.c_str(),
UnitsDb::formatCurrency(
character->data.mAttributes[Attributes::MONEY]).c_str());
CREATEWIDGET(OkDialog, data->getName(), msg,