summaryrefslogtreecommitdiff
path: root/src/net/eathena/playerrecv.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/playerrecv.cpp
parenta366d82dad85389c9562fdfdd3a981894603fa07 (diff)
downloadplus-f085c8aed70d5efaaccfa7a4e2cac4a840935165.tar.gz
plus-f085c8aed70d5efaaccfa7a4e2cac4a840935165.tar.bz2
plus-f085c8aed70d5efaaccfa7a4e2cac4a840935165.tar.xz
plus-f085c8aed70d5efaaccfa7a4e2cac4a840935165.zip
Set group id from net code to not only local player.
Diffstat (limited to 'src/net/eathena/playerrecv.cpp')
-rw-r--r--src/net/eathena/playerrecv.cpp8
1 files changed, 6 insertions, 2 deletions
diff --git a/src/net/eathena/playerrecv.cpp b/src/net/eathena/playerrecv.cpp
index 84dbeb5f3..c575e2615 100644
--- a/src/net/eathena/playerrecv.cpp
+++ b/src/net/eathena/playerrecv.cpp
@@ -483,12 +483,16 @@ void PlayerRecv::processPlayerAttrs(Net::MessageIn &msg)
if (len < 8)
return;
- const int gmLevel = msg.readInt32("group id");
+ const int groupId = msg.readInt32("group id");
if (localPlayer == nullptr)
return;
- localPlayer->setGroupId(gmLevel);
+ localPlayer->setGroupId(groupId);
+ if (groupId > 0)
+ localPlayer->setGM(true);
+ else
+ localPlayer->setGM(false);
}
} // namespace EAthena