diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-10-14 16:57:01 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-10-14 16:57:01 +0300 |
commit | 31a13e296a21a7735e8d217b4d7f13fa32ee4033 (patch) | |
tree | 0e957cb1aaca463a715641e2344ee39f5cc90889 /src/net/eathena/partyhandler.cpp | |
parent | d2bde911f0b80515066f100fc4704793255be0ea (diff) | |
download | manaplus-31a13e296a21a7735e8d217b4d7f13fa32ee4033.tar.gz manaplus-31a13e296a21a7735e8d217b4d7f13fa32ee4033.tar.bz2 manaplus-31a13e296a21a7735e8d217b4d7f13fa32ee4033.tar.xz manaplus-31a13e296a21a7735e8d217b4d7f13fa32ee4033.zip |
eathena: add packet SMSG_PARTY_LEADER 0x07fc.
Diffstat (limited to 'src/net/eathena/partyhandler.cpp')
-rw-r--r-- | src/net/eathena/partyhandler.cpp | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp index 8cf57c634..6b132646c 100644 --- a/src/net/eathena/partyhandler.cpp +++ b/src/net/eathena/partyhandler.cpp @@ -63,6 +63,7 @@ PartyHandler::PartyHandler() : SMSG_PARTY_INVITATION_STATS, SMSG_PARTY_MEMBER_INFO, SMSG_PARTY_ITEM_PICKUP, + SMSG_PARTY_LEADER, 0 }; handledMessages = _messages; @@ -116,6 +117,9 @@ void PartyHandler::handleMessage(Net::MessageIn &msg) case SMSG_PARTY_ITEM_PICKUP: processPartyItemPickup(msg); break; + case SMSG_PARTY_LEADER: + processPartyLeader(msg); + break; default: break; @@ -483,4 +487,16 @@ void PartyHandler::processPartyItemPickup(Net::MessageIn &msg) const msg.readUInt8("item type"); } +void PartyHandler::processPartyLeader(Net::MessageIn &msg) const +{ + PartyMember *const oldMember = Ea::taParty->getMember( + msg.readInt32("old leder id")); + PartyMember *const newMember = Ea::taParty->getMember( + msg.readInt32("new leder id")); + if (oldMember) + oldMember->setLeader(false); + if (newMember) + newMember->setLeader(true); +} + } // namespace EAthena |