summaryrefslogtreecommitdiff
path: root/src/net/eathena
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/net/eathena
parentadb88538515a039c447643a73a73a32a59ac1214 (diff)
downloadmanaverse-a595f91e04f86c258861dff07c617fa2871edf7f.tar.gz
manaverse-a595f91e04f86c258861dff07c617fa2871edf7f.tar.bz2
manaverse-a595f91e04f86c258861dff07c617fa2871edf7f.tar.xz
manaverse-a595f91e04f86c258861dff07c617fa2871edf7f.zip
Impliment packet SMSG_PLAYER_HEAL.
Diffstat (limited to 'src/net/eathena')
-rw-r--r--src/net/eathena/playerhandler.cpp15
1 files changed, 9 insertions, 6 deletions
diff --git a/src/net/eathena/playerhandler.cpp b/src/net/eathena/playerhandler.cpp
index c2f3e7ee1..23990ee2d 100644
--- a/src/net/eathena/playerhandler.cpp
+++ b/src/net/eathena/playerhandler.cpp
@@ -545,12 +545,15 @@ void PlayerHandler::setViewEquipment(const bool allow) const
void PlayerHandler::processPlayerHeal(Net::MessageIn &msg)
{
- UNIMPLIMENTEDPACKET;
- // +++ probably need show effect or adjust hp/sp?
- // 5 - hp
- // 7 - sp
- msg.readInt16("var id");
- msg.readInt16("value");
+ if (!localPlayer)
+ return;
+
+ const int type = msg.readInt16("var id");
+ const int amount = msg.readInt16("value");
+ if (type == 5)
+ localPlayer->addHpMessage(amount);
+ else if (type == 7)
+ localPlayer->addSpMessage(amount);
}
void PlayerHandler::processPlayerSkillMessage(Net::MessageIn &msg)