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/net/eathena/playerhandler.cpp | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) (limited to 'src/net/eathena/playerhandler.cpp') 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) -- cgit v1.2.3-70-g09d2