summaryrefslogtreecommitdiff
path: root/src/net/eathena/partyhandler.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-07 18:02:45 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-07 18:02:45 +0300
commitb5aa7b91572aad7aea5ec9b5b109e03a26934b6c (patch)
tree0c0e168726b82394e2d1c6b33f48c09049089670 /src/net/eathena/partyhandler.cpp
parentf899460658ad3abc8d02e7ca129b790b1c8c9736 (diff)
downloadplus-b5aa7b91572aad7aea5ec9b5b109e03a26934b6c.tar.gz
plus-b5aa7b91572aad7aea5ec9b5b109e03a26934b6c.tar.bz2
plus-b5aa7b91572aad7aea5ec9b5b109e03a26934b6c.tar.xz
plus-b5aa7b91572aad7aea5ec9b5b109e03a26934b6c.zip
eathena: add packet SMSG_PARTY_MEMBER_INFO 0x01e9.
Diffstat (limited to 'src/net/eathena/partyhandler.cpp')
-rw-r--r--src/net/eathena/partyhandler.cpp35
1 files changed, 35 insertions, 0 deletions
diff --git a/src/net/eathena/partyhandler.cpp b/src/net/eathena/partyhandler.cpp
index e2256f5eb..0cc927ab5 100644
--- a/src/net/eathena/partyhandler.cpp
+++ b/src/net/eathena/partyhandler.cpp
@@ -30,6 +30,8 @@
#include "net/eathena/messageout.h"
#include "net/eathena/protocol.h"
+#include "net/eathena/gui/partytab.h"
+
#include "resources/notifytypes.h"
#include "debug.h"
@@ -56,6 +58,7 @@ PartyHandler::PartyHandler() :
SMSG_PARTY_UPDATE_COORDS,
SMSG_PARTY_MESSAGE,
SMSG_PARTY_INVITATION_STATS,
+ SMSG_PARTY_MEMBER_INFO,
0
};
handledMessages = _messages;
@@ -103,6 +106,9 @@ void PartyHandler::handleMessage(Net::MessageIn &msg)
case SMSG_PARTY_INVITATION_STATS:
processPartyInvitationStats(msg);
break;
+ case SMSG_PARTY_MEMBER_INFO:
+ processPartyMemberInfo(msg);
+ break;
default:
break;
@@ -213,4 +219,33 @@ void PartyHandler::processPartyInvitationStats(Net::MessageIn &msg)
msg.readUInt8("allow party");
}
+void PartyHandler::processPartyMemberInfo(Net::MessageIn &msg)
+{
+ const int id = msg.readInt32("account id");
+ const bool leader = msg.readInt32("leader") == 0U;
+ const int x = msg.readInt16("x");
+ const int y = msg.readInt16("y");
+ const bool online = msg.readInt8("online") == 0U;
+ msg.readString(24, "party name");
+ const std::string nick = msg.readString(24, "player name");
+ const std::string map = msg.readString(16, "map name");
+ msg.readInt8("party.item&1");
+ msg.readInt8("party.item&2");
+
+ if (!Ea::taParty)
+ return;
+
+ PartyMember *const member = Ea::taParty->addMember(id, nick);
+ if (member)
+ {
+ if (Ea::partyTab && member->getOnline() != online)
+ Ea::partyTab->showOnline(nick, online);
+ member->setLeader(leader);
+ member->setOnline(online);
+ member->setMap(map);
+ member->setX(x);
+ member->setY(y);
+ }
+}
+
} // namespace EAthena