summaryrefslogtreecommitdiff
path: root/src/net/eathena/partyhandler.cpp
diff options
context:
space:
mode:
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