diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-03-31 23:02:12 -0600 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-03-31 23:02:12 -0600 |
commit | ea4cfda4712ac31326b64ddf9dff61e448aeed28 (patch) | |
tree | 2bff17828862ebed77d44e65729a2d2944602ba9 /src/net/ea/gui/partytab.cpp | |
parent | 78e67de6f70aab502a85578264b60493a818b39f (diff) | |
download | mana-ea4cfda4712ac31326b64ddf9dff61e448aeed28.tar.gz mana-ea4cfda4712ac31326b64ddf9dff61e448aeed28.tar.bz2 mana-ea4cfda4712ac31326b64ddf9dff61e448aeed28.tar.xz mana-ea4cfda4712ac31326b64ddf9dff61e448aeed28.zip |
Implement a few more handlers for eAthena
Party, skill, and trade handlers made for eAthena.
Diffstat (limited to 'src/net/ea/gui/partytab.cpp')
-rw-r--r-- | src/net/ea/gui/partytab.cpp | 27 |
1 files changed, 15 insertions, 12 deletions
diff --git a/src/net/ea/gui/partytab.cpp b/src/net/ea/gui/partytab.cpp index 9759962a..34b16663 100644 --- a/src/net/ea/gui/partytab.cpp +++ b/src/net/ea/gui/partytab.cpp @@ -23,10 +23,9 @@ #include "partytab.h" -#include "net/messageout.h" +#include "net/net.h" -#include "net/ea/party.h" -#include "net/ea/protocol.h" +#include "net/ea/partyhandler.h" #include "resources/iteminfo.h" #include "resources/itemdb.h" @@ -44,15 +43,14 @@ PartyTab::~PartyTab() { } -void PartyTab::handleInput(const std::string &msg) { - std::size_t length = msg.length() + 1; - - MessageOut outMsg(CMSG_PARTY_MESSAGE); - outMsg.writeInt16(length + 4); - outMsg.writeString(msg, length); +void PartyTab::handleInput(const std::string &msg) +{ + // Net::getPartyHandler()->chat(msg); + partyHandler->chat(msg); } -void PartyTab::handleCommand(std::string msg) { +void PartyTab::handleCommand(std::string msg) +{ std::string::size_type pos = msg.find(' '); std::string type(msg, 0, pos); std::string args(msg, pos == std::string::npos ? msg.size() : pos + 1); @@ -95,11 +93,16 @@ void PartyTab::handleCommand(std::string msg) { } else if (type == "create" || type == "new") { - eAthena::Party::create(args); + if (args.empty()) + chatLog(_("Party name is missing."), BY_SERVER); + else + // Net::getPartyHandler()->create(args); + partyHandler->create(args); } else if (type == "leave") { - eAthena::Party::leave(args); + // Net::getPartyHandler()->leave(); + partyHandler->leave(); } else if (type == "settings") { |