summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/beinghandler.cpp32
-rw-r--r--src/net/eathena/beinghandler.h2
2 files changed, 31 insertions, 3 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index be7899830..bc5987f1c 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -237,10 +237,13 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
break;
case SMSG_BEING_STATUS_CHANGE:
- case SMSG_BEING_STATUS_CHANGE2:
processBeingStatusChange(msg);
break;
+ case SMSG_BEING_STATUS_CHANGE2:
+ processBeingStatusChange2(msg);
+ break;
+
case SMSG_SKILL_CASTING:
processSkillCasting(msg);
break;
@@ -1040,8 +1043,31 @@ void BeingHandler::processBeingStatusChange(Net::MessageIn &msg)
const uint16_t status = msg.readInt16("status");
const int id = msg.readInt32("being id");
const bool flag = msg.readUInt8("flag: 0: stop, 1: start");
- if (status1)
- msg.readInt32("total");
+ msg.readInt32("total");
+ msg.readInt32("left");
+ msg.readInt32("val1");
+ msg.readInt32("val2");
+ msg.readInt32("val3");
+
+ Being *const dstBeing = actorManager->findBeing(id);
+ if (dstBeing)
+ dstBeing->setStatusEffect(status, flag);
+ BLOCK_END("BeingHandler::processBeingStatusChange")
+}
+
+void BeingHandler::processBeingStatusChange2(Net::MessageIn &msg)
+{
+ BLOCK_START("BeingHandler::processBeingStatusChange")
+ if (!actorManager)
+ {
+ BLOCK_END("BeingHandler::processBeingStatusChange")
+ return;
+ }
+
+ // Status change
+ const uint16_t status = msg.readInt16("status");
+ const int id = msg.readInt32("being id");
+ const bool flag = msg.readUInt8("flag: 0: stop, 1: start");
msg.readInt32("left");
msg.readInt32("val1");
msg.readInt32("val2");
diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h
index 9c0d0b920..b4520c201 100644
--- a/src/net/eathena/beinghandler.h
+++ b/src/net/eathena/beinghandler.h
@@ -67,6 +67,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
static void processBeingStatusChange(Net::MessageIn &msg);
+ static void processBeingStatusChange2(Net::MessageIn &msg);
+
static void processBeingMove2(Net::MessageIn &msg);
static void processBeingAction2(Net::MessageIn &msg);