From a595f91e04f86c258861dff07c617fa2871edf7f Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Fri, 27 Mar 2015 17:38:36 +0300 Subject: Impliment packet SMSG_PLAYER_HEAL. --- src/being/localplayer.cpp | 18 ++++++++++++++++++ src/being/localplayer.h | 4 ++++ 2 files changed, 22 insertions(+) (limited to 'src/being') 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) diff --git a/src/being/localplayer.h b/src/being/localplayer.h index a0865baa9..02c092f69 100644 --- a/src/being/localplayer.h +++ b/src/being/localplayer.h @@ -370,6 +370,10 @@ class LocalPlayer final : public Being, void addJobMessage(const int change); + void addHpMessage(const int change); + + void addSpMessage(const int change); + static bool checAttackPermissions(const Being *const target) A_WARN_UNUSED; -- cgit v1.2.3-70-g09d2