summaryrefslogtreecommitdiff
path: root/src/net/tmwa
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-16 17:08:53 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-16 17:08:53 +0300
commitf78dea9a6448a3705fcdb8165483cbac0fe60ec0 (patch)
tree56885b07f2fdcb7860b037f29044d11099b3aab7 /src/net/tmwa
parent020b31d969885d24fcb5e52a005894396a608d02 (diff)
downloadmanaverse-f78dea9a6448a3705fcdb8165483cbac0fe60ec0.tar.gz
manaverse-f78dea9a6448a3705fcdb8165483cbac0fe60ec0.tar.bz2
manaverse-f78dea9a6448a3705fcdb8165483cbac0fe60ec0.tar.xz
manaverse-f78dea9a6448a3705fcdb8165483cbac0fe60ec0.zip
Move processPartyMove from ea namespace into tmwa.
Diffstat (limited to 'src/net/tmwa')
-rw-r--r--src/net/tmwa/partyhandler.cpp31
-rw-r--r--src/net/tmwa/partyhandler.h2
2 files changed, 33 insertions, 0 deletions
diff --git a/src/net/tmwa/partyhandler.cpp b/src/net/tmwa/partyhandler.cpp
index fac29f8f3..3e16fc08a 100644
--- a/src/net/tmwa/partyhandler.cpp
+++ b/src/net/tmwa/partyhandler.cpp
@@ -404,4 +404,35 @@ void PartyHandler::processPartyInvited(Net::MessageIn &msg)
socialWindow->showPartyInvite(partyName, nick, 0);
}
+void PartyHandler::processPartyMove(Net::MessageIn &msg)
+{
+ const int id = msg.readInt32("id");
+ PartyMember *m = nullptr;
+ if (Ea::taParty)
+ m = Ea::taParty->getMember(id);
+ if (m)
+ {
+ msg.readInt32("unused");
+ m->setX(msg.readInt16("x"));
+ m->setY(msg.readInt16("y"));
+ const bool online = msg.readUInt8("online") != 0;
+ if (m->getOnline() != online)
+ partyTab->showOnline(m->getName(), online);
+ m->setOnline(online);
+ msg.readString(24, "party");
+ msg.readString(24, "nick");
+ m->setMap(msg.readString(16, "map"));
+ }
+ else
+ {
+ msg.readInt32("unused");
+ msg.readInt16("x");
+ msg.readInt16("y");
+ msg.readUInt8("online");
+ msg.readString(24, "party");
+ msg.readString(24, "nick");
+ msg.readString(16, "map");
+ }
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/partyhandler.h b/src/net/tmwa/partyhandler.h
index 4baeada71..34d64aeb5 100644
--- a/src/net/tmwa/partyhandler.h
+++ b/src/net/tmwa/partyhandler.h
@@ -76,6 +76,8 @@ class PartyHandler final : public MessageHandler, public Ea::PartyHandler
static void processPartyInviteResponse(Net::MessageIn &msg);
static void processPartyInvited(Net::MessageIn &msg);
+
+ static void processPartyMove(Net::MessageIn &msg);
};
} // namespace TmwAthena