summaryrefslogtreecommitdiff
path: root/src/gui/windows/charselectdialog.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-09-27 01:34:49 +0300
committerAndrei Karas <akaras@inbox.ru>2017-09-27 01:34:49 +0300
commit68a7dd225969fcdfb9c07b99db43756a2b1dec7c (patch)
tree644c14f9b178a968a53e742fb5f37aaf29fc062d /src/gui/windows/charselectdialog.cpp
parentd3f3ec92d583fcaecccb500c8940f33d7228ff89 (diff)
downloadmanaverse-68a7dd225969fcdfb9c07b99db43756a2b1dec7c.tar.gz
manaverse-68a7dd225969fcdfb9c07b99db43756a2b1dec7c.tar.bz2
manaverse-68a7dd225969fcdfb9c07b99db43756a2b1dec7c.tar.xz
manaverse-68a7dd225969fcdfb9c07b99db43756a2b1dec7c.zip
Change attributes value type to int64.
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,