From 9793b9e60f2ca5a163fce8e284d20c36c74ea094 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Tue, 25 Sep 2018 21:54:31 +0300 Subject: Add packet SMSG_GUILD_EXPULSION2 0x0a82. --- src/net/eathena/guildrecv.cpp | 18 ++++++++++++++++++ src/net/eathena/guildrecv.h | 1 + src/net/eathena/packetsin.inc | 3 +++ 3 files changed, 22 insertions(+) (limited to 'src') diff --git a/src/net/eathena/guildrecv.cpp b/src/net/eathena/guildrecv.cpp index 5fa99bb78..574090c8f 100644 --- a/src/net/eathena/guildrecv.cpp +++ b/src/net/eathena/guildrecv.cpp @@ -743,6 +743,24 @@ void GuildRecv::processGuildExpulsion(Net::MessageIn &msg) GuildRecv::processGuildExpulsionContinue(nick); } +void GuildRecv::processGuildExpulsion2(Net::MessageIn &msg) +{ + msg.readString(40, "message"); + const int charId = msg.readInt32("char id"); + + std::string nick; + + if (taGuild != nullptr) + { + const GuildMember *const member = taGuild->getMemberByCharId(charId); + if (member != nullptr) + { + nick = member->getName(); + GuildRecv::processGuildExpulsionContinue(nick); + } + } +} + void GuildRecv::processGuildExpulsionList(Net::MessageIn &msg) { const int length = msg.readInt16("len"); diff --git a/src/net/eathena/guildrecv.h b/src/net/eathena/guildrecv.h index 733e98633..35548048d 100644 --- a/src/net/eathena/guildrecv.h +++ b/src/net/eathena/guildrecv.h @@ -65,6 +65,7 @@ namespace EAthena void processGuildPositionInfo(Net::MessageIn &msg); void processGuildMemberLogin(Net::MessageIn &msg); void processGuildExpulsion(Net::MessageIn &msg); + void processGuildExpulsion2(Net::MessageIn &msg); void processGuildExpulsionList(Net::MessageIn &msg); void processGuildEmblem(Net::MessageIn &msg); void processOnlineInfo(Net::MessageIn &msg); diff --git a/src/net/eathena/packetsin.inc b/src/net/eathena/packetsin.inc index fbc9ee818..194798849 100644 --- a/src/net/eathena/packetsin.inc +++ b/src/net/eathena/packetsin.inc @@ -993,12 +993,14 @@ if (packetVersion >= 20160921) // 20160921 re if (packetVersionRe >= 20160921) { + packet(SMSG_GUILD_EXPULSION2, 0x0a82, 46, &GuildRecv::processGuildExpulsion2, 20160921); packet(SMSG_GUILD_LEAVE2, 0x0a83, 46, &GuildRecv::processGuildLeave2, 20160921); } // 20161019 main if (packetVersionMain >= 20161019) { + packet(SMSG_GUILD_EXPULSION2, 0x0a82, 46, &GuildRecv::processGuildExpulsion2, 20161019); packet(SMSG_GUILD_LEAVE2, 0x0a83, 46, &GuildRecv::processGuildLeave2, 20161019); } @@ -1115,6 +1117,7 @@ if (packets_zero == true) packet(SMSG_PARTY_INFO, 0x0a44, -1, &PartyRecv::processPartyInfo, 20171018); packet(SMSG_PARTY_MEMBER_JOB_LEVEL, 0x0abd, 10, &PartyRecv::processPartyMemberJobLevel, 20171018); packet(SMSG_MVP_EXP, 0x010b, 6, &ChatRecv::processMVPExp, 20171018); + packet(SMSG_GUILD_EXPULSION2, 0x0a82, 46, &GuildRecv::processGuildExpulsion2, 20171018); packet(SMSG_GUILD_LEAVE2, 0x0a83, 46, &GuildRecv::processGuildLeave2, 20171018); } -- cgit v1.2.3-70-g09d2