diff options
author | Jared Adams <jaxad0127@gmail.com> | 2009-11-03 18:59:10 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2009-11-03 18:59:10 -0700 |
commit | 6ec98a246ee9915cdcc4a58f5de6882e415adc2f (patch) | |
tree | 45add22f8dfc85c45910cad41db79c979310c113 /src/gui/guildwindow.cpp | |
parent | 75dbcb1b780fe3fc2f09cbcdc05f9559446ef482 (diff) | |
download | mana-client-6ec98a246ee9915cdcc4a58f5de6882e415adc2f.tar.gz mana-client-6ec98a246ee9915cdcc4a58f5de6882e415adc2f.tar.bz2 mana-client-6ec98a246ee9915cdcc4a58f5de6882e415adc2f.tar.xz mana-client-6ec98a246ee9915cdcc4a58f5de6882e415adc2f.zip |
Move ManaServ guild code into GuildHandler
Ad start eAthena's GuildHandler
Diffstat (limited to 'src/gui/guildwindow.cpp')
-rw-r--r-- | src/gui/guildwindow.cpp | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/src/gui/guildwindow.cpp b/src/gui/guildwindow.cpp index 83ff12a1..1868de6a 100644 --- a/src/gui/guildwindow.cpp +++ b/src/gui/guildwindow.cpp @@ -38,7 +38,8 @@ #include "log.h" #include "localplayer.h" -#include "net/manaserv/chatserver/guild.h" +#include "net/guildhandler.h" +#include "net/net.h" #include "utils/dtor.h" #include "utils/gettext.h" @@ -132,7 +133,7 @@ void GuildWindow::action(const gcn::ActionEvent &event) short guild = getSelectedGuild(); if (guild) { - ManaServ::ChatServer::Guild::quitGuild(guild); + Net::getGuildHandler()->leave(guild); localChatTab->chatLog(strprintf(_("Guild %s quit."), mGuildTabs->getSelectedTab()->getCaption().c_str()), BY_SERVER); } @@ -146,7 +147,7 @@ void GuildWindow::action(const gcn::ActionEvent &event) return; } // Process guild name to be created, and unfocus. - ManaServ::ChatServer::Guild::createGuild(name); + Net::getGuildHandler()->create(name); // Defocus dialog mFocus = false; @@ -160,7 +161,7 @@ void GuildWindow::action(const gcn::ActionEvent &event) short selectedGuild = getSelectedGuild(); // Process invited user to be created and unfocus. - ManaServ::ChatServer::Guild::invitePlayer(name, selectedGuild); + Net::getGuildHandler()->invite(selectedGuild, name); // Defocus dialog mFocus = false; @@ -170,7 +171,7 @@ void GuildWindow::action(const gcn::ActionEvent &event) else if (eventId == "yes") { logger->log("Sending invitation acceptance."); - ManaServ::ChatServer::Guild::acceptInvite(invitedGuild); + Net::getGuildHandler()->inviteResponse(invitedGuildId, true); } } @@ -238,7 +239,8 @@ short GuildWindow::getSelectedGuild() } void GuildWindow::openAcceptDialog(const std::string &inviterName, - const std::string &guildName) + const std::string &guildName, + const int guildId) { std::string msg = strprintf(_("%s has invited you to join the guild %s."), inviterName.c_str(), guildName.c_str()); @@ -247,13 +249,13 @@ void GuildWindow::openAcceptDialog(const std::string &inviterName, acceptDialog = new ConfirmDialog(_("Accept Guild Invite"), msg, this); acceptDialog->addActionListener(this); - invitedGuild = guildName; + invitedGuildId = guildId; } void GuildWindow::requestMemberList(short guildId) { // Get the list of members for displaying in the guild window. - ManaServ::ChatServer::Guild::getGuildMembers(guildId); + Net::getGuildHandler()->memberList(guildId); } void GuildWindow::removeTab(int guildId) |