summaryrefslogtreecommitdiff
path: root/src/being/localplayer.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2015-03-27 17:38:36 +0300
committerAndrei Karas <akaras@inbox.ru>2015-03-28 16:49:14 +0300
commita595f91e04f86c258861dff07c617fa2871edf7f (patch)
tree02c931cddc2e6f79227ea473201f2add848ce872 /src/being/localplayer.cpp
parentadb88538515a039c447643a73a73a32a59ac1214 (diff)
downloadmanaplus-a595f91e04f86c258861dff07c617fa2871edf7f.tar.gz
manaplus-a595f91e04f86c258861dff07c617fa2871edf7f.tar.bz2
manaplus-a595f91e04f86c258861dff07c617fa2871edf7f.tar.xz
manaplus-a595f91e04f86c258861dff07c617fa2871edf7f.zip
Impliment packet SMSG_PLAYER_HEAL.
Diffstat (limited to 'src/being/localplayer.cpp')
-rw-r--r--src/being/localplayer.cpp18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp
index 9da05d898..dd06b87a1 100644
--- a/src/being/localplayer.cpp
+++ b/src/being/localplayer.cpp
@@ -1094,6 +1094,24 @@ void LocalPlayer::addXpMessage(const int change)
}
}
+void LocalPlayer::addHpMessage(const int change)
+{
+ if (change != 0 && mMessages.size() < 20)
+ {
+ // TRANSLATORS: get hp message
+ addMessageToQueue(strprintf("%d %s", change, _("hp")));
+ }
+}
+
+void LocalPlayer::addSpMessage(const int change)
+{
+ if (change != 0 && mMessages.size() < 20)
+ {
+ // TRANSLATORS: get hp message
+ addMessageToQueue(strprintf("%d %s", change, _("mana")));
+ }
+}
+
void LocalPlayer::statChanged(const int id,
const int oldVal1,
const int oldVal2)