diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-06-16 17:06:52 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-06-16 17:06:52 +0300 |
commit | b5b386c2de8c9b988ed19c979f0d4b1d7fcfdbd4 (patch) | |
tree | 3d26144c5d7524251f43fbb2aa076ee4c140f979 /src/net/tmwa | |
parent | 21de2b88329859b8b49aa9d1bd818e8da65e3b11 (diff) | |
download | plus-b5b386c2de8c9b988ed19c979f0d4b1d7fcfdbd4.tar.gz plus-b5b386c2de8c9b988ed19c979f0d4b1d7fcfdbd4.tar.bz2 plus-b5b386c2de8c9b988ed19c979f0d4b1d7fcfdbd4.tar.xz plus-b5b386c2de8c9b988ed19c979f0d4b1d7fcfdbd4.zip |
Set being team id from packet SMSG_PVP_SET (tmwa)
Diffstat (limited to 'src/net/tmwa')
-rw-r--r-- | src/net/tmwa/beinghandler.cpp | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/net/tmwa/beinghandler.cpp b/src/net/tmwa/beinghandler.cpp index b57269f32..e80dfd8a1 100644 --- a/src/net/tmwa/beinghandler.cpp +++ b/src/net/tmwa/beinghandler.cpp @@ -1613,12 +1613,19 @@ void BeingHandler::processPvpSet(Net::MessageIn &msg) BLOCK_START("BeingHandler::processPvpSet") const BeingId id = msg.readBeingId("being id"); const int rank = msg.readInt32("rank"); - msg.readInt32("num"); + int teamId = 0; + if (serverFeatures->haveTeamId()) + teamId = msg.readInt32("team"); + else + msg.readInt32("num"); if (actorManager) { Being *const dstBeing = actorManager->findBeing(id); if (dstBeing) + { dstBeing->setPvpRank(rank); + dstBeing->setTeamId(teamId); + } } BLOCK_END("BeingHandler::processPvpSet") } |