summaryrefslogtreecommitdiff
path: root/src/net/eathena/beingrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-04-01 15:21:43 +0300
committerAndrei Karas <akaras@inbox.ru>2016-04-01 15:21:43 +0300
commit2022268b439fe0a00cfac1d5c659f1add993753f (patch)
treead5c0661f403c2a8e683b3e433d116e3f64e6d49 /src/net/eathena/beingrecv.cpp
parent2a74a9fa1cb90c1d1cbd4b09b632c43cdb076eb0 (diff)
downloadmv-2022268b439fe0a00cfac1d5c659f1add993753f.tar.gz
mv-2022268b439fe0a00cfac1d5c659f1add993753f.tar.bz2
mv-2022268b439fe0a00cfac1d5c659f1add993753f.tar.xz
mv-2022268b439fe0a00cfac1d5c659f1add993753f.zip
Sort more packets. Removed some old packet copies.
Diffstat (limited to 'src/net/eathena/beingrecv.cpp')
-rw-r--r--src/net/eathena/beingrecv.cpp54
1 files changed, 23 insertions, 31 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index 3a1438c15..b52bd698e 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -823,37 +823,16 @@ void BeingRecv::processBeingStatusChange(Net::MessageIn &msg)
const BeingId id = msg.readBeingId("being id");
const Enable flag = fromBool(
msg.readUInt8("flag: 0: stop, 1: start"), Enable);
- 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("BeingRecv::processBeingStatusChange")
-}
-
-void BeingRecv::processBeingStatusChange2(Net::MessageIn &msg)
-{
- BLOCK_START("BeingRecv::processBeingStatusChange")
- if (!actorManager)
+ if (msg.getVersion() >= 20120618)
+ msg.readInt32("total");
+ if (msg.getVersion() >= 20090121)
{
- BLOCK_END("BeingRecv::processBeingStatusChange")
- return;
+ msg.readInt32("left");
+ msg.readInt32("val1");
+ msg.readInt32("val2");
+ msg.readInt32("val3");
}
- // Status change
- const uint16_t status = msg.readInt16("status");
- const BeingId id = msg.readBeingId("being id");
- const Enable flag = fromBool(
- msg.readUInt8("flag: 0: stop, 1: start"), Enable);
- msg.readInt32("left");
- msg.readInt32("val1");
- msg.readInt32("val2");
- msg.readInt32("val3");
-
Being *const dstBeing = actorManager->findBeing(id);
if (dstBeing)
dstBeing->setStatusEffect(status, flag);
@@ -1327,14 +1306,26 @@ void BeingRecv::processBeingRemoveSkill(Net::MessageIn &msg)
void BeingRecv::processBeingFakeName(Net::MessageIn &msg)
{
+ uint16_t x, y;
+ uint8_t dir;
+ if (msg.getVersion() < 20071106)
+ {
+ msg.readBeingId("npc id");
+ msg.skip(8, "unused");
+ msg.readInt16("class?"); // 111
+ msg.skip(30, "unused");
+ msg.readCoordinates(x, y, dir, "position");
+ msg.readUInt8("sx");
+ msg.readUInt8("sy");
+ msg.skip(3, "unused");
+ return;
+ }
const BeingType::BeingType type = static_cast<BeingType::BeingType>(
msg.readUInt8("object type"));
const BeingId id = msg.readBeingId("npc id");
msg.skip(8, "unused");
const uint16_t job = msg.readInt16("class?"); // 111
msg.skip(30, "unused");
- uint16_t x, y;
- uint8_t dir;
msg.readCoordinates(x, y, dir, "position");
msg.readUInt8("sx");
msg.readUInt8("sy");
@@ -1585,7 +1576,8 @@ void BeingRecv::processBeingViewEquipment(Net::MessageIn &msg)
msg.readInt16("accessory");
msg.readInt16("accessory2");
msg.readInt16("accessory3");
- msg.readInt16("robe");
+ if (msg.getVersion() >= 20101124)
+ msg.readInt16("robe");
msg.readInt16("hair color");
msg.readInt16("body color");
msg.readUInt8("gender");