From e86d962268592850430f15cf11495473a38041f9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 28 Sep 2015 18:56:57 +0300 Subject: Add packet SMSG_BATTLE_EMBLEM2 0x0b1a. Also change protocol version to 12. --- src/net/eathena/battlegroundrecv.cpp | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/net/eathena/battlegroundrecv.cpp') diff --git a/src/net/eathena/battlegroundrecv.cpp b/src/net/eathena/battlegroundrecv.cpp index 72bfe7d3c..48525a37c 100644 --- a/src/net/eathena/battlegroundrecv.cpp +++ b/src/net/eathena/battlegroundrecv.cpp @@ -20,8 +20,11 @@ #include "net/eathena/battlegroundrecv.h" +#include "actormanager.h" #include "logger.h" +#include "being/being.h" + #include "net/messagein.h" #include "debug.h" @@ -34,7 +37,20 @@ void BattleGroundRecv::processBattleEmblem(Net::MessageIn &msg) UNIMPLIMENTEDPACKET; msg.readBeingId("account id"); msg.readString(24, "name"); - msg.readInt16("camp"); + msg.readInt16("bg id"); +} + +void BattleGroundRecv::processBattleEmblem2(Net::MessageIn &msg) +{ + const BeingId id = msg.readBeingId("account id"); + msg.readString(24, "name"); + msg.readInt16("bg id"); + const int teamId = msg.readInt16("team id"); + + Being *const dstBeing = actorManager->findBeing(id); + if (dstBeing) + dstBeing->setTeamId(teamId); + } void BattleGroundRecv::processBattleUpdateScore(Net::MessageIn &msg) -- cgit v1.2.3-60-g2f50