diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-09-17 10:50:22 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-09-17 10:50:22 +0300 |
commit | 4228763829f71ec4db50ed185483d7707c5e47eb (patch) | |
tree | 55e6ae79345b0580b13928162a85d4b7ba2ef664 /src/net | |
parent | 38b46ebb02bbe307765aa9a456b587eafd3dfd7e (diff) | |
download | plus-4228763829f71ec4db50ed185483d7707c5e47eb.tar.gz plus-4228763829f71ec4db50ed185483d7707c5e47eb.tar.bz2 plus-4228763829f71ec4db50ed185483d7707c5e47eb.tar.xz plus-4228763829f71ec4db50ed185483d7707c5e47eb.zip |
Remove getter for guildHandler.
Diffstat (limited to 'src/net')
-rw-r--r-- | src/net/ea/gui/guildtab.cpp | 12 | ||||
-rw-r--r-- | src/net/guildhandler.h | 2 | ||||
-rw-r--r-- | src/net/net.cpp | 6 | ||||
-rw-r--r-- | src/net/net.h | 2 |
4 files changed, 9 insertions, 13 deletions
diff --git a/src/net/ea/gui/guildtab.cpp b/src/net/ea/gui/guildtab.cpp index 43e759e39..996c8fd58 100644 --- a/src/net/ea/gui/guildtab.cpp +++ b/src/net/ea/gui/guildtab.cpp @@ -70,20 +70,20 @@ bool GuildTab::handleCommand(const std::string &restrict type, if (args.empty()) chatLog(_("Guild name is missing."), ChatMsgType::BY_SERVER); else - Net::getGuildHandler()->create(args); + guildHandler->create(args); } */ if (type == "invite" && taGuild) { - Net::getGuildHandler()->invite(taGuild->getId(), args); + guildHandler->invite(taGuild->getId(), args); } else if (type == "leave" && taGuild) { - Net::getGuildHandler()->leave(taGuild->getId()); + guildHandler->leave(taGuild->getId()); } else if (type == "kick" && taGuild) { - Net::getGuildHandler()->kick(taGuild->getMember(args), ""); + guildHandler->kick(taGuild->getMember(args), ""); } else if (type == "notice" && taGuild) { @@ -91,7 +91,7 @@ bool GuildTab::handleCommand(const std::string &restrict type, std::string str2(""); if (args.size() > 60) str2 = args.substr(60); - Net::getGuildHandler()->changeNotice(taGuild->getId(), str1, str2); + guildHandler->changeNotice(taGuild->getId(), str1, str2); } else { @@ -106,7 +106,7 @@ void GuildTab::handleInput(const std::string &msg) if (!taGuild) return; - Net::getGuildHandler()->chat(taGuild->getId(), + guildHandler->chat(taGuild->getId(), ChatWindow::doReplace(msg)); } diff --git a/src/net/guildhandler.h b/src/net/guildhandler.h index 2972b4f23..2964af16d 100644 --- a/src/net/guildhandler.h +++ b/src/net/guildhandler.h @@ -89,4 +89,6 @@ class GuildHandler notfinal } // namespace Net +extern Net::GuildHandler *guildHandler; + #endif // NET_GUILDHANDLER_H diff --git a/src/net/net.cpp b/src/net/net.cpp index b8b292f98..feed36ea0 100644 --- a/src/net/net.cpp +++ b/src/net/net.cpp @@ -49,6 +49,7 @@ namespace Net class FamilyHandler; class GameHandler; class GeneralHandler; + class GuildHandler; } Net::AdminHandler *adminHandler = nullptr; @@ -74,11 +75,6 @@ Net::CashShopHandler *cashShopHandler = nullptr; Net::FamilyHandler *familyHandler = nullptr; Net::BankHandler *bankHandler = nullptr; -Net::GuildHandler *Net::getGuildHandler() -{ - return guildHandler; -} - Net::InventoryHandler *Net::getInventoryHandler() { return inventoryHandler; diff --git a/src/net/net.h b/src/net/net.h index b0fb224bd..71cbcc21e 100644 --- a/src/net/net.h +++ b/src/net/net.h @@ -36,7 +36,6 @@ namespace Net { -class GuildHandler; class InventoryHandler; class LoginHandler; class MailHandler; @@ -48,7 +47,6 @@ class SkillHandler; class TradeHandler; class ServerFeatures; -GuildHandler *getGuildHandler() A_WARN_UNUSED; InventoryHandler *getInventoryHandler() A_WARN_UNUSED; LoginHandler *getLoginHandler() A_WARN_UNUSED; NpcHandler *getNpcHandler() A_WARN_UNUSED; |