diff options
Diffstat (limited to 'src/net/eathena')
-rw-r--r-- | src/net/eathena/beingrecv.cpp | 16 | ||||
-rw-r--r-- | src/net/eathena/playerrecv.cpp | 8 |
2 files changed, 14 insertions, 10 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) 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 |