summaryrefslogtreecommitdiff
path: root/src/net/eathena/beingrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-07-12 21:05:31 +0300
committerAndrei Karas <akaras@inbox.ru>2017-07-13 00:47:48 +0300
commitf085c8aed70d5efaaccfa7a4e2cac4a840935165 (patch)
tree9a77f4c478a26869b98ffa5b40ae50e18ba3ca2b /src/net/eathena/beingrecv.cpp
parenta366d82dad85389c9562fdfdd3a981894603fa07 (diff)
downloadmanaverse-f085c8aed70d5efaaccfa7a4e2cac4a840935165.tar.gz
manaverse-f085c8aed70d5efaaccfa7a4e2cac4a840935165.tar.bz2
manaverse-f085c8aed70d5efaaccfa7a4e2cac4a840935165.tar.xz
manaverse-f085c8aed70d5efaaccfa7a4e2cac4a840935165.zip
Set group id from net code to not only local player.
Diffstat (limited to 'src/net/eathena/beingrecv.cpp')
-rw-r--r--src/net/eathena/beingrecv.cpp16
1 files changed, 8 insertions, 8 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp
index f6153dee9..435468fb6 100644
--- a/src/net/eathena/beingrecv.cpp
+++ b/src/net/eathena/beingrecv.cpp
@@ -1741,7 +1741,7 @@ void BeingRecv::processBeingAttrs(Net::MessageIn &msg)
Being *const dstBeing = actorManager->findBeing(
msg.readBeingId("player id"));
- const int gmLevel = msg.readInt32("group id");
+ const int groupId = msg.readInt32("group id");
uint16_t mount = 0;
mount = msg.readInt16("mount");
int language = -1;
@@ -1749,15 +1749,15 @@ void BeingRecv::processBeingAttrs(Net::MessageIn &msg)
language = msg.readInt16("language");
if (dstBeing != nullptr)
{
- if (serverVersion <= 17 &&
- dstBeing == localPlayer)
+ if (serverVersion <= 17 ||
+ dstBeing != localPlayer)
{
- localPlayer->setGroupId(gmLevel);
+ dstBeing->setGroupId(groupId);
+ if (groupId != 0)
+ dstBeing->setGM(true);
+ else
+ dstBeing->setGM(false);
}
- if (gmLevel != 0)
- dstBeing->setGM(true);
- else
- dstBeing->setGM(false);
dstBeing->setHorse(mount);
dstBeing->setLanguageId(language);
if (dstBeing == localPlayer)