summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/net/eathena/beingrecv.cpp60
-rw-r--r--src/net/eathena/loginrecv.cpp2
2 files changed, 13 insertions, 49 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index 20342f853..ccf00cd90 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -584,25 +584,13 @@ void BeingRecv::processBeingVisible(Net::MessageIn &msg)
msg.readInt8("is boss");
}
- if (serverVersion == 0 ||
- serverVersion >= 16)
+ if (msg.getVersion() >= 20150513)
{
- if (msg.getVersion() >= 20150513)
- {
- msg.readInt16("body2");
- }
- if (msg.getVersion() >= 20131223)
- {
- msg.readString(24, "name");
- }
+ msg.readInt16("body2");
}
- else
+ if (msg.getVersion() >= 20131223)
{
- if (msg.getVersion() >= 20150513)
- {
- msg.readInt16("body2");
- msg.readString(24, "name");
- }
+ msg.readString(24, "name");
}
dstBeing->setStatusEffectOpitons(option,
@@ -790,25 +778,13 @@ void BeingRecv::processBeingMove(Net::MessageIn &msg)
dstBeing->setHP(hp);
msg.readInt8("is boss");
}
- if (serverVersion == 0 ||
- serverVersion >= 16)
+ if (msg.getVersion() >= 20150513)
{
- if (msg.getVersion() >= 20150513)
- {
- msg.readInt16("body2");
- }
- if (msg.getVersion() >= 20131223)
- {
- msg.readString(24, "name");
- }
+ msg.readInt16("body2");
}
- else
+ if (msg.getVersion() >= 20131223)
{
- if (msg.getVersion() >= 20150513)
- {
- msg.readInt16("body2");
- msg.readString(24, "name");
- }
+ msg.readString(24, "name");
}
dstBeing->setStatusEffectOpitons(option,
@@ -974,25 +950,13 @@ void BeingRecv::processBeingSpawn(Net::MessageIn &msg)
dstBeing->setHP(hp);
msg.readInt8("is boss");
}
- if (serverVersion == 0 ||
- serverVersion >= 16)
+ if (msg.getVersion() >= 20150513)
{
- if (msg.getVersion() >= 20150513)
- {
- msg.readInt16("body2");
- }
- if (msg.getVersion() >= 20131223)
- {
- msg.readString(24, "name");
- }
+ msg.readInt16("body2");
}
- else
+ if (msg.getVersion() >= 20131223)
{
- if (msg.getVersion() >= 20150513)
- {
- msg.readInt16("body2");
- msg.readString(24, "name");
- }
+ msg.readString(24, "name");
}
dstBeing->setStatusEffectOpitons(option,
diff --git a/src/net/eathena/loginrecv.cpp b/src/net/eathena/loginrecv.cpp
index 2f6defc25..213051c28 100644
--- a/src/net/eathena/loginrecv.cpp
+++ b/src/net/eathena/loginrecv.cpp
@@ -172,7 +172,7 @@ void LoginRecv::processServerVersion(Net::MessageIn &msg)
logger->log("autofix Hercules packet version to: %d",
packetVersion);
}
- if (serverVersion >= 16 && len >= 18)
+ if (len >= 18)
{
evolPacketOffset = msg.readInt16("evol packet offset");
}