From b5b386c2de8c9b988ed19c979f0d4b1d7fcfdbd4 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 16 Jun 2015 17:06:52 +0300 Subject: Set being team id from packet SMSG_PVP_SET (tmwa) --- src/net/tmwa/beinghandler.cpp | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'src/net') 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") } -- cgit v1.2.3-70-g09d2