diff options
author | Andrei Karas <akaras@inbox.ru> | 2018-02-09 19:56:40 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2018-02-09 19:56:40 +0300 |
commit | fd20692fa893b5e96ddd7647b1487b9b3cca5f50 (patch) | |
tree | 19790082bdd3f3344a75514c27899b7521df1e36 /src/net/eathena/clanrecv.cpp | |
parent | 3ad5dc250eec4fb091840e3834cbc12573e923df (diff) | |
download | manaverse-fd20692fa893b5e96ddd7647b1487b9b3cca5f50.tar.gz manaverse-fd20692fa893b5e96ddd7647b1487b9b3cca5f50.tar.bz2 manaverse-fd20692fa893b5e96ddd7647b1487b9b3cca5f50.tar.xz manaverse-fd20692fa893b5e96ddd7647b1487b9b3cca5f50.zip |
Collect clan info information in clan object.
Diffstat (limited to 'src/net/eathena/clanrecv.cpp')
-rw-r--r-- | src/net/eathena/clanrecv.cpp | 22 |
1 files changed, 12 insertions, 10 deletions
diff --git a/src/net/eathena/clanrecv.cpp b/src/net/eathena/clanrecv.cpp index acc962c0d..bf16627b2 100644 --- a/src/net/eathena/clanrecv.cpp +++ b/src/net/eathena/clanrecv.cpp @@ -20,6 +20,8 @@ #include "net/eathena/clanrecv.h" +#include "being/claninfo.h" + #include "net/messagein.h" #include "logger.h" @@ -31,29 +33,29 @@ namespace EAthena void ClanRecv::processClanInfo(Net::MessageIn &msg) { - UNIMPLEMENTEDPACKET; msg.readInt16("len"); - msg.readInt32("clan id"); - msg.readString(24, "clan name"); - msg.readString(24, "master name"); - msg.readString(16, "map name"); + clanInfo.id = msg.readInt32("clan id"); + clanInfo.name = msg.readString(24, "clan name"); + clanInfo.masterName = msg.readString(24, "master name"); + clanInfo.mapName = msg.readString(16, "map name"); const int allyCount = msg.readUInt8("ally clans count"); const int antagonistCount = msg.readUInt8("antagonist clans count"); for (int f = 0; f < allyCount; f ++) { - msg.readString(24, "ally clan name"); + clanInfo.allyClans.push_back( + msg.readString(24, "ally clan name")); } for (int f = 0; f < antagonistCount; f ++) { - msg.readString(24, "antagonist clan name"); + clanInfo.antagonistClans.push_back( + msg.readString(24, "antagonist clan name")); } } void ClanRecv::processClanOnlineCount(Net::MessageIn &msg) { - UNIMPLEMENTEDPACKET; - msg.readInt16("online members count"); - msg.readInt16("total members count"); + clanInfo.onlineMembers = msg.readInt16("online members count"); + clanInfo.totalMembers = msg.readInt16("total members count"); } void ClanRecv::processClanLeave(Net::MessageIn &msg) |