summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-01 22:44:49 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-01 22:44:49 +0300
commit7b89f203b208f885fa7a6f69ca656f1ca711ed42 (patch)
tree9b7bc88aa7499771872f427fe36b65d9312d9955
parent9aa0f34c4a6205590d7dbba6f0a65f91a4897ed0 (diff)
downloadmanaverse-7b89f203b208f885fa7a6f69ca656f1ca711ed42.tar.gz
manaverse-7b89f203b208f885fa7a6f69ca656f1ca711ed42.tar.bz2
manaverse-7b89f203b208f885fa7a6f69ca656f1ca711ed42.tar.xz
manaverse-7b89f203b208f885fa7a6f69ca656f1ca711ed42.zip
eathena: add packet SMSG_PLAYER_STATUS_CHANGE2 0x028a.
-rw-r--r--src/net/eathena/beinghandler.cpp25
-rw-r--r--src/net/eathena/beinghandler.h2
-rw-r--r--src/net/eathena/packets.h2
-rw-r--r--src/net/eathena/protocol.h1
4 files changed, 29 insertions, 1 deletions
diff --git a/src/net/eathena/beinghandler.cpp b/src/net/eathena/beinghandler.cpp
index f96fdd332..366bddf85 100644
--- a/src/net/eathena/beinghandler.cpp
+++ b/src/net/eathena/beinghandler.cpp
@@ -88,6 +88,7 @@ BeingHandler::BeingHandler(const bool enableSync) :
SMSG_PLAYER_STOP,
SMSG_PLAYER_MOVE_TO_ATTACK,
SMSG_PLAYER_STATUS_CHANGE,
+ SMSG_PLAYER_STATUS_CHANGE2,
SMSG_PLAYER_STATUS_CHANGE_NO_TICK,
SMSG_BEING_STATUS_CHANGE,
SMSG_BEING_STATUS_CHANGE2,
@@ -236,6 +237,10 @@ void BeingHandler::handleMessage(Net::MessageIn &msg)
processPlaterStatusChange(msg);
break;
+ case SMSG_PLAYER_STATUS_CHANGE2:
+ processPlaterStatusChange2(msg);
+ break;
+
case SMSG_PLAYER_STATUS_CHANGE_NO_TICK:
processPlaterStatusChangeNoTick(msg);
break;
@@ -1798,6 +1803,26 @@ void BeingHandler::processPlaterStatusChange(Net::MessageIn &msg) const
BLOCK_END("BeingHandler::processPlayerStop")
}
+void BeingHandler::processPlaterStatusChange2(Net::MessageIn &msg) const
+{
+ if (!actorManager)
+ return;
+
+ const int id = msg.readInt32("account id");
+ Being *const dstBeing = actorManager->findBeing(id);
+ if (!dstBeing)
+ return;
+
+ uint32_t statusEffects = msg.readInt32("status effect");
+ dstBeing->setLevel(msg.readInt32("level"));
+ msg.readInt32("showEFST");
+
+ dstBeing->setStatusEffectBlock(0, static_cast<uint16_t>(
+ (statusEffects >> 16) & 0xffff));
+ dstBeing->setStatusEffectBlock(16, static_cast<uint16_t>(
+ statusEffects & 0xffff));
+}
+
void BeingHandler::processPlaterStatusChangeNoTick(Net::MessageIn &msg) const
{
// +++ probably need show some effect?
diff --git a/src/net/eathena/beinghandler.h b/src/net/eathena/beinghandler.h
index 6a7599c11..5dcd0121c 100644
--- a/src/net/eathena/beinghandler.h
+++ b/src/net/eathena/beinghandler.h
@@ -119,6 +119,8 @@ class BeingHandler final : public MessageHandler, public Ea::BeingHandler
void processBeingFakeName(Net::MessageIn &msg) const;
void processBeingStatUpdate1(Net::MessageIn &msg) const;
+
+ void processPlaterStatusChange2(Net::MessageIn &msg) const;
};
} // namespace EAthena
diff --git a/src/net/eathena/packets.h b/src/net/eathena/packets.h
index b42712d2b..f3dd469b9 100644
--- a/src/net/eathena/packets.h
+++ b/src/net/eathena/packets.h
@@ -93,7 +93,7 @@ int16_t packet_lengths[] =
6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
// #0x0280
- 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
+ 0, 0, 0, 6, 0, 0, 0, 0, 0, 0, 18, 0, 0, 0, 0, 0,
0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 80, 0, -1, 0, 0,
0, 0, 8, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0,
0, -1, -1, 107, 6, -1, 0, 0, 0, 191, 0, 0, 0, 0, 0, 0,
diff --git a/src/net/eathena/protocol.h b/src/net/eathena/protocol.h
index ebeb16eba..d2ea66446 100644
--- a/src/net/eathena/protocol.h
+++ b/src/net/eathena/protocol.h
@@ -117,6 +117,7 @@
#define SMSG_BEING_STAT_UPDATE_1 0x01ab
#define SMSG_PLAYER_STATUS_CHANGE 0x0229
+#define SMSG_PLAYER_STATUS_CHANGE2 0x028a
#define SMSG_PLAYER_STATUS_CHANGE_NO_TICK 0x0196
#define SMSG_PLAYER_GUILD_PARTY_INFO 0x0195
#define SMSG_BEING_STATUS_CHANGE 0x0983