summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-05-01 21:48:51 +0300
committerAndrei Karas <akaras@inbox.ru>2017-05-01 21:48:51 +0300
commit53f7874c0ae9e4e6337afdab6ec8383ae2f66f7c (patch)
treefb94b9c72e21db26e6097e516ca56a9ac0316856
parent348f7d0a0bc6142dbdcacddbca5b9003d5c25705 (diff)
downloadplus-53f7874c0ae9e4e6337afdab6ec8383ae2f66f7c.tar.gz
plus-53f7874c0ae9e4e6337afdab6ec8383ae2f66f7c.tar.bz2
plus-53f7874c0ae9e4e6337afdab6ec8383ae2f66f7c.tar.xz
plus-53f7874c0ae9e4e6337afdab6ec8383ae2f66f7c.zip
Improve ServerFeatures haveExtendedRiding.
-rw-r--r--src/net/eathena/beingrecv.cpp13
-rw-r--r--src/net/eathena/serverfeatures.cpp2
2 files changed, 4 insertions, 11 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index 3e9c935dc..1e9e56661 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -1725,18 +1725,14 @@ void BeingRecv::processMobInfo(Net::MessageIn &msg)
void BeingRecv::processBeingAttrs(Net::MessageIn &msg)
{
const int len = msg.readInt16("len");
- if (len < 12)
- return;
- const bool haveMount = serverFeatures->haveExtendedRiding();
- if (haveMount && len < 14)
+ if (len < 14)
return;
Being *const dstBeing = actorManager->findBeing(
msg.readBeingId("player id"));
const int gmLevel = msg.readInt32("gm level");
uint16_t mount = 0;
- if (haveMount)
- mount = msg.readInt16("mount");
+ mount = msg.readInt16("mount");
int language = -1;
if (serverVersion >= 17)
language = msg.readInt16("language");
@@ -1754,10 +1750,7 @@ void BeingRecv::processBeingAttrs(Net::MessageIn &msg)
localPlayer->setGMLevel(0);
dstBeing->setGM(false);
}
- if (haveMount)
- {
- dstBeing->setHorse(mount);
- }
+ dstBeing->setHorse(mount);
dstBeing->setLanguageId(language);
if (dstBeing == localPlayer)
PlayerInfo::setServerLanguage(language);
diff --git a/src/net/eathena/serverfeatures.cpp b/src/net/eathena/serverfeatures.cpp
index 5005e261e..164963c3c 100644
--- a/src/net/eathena/serverfeatures.cpp
+++ b/src/net/eathena/serverfeatures.cpp
@@ -133,7 +133,7 @@ bool ServerFeatures::haveServerWarpNames() const
bool ServerFeatures::haveExtendedRiding() const
{
- return true;
+ return serverVersion > 0;
}
bool ServerFeatures::haveAdvancedBuySell() const