summaryrefslogtreecommitdiff
path: root/src/net
diff options
context:
space:
mode:
Diffstat (limited to 'src/net')
-rw-r--r--src/net/eathena/beingrecv.cpp32
1 files changed, 23 insertions, 9 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index 23f731c2d..590d86cad 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -1363,21 +1363,35 @@ 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)
+ return;
+
Being *const dstBeing = actorManager->findBeing(
msg.readBeingId("player id"));
const int gmLevel = msg.readInt32("gm level");
- if (dstBeing && gmLevel)
+ uint16_t mount = 0;
+ if (haveMount)
+ mount = msg.readInt16("mount");
+ if (dstBeing)
{
- if (dstBeing == localPlayer)
- localPlayer->setGMLevel(gmLevel);
- dstBeing->setGM(true);
+ if (gmLevel)
+ {
+ if (dstBeing == localPlayer)
+ localPlayer->setGMLevel(gmLevel);
+ dstBeing->setGM(true);
+ }
+ else
+ {
+ if (dstBeing == localPlayer)
+ localPlayer->setGMLevel(0);
+ if (dstBeing)
+ dstBeing->setGM(false);
+ }
}
- else
+ if (haveMount)
{
- if (dstBeing == localPlayer)
- localPlayer->setGMLevel(0);
- if (dstBeing)
- dstBeing->setGM(false);
+ dstBeing->setHorse(mount);
}
}