summaryrefslogtreecommitdiff
path: root/src/net/eathena/partyhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-10-14 16:57:01 +0300
committerAndrei Karas <akaras@inbox.ru>2014-10-14 16:57:01 +0300
commit31a13e296a21a7735e8d217b4d7f13fa32ee4033 (patch)
tree0e957cb1aaca463a715641e2344ee39f5cc90889 /src/net/eathena/partyhandler.cpp
parentd2bde911f0b80515066f100fc4704793255be0ea (diff)
downloadplus-31a13e296a21a7735e8d217b4d7f13fa32ee4033.tar.gz
plus-31a13e296a21a7735e8d217b4d7f13fa32ee4033.tar.bz2
plus-31a13e296a21a7735e8d217b4d7f13fa32ee4033.tar.xz
plus-31a13e296a21a7735e8d217b4d7f13fa32ee4033.zip
eathena: add packet SMSG_PARTY_LEADER 0x07fc.
Diffstat (limited to 'src/net/eathena/partyhandler.cpp')
-rw-r--r--src/net/eathena/partyhandler.cpp16
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