diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-07-12 18:34:00 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-07-12 19:20:20 +0300 |
commit | 64d81679e4fbaba26cd538669a394070e9aa7c44 (patch) | |
tree | 2745d7a1b8e0effbc6a9e8625c419f104e3775b2 /src/net/eathena/beingrecv.cpp | |
parent | 42564aea17d47d767979f2708ffa2f8a3a25edf9 (diff) | |
download | mv-64d81679e4fbaba26cd538669a394070e9aa7c44.tar.gz mv-64d81679e4fbaba26cd538669a394070e9aa7c44.tar.bz2 mv-64d81679e4fbaba26cd538669a394070e9aa7c44.tar.xz mv-64d81679e4fbaba26cd538669a394070e9aa7c44.zip |
Add packet SMSG_PLAYER_ATTRS 0x0b25.
It allow set local player attributes from server.
For now it send real group id.
Diffstat (limited to 'src/net/eathena/beingrecv.cpp')
-rw-r--r-- | src/net/eathena/beingrecv.cpp | 17 |
1 files changed, 7 insertions, 10 deletions
diff --git a/src/net/eathena/beingrecv.cpp b/src/net/eathena/beingrecv.cpp index d99fa241e..2166205f6 100644 --- a/src/net/eathena/beingrecv.cpp +++ b/src/net/eathena/beingrecv.cpp @@ -1741,26 +1741,23 @@ void BeingRecv::processBeingAttrs(Net::MessageIn &msg) Being *const dstBeing = actorManager->findBeing( msg.readBeingId("player id")); - const int gmLevel = msg.readInt32("gm level"); + const int gmLevel = msg.readInt32("group id"); uint16_t mount = 0; mount = msg.readInt16("mount"); int language = -1; - if (serverVersion >= 17) + if (serverVersion >= 17 && len > 14) language = msg.readInt16("language"); if (dstBeing != nullptr) { - if (gmLevel != 0) + if (serverVersion <= 17 && + dstBeing == localPlayer) { - if (dstBeing == localPlayer) - localPlayer->setGMLevel(gmLevel); - dstBeing->setGM(true); + localPlayer->setGMLevel(gmLevel); } + if (gmLevel != 0) + dstBeing->setGM(true); else - { - if (dstBeing == localPlayer) - localPlayer->setGMLevel(0); dstBeing->setGM(false); - } dstBeing->setHorse(mount); dstBeing->setLanguageId(language); if (dstBeing == localPlayer) |