summaryrefslogtreecommitdiff
path: root/src/net/eathena/playerrecv.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2017-07-12 18:34:00 +0300
committerAndrei Karas <akaras@inbox.ru>2017-07-12 19:20:20 +0300
commit64d81679e4fbaba26cd538669a394070e9aa7c44 (patch)
tree2745d7a1b8e0effbc6a9e8625c419f104e3775b2 /src/net/eathena/playerrecv.cpp
parent42564aea17d47d767979f2708ffa2f8a3a25edf9 (diff)
downloadmv-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/playerrecv.cpp')
-rw-r--r--src/net/eathena/playerrecv.cpp14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/net/eathena/playerrecv.cpp b/src/net/eathena/playerrecv.cpp
index 9eb57b687..d9674a90e 100644
--- a/src/net/eathena/playerrecv.cpp
+++ b/src/net/eathena/playerrecv.cpp
@@ -477,4 +477,18 @@ void PlayerRecv::processKilledBy(Net::MessageIn &msg)
}
}
+void PlayerRecv::processPlayerAttrs(Net::MessageIn &msg)
+{
+ const int len = msg.readInt16("len");
+ if (len < 8)
+ return;
+
+ const int gmLevel = msg.readInt32("group id");
+
+ if (localPlayer == nullptr)
+ return;
+
+ localPlayer->setGMLevel(gmLevel);
+}
+
} // namespace EAthena