diff options
author | Jared Adams <jaxad0127@gmail.com> | 2010-02-27 08:56:38 -0700 |
---|---|---|
committer | Jared Adams <jaxad0127@gmail.com> | 2010-02-27 09:07:05 -0700 |
commit | 12f9c5639d74747d5e22ec29c1df8d09256b8772 (patch) | |
tree | 7bc345aadecc86c395750acb5c097dd17f37a8ad /src | |
parent | 01c3edf0d8692ecf6c45ae4e04abf2d0b1f41c6b (diff) | |
download | mana-client-12f9c5639d74747d5e22ec29c1df8d09256b8772.tar.gz mana-client-12f9c5639d74747d5e22ec29c1df8d09256b8772.tar.bz2 mana-client-12f9c5639d74747d5e22ec29c1df8d09256b8772.tar.xz mana-client-12f9c5639d74747d5e22ec29c1df8d09256b8772.zip |
Disable guilds for eAthena for now
Reviewed-by: Thorbjørn Lindeijer
Diffstat (limited to 'src')
-rw-r--r-- | src/gui/socialwindow.cpp | 10 | ||||
-rw-r--r-- | src/net/ea/generalhandler.cpp | 3 | ||||
-rw-r--r-- | src/net/ea/generalhandler.h | 1 | ||||
-rw-r--r-- | src/net/guildhandler.h | 6 | ||||
-rw-r--r-- | src/net/manaserv/guildhandler.h | 2 |
5 files changed, 17 insertions, 5 deletions
diff --git a/src/gui/socialwindow.cpp b/src/gui/socialwindow.cpp index 26184cae..5da8018c 100644 --- a/src/gui/socialwindow.cpp +++ b/src/gui/socialwindow.cpp @@ -235,7 +235,8 @@ public: mBrowserBox->setOpaque(false); mBrowserBox->setLinkHandler(this); - mBrowserBox->addRow(strprintf("@@guild|%s@@", _("Create Guild"))); + if (Net::getGuildHandler()->isSupported()) + mBrowserBox->addRow(strprintf("@@guild|%s@@", _("Create Guild"))); mBrowserBox->addRow(strprintf("@@party|%s@@", _("Create Party"))); mBrowserBox->addRow("##3---"); mBrowserBox->addRow(strprintf("@@cancel|%s@@", _("Cancel"))); @@ -425,7 +426,10 @@ void SocialWindow::action(const gcn::ActionEvent &event) } else if (event.getId() == "create") { - mCreatePopup->show(mCreateButton); + if (Net::getGuildHandler()->isSupported()) + mCreatePopup->show(mCreateButton); + else + showPartyCreate(); } else if (event.getId() == "invite") { @@ -564,7 +568,7 @@ void SocialWindow::showPartyCreate() } mPartyCreateDialog = new TextDialog(_("Party Name"), - _("Choose your part's name."), this); + _("Choose your party's name."), this); mPartyCreateDialog->setOKButtonActionId("create party"); mPartyCreateDialog->addActionListener(this); } diff --git a/src/net/ea/generalhandler.cpp b/src/net/ea/generalhandler.cpp index 6ca853fb..021ae08d 100644 --- a/src/net/ea/generalhandler.cpp +++ b/src/net/ea/generalhandler.cpp @@ -38,6 +38,7 @@ #include "net/ea/chathandler.h" #include "net/ea/charserverhandler.h" #include "net/ea/gamehandler.h" +#include "net/ea/guildhandler.h" #include "net/ea/inventoryhandler.h" #include "net/ea/itemhandler.h" #include "net/ea/loginhandler.h" @@ -79,6 +80,7 @@ GeneralHandler::GeneralHandler(): mCharHandler(new CharServerHandler), mChatHandler(new ChatHandler), mGameHandler(new GameHandler), + mGuildHandler(new GuildHandler), mInventoryHandler(new InventoryHandler), mItemHandler(new ItemHandler), mLoginHandler(new LoginHandler), @@ -162,6 +164,7 @@ void GeneralHandler::load() mNetwork->registerHandler(mChatHandler.get()); mNetwork->registerHandler(mCharHandler.get()); mNetwork->registerHandler(mGameHandler.get()); + mNetwork->registerHandler(mGuildHandler.get()); mNetwork->registerHandler(mInventoryHandler.get()); mNetwork->registerHandler(mItemHandler.get()); mNetwork->registerHandler(mLoginHandler.get()); diff --git a/src/net/ea/generalhandler.h b/src/net/ea/generalhandler.h index 579b27b5..464f8bc8 100644 --- a/src/net/ea/generalhandler.h +++ b/src/net/ea/generalhandler.h @@ -60,6 +60,7 @@ class GeneralHandler : public MessageHandler, public Net::GeneralHandler MessageHandlerPtr mCharHandler; MessageHandlerPtr mChatHandler; MessageHandlerPtr mGameHandler; + MessageHandlerPtr mGuildHandler; MessageHandlerPtr mInventoryHandler; MessageHandlerPtr mItemHandler; MessageHandlerPtr mLoginHandler; diff --git a/src/net/guildhandler.h b/src/net/guildhandler.h index 75683944..1696b2d5 100644 --- a/src/net/guildhandler.h +++ b/src/net/guildhandler.h @@ -32,6 +32,10 @@ namespace Net { class GuildHandler { public: + virtual ~GuildHandler() {} + + virtual bool isSupported() { return false; } + virtual void create(const std::string &name) = 0; virtual void invite(int guildId, const std::string &name) = 0; @@ -56,8 +60,6 @@ class GuildHandler bool response) = 0; virtual void endAlliance(int guildId, int otherGuildId) = 0; - - virtual ~GuildHandler() {} }; } diff --git a/src/net/manaserv/guildhandler.h b/src/net/manaserv/guildhandler.h index 1b6d51b5..9929d135 100644 --- a/src/net/manaserv/guildhandler.h +++ b/src/net/manaserv/guildhandler.h @@ -33,6 +33,8 @@ class GuildHandler : public Net::GuildHandler, public MessageHandler public: GuildHandler(); + bool isSupported() { return true; } + void handleMessage(Net::MessageIn &msg); void create(const std::string &name); |