diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-09-28 18:56:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-09-28 18:56:57 +0300 |
commit | e86d962268592850430f15cf11495473a38041f9 (patch) | |
tree | c7d8629d718d104c24b9f95360bc26fd6781a74e /src/net | |
parent | b6d994ed88ec99d08ef60a9ee567687873a18a30 (diff) | |
download | plus-e86d962268592850430f15cf11495473a38041f9.tar.gz plus-e86d962268592850430f15cf11495473a38041f9.tar.bz2 plus-e86d962268592850430f15cf11495473a38041f9.tar.xz plus-e86d962268592850430f15cf11495473a38041f9.zip |
Add packet SMSG_BATTLE_EMBLEM2 0x0b1a.
Also change protocol version to 12.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/eathena/battlegroundrecv.cpp | 18 | ||||
-rw-r--r-- | src/net/eathena/battlegroundrecv.h | 1 | ||||
-rw-r--r-- | src/net/eathena/network.h | 2 | ||||
-rw-r--r-- | src/net/eathena/packetsin.inc | 1 |
4 files changed, 20 insertions, 2 deletions
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) diff --git a/src/net/eathena/battlegroundrecv.h b/src/net/eathena/battlegroundrecv.h index 20b0c6ebf..4d88384bf 100644 --- a/src/net/eathena/battlegroundrecv.h +++ b/src/net/eathena/battlegroundrecv.h @@ -33,6 +33,7 @@ namespace EAthena namespace BattleGroundRecv { void processBattleEmblem(Net::MessageIn &msg); + void processBattleEmblem2(Net::MessageIn &msg); void processBattleUpdateScore(Net::MessageIn &msg); void processBattleUpdateCoords(Net::MessageIn &msg); void processBattlePlay(Net::MessageIn &msg); diff --git a/src/net/eathena/network.h b/src/net/eathena/network.h index 695d8cea4..b2b2f3532 100644 --- a/src/net/eathena/network.h +++ b/src/net/eathena/network.h @@ -29,7 +29,7 @@ * Protocol version, reported to the eAthena char and mapserver who can adjust * the protocol accordingly. */ -#define CLIENT_PROTOCOL_VERSION 11 +#define CLIENT_PROTOCOL_VERSION 12 namespace EAthena { diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index 4f027d3e6..c2f786d22 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -37,6 +37,7 @@ packet(SMSG_BANK_WITHDRAW, 0x09aa, 16, &BankRecv::processBankWi packet(SMSG_BATTLE_BEGINS, 0x08df, 50, &BattleGroundRecv::processBattleBegins); packet(SMSG_BATTLE_CHAT_MESSAGE, 0x02dc, -1, &ChatRecv::processBattleChatMessage); packet(SMSG_BATTLE_EMBLEM, 0x02dd, 32, &BattleGroundRecv::processBattleEmblem); +packet(SMSG_BATTLE_EMBLEM2, 0x0b1a, 34, &BattleGroundRecv::processBattleEmblem2); packet(SMSG_BATTLE_JOINED, 0x08d9, 30, &BattleGroundRecv::processBattleJoined); packet(SMSG_BATTLE_NOTICE_DELETE, 0x08db, 27, &BattleGroundRecv::processBattleNoticeDelete); packet(SMSG_BATTLE_PLAY, 0x07fe, 26, &BattleGroundRecv::processBattlePlay); |