diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-03-29 14:51:02 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-03-29 14:51:02 +0300 |
commit | d08e40706207d56cdeee73cab17f2ea61ab1082c (patch) | |
tree | 4caa8862828d2c6dee2df1aa6fff8d2d92eea275 /src | |
parent | 32bf758a1267689cac65e10f69c73b8efa40bb94 (diff) | |
download | plus-d08e40706207d56cdeee73cab17f2ea61ab1082c.tar.gz plus-d08e40706207d56cdeee73cab17f2ea61ab1082c.tar.bz2 plus-d08e40706207d56cdeee73cab17f2ea61ab1082c.tar.xz plus-d08e40706207d56cdeee73cab17f2ea61ab1082c.zip |
Remove unused guildid parameter from guild handler.
Diffstat (limited to 'src')
-rw-r--r-- | src/actions/chat.cpp | 4 | ||||
-rw-r--r-- | src/actions/commands.cpp | 2 | ||||
-rw-r--r-- | src/gui/widgets/tabs/chat/guildtab.cpp | 5 | ||||
-rw-r--r-- | src/gui/widgets/tabs/socialguildtab.h | 2 | ||||
-rw-r--r-- | src/net/eathena/guildhandler.cpp | 15 | ||||
-rw-r--r-- | src/net/eathena/guildhandler.h | 13 | ||||
-rw-r--r-- | src/net/guildhandler.h | 13 | ||||
-rw-r--r-- | src/net/tmwa/guildhandler.cpp | 15 | ||||
-rw-r--r-- | src/net/tmwa/guildhandler.h | 13 | ||||
-rw-r--r-- | src/utils/chatutils.cpp | 2 |
10 files changed, 34 insertions, 50 deletions
diff --git a/src/actions/chat.cpp b/src/actions/chat.cpp index 77991d038..9c90b87dd 100644 --- a/src/actions/chat.cpp +++ b/src/actions/chat.cpp @@ -79,7 +79,7 @@ static void outString(ChatTab *const tab, { if (!serverFeatures->haveNativeGuilds()) return; - guildHandler->chat(guild->getId(), str); + guildHandler->chat(str); } #ifdef TMWA_SUPPORT else if (guildManager) @@ -376,7 +376,7 @@ impHandler(guild) { #ifdef TMWA_SUPPORT if (guild->getServerGuild()) - guildHandler->invite(guild->getId(), args); + guildHandler->invite(args); else if (guildManager) guildManager->invite(args); #else diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index 1762b6000..a02a97498 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -521,7 +521,7 @@ impHandler(info) { const Guild *const guild = localPlayer->getGuild(); if (guild) - guildHandler->info(guild->getId()); + guildHandler->info(); } return true; } diff --git a/src/gui/widgets/tabs/chat/guildtab.cpp b/src/gui/widgets/tabs/chat/guildtab.cpp index 0b220594a..512104fd5 100644 --- a/src/gui/widgets/tabs/chat/guildtab.cpp +++ b/src/gui/widgets/tabs/chat/guildtab.cpp @@ -68,7 +68,7 @@ bool GuildTab::handleCommand(const std::string &restrict type, */ if (type == "invite" && Ea::taGuild) { - guildHandler->invite(Ea::taGuild->getId(), args); + guildHandler->invite(args); } else if (type == "leave" && Ea::taGuild) { @@ -99,8 +99,7 @@ void GuildTab::handleInput(const std::string &msg) if (!Ea::taGuild) return; - guildHandler->chat(Ea::taGuild->getId(), - ChatWindow::doReplace(msg)); + guildHandler->chat(ChatWindow::doReplace(msg)); } void GuildTab::getAutoCompleteList(StringVect &names) const diff --git a/src/gui/widgets/tabs/socialguildtab.h b/src/gui/widgets/tabs/socialguildtab.h index 88354bb50..8f09f7bde 100644 --- a/src/gui/widgets/tabs/socialguildtab.h +++ b/src/gui/widgets/tabs/socialguildtab.h @@ -74,7 +74,7 @@ class SocialGuildTab final : public SocialTab, if (eventId == "do invite") { const std::string name = mInviteDialog->getText(); - guildHandler->invite(mGuild->getId(), name); + guildHandler->invite(name); if (localChatTab) { diff --git a/src/net/eathena/guildhandler.cpp b/src/net/eathena/guildhandler.cpp index 502ae1dc1..4fbf4ca58 100644 --- a/src/net/eathena/guildhandler.cpp +++ b/src/net/eathena/guildhandler.cpp @@ -231,8 +231,7 @@ void GuildHandler::create(const std::string &name) const outMsg.writeString(name, 24, "guild name"); } -void GuildHandler::invite(const int guildId A_UNUSED, - const std::string &name) const +void GuildHandler::invite(const std::string &name) const { if (!actorManager) return; @@ -248,8 +247,7 @@ void GuildHandler::invite(const int guildId A_UNUSED, } } -void GuildHandler::invite(const int guildId A_UNUSED, - const Being *const being) const +void GuildHandler::invite(const Being *const being) const { if (!being) return; @@ -295,8 +293,7 @@ void GuildHandler::kick(const GuildMember *restrict const member, outMsg.writeString(reason, 40, "message"); } -void GuildHandler::chat(const int guildId A_UNUSED, - const std::string &text) const +void GuildHandler::chat(const std::string &text) const { if (!localPlayer) return; @@ -309,7 +306,7 @@ void GuildHandler::chat(const int guildId A_UNUSED, outMsg.writeInt8(0, "zero byte"); } -void GuildHandler::memberList(const int guildId A_UNUSED) const +void GuildHandler::memberList() const { // 0 = basic info + alliance info // 1 = position name list + member list @@ -321,7 +318,7 @@ void GuildHandler::memberList(const int guildId A_UNUSED) const outMsg.writeInt32(1, "action"); // Request member list } -void GuildHandler::info(const int guildId A_UNUSED) +void GuildHandler::info() { // 0 = basic info + alliance info // 1 = position name list + member list @@ -387,7 +384,7 @@ void GuildHandler::processGuildPositionInfo(Net::MessageIn &msg) guildTab->loadFromLogFile("#Guild"); if (localPlayer) localPlayer->addGuild(Ea::taGuild); - guildHandler->memberList(guildId); + guildHandler->memberList(); } if (localPlayer) diff --git a/src/net/eathena/guildhandler.h b/src/net/eathena/guildhandler.h index e390bf595..c4436fa98 100644 --- a/src/net/eathena/guildhandler.h +++ b/src/net/eathena/guildhandler.h @@ -42,11 +42,9 @@ class GuildHandler final : public Ea::GuildHandler, public MessageHandler void create(const std::string &name) const override final; - void invite(const int guildId, - const std::string &name) const override final; + void invite(const std::string &name) const override final; - void invite(const int guildId, - const Being *const being) const override final; + void invite(const Being *const being) const override final; void inviteResponse(const int guildId, const bool response) const override final; @@ -56,12 +54,11 @@ class GuildHandler final : public Ea::GuildHandler, public MessageHandler void kick(const GuildMember *restrict const member, const std::string &restrict reason) const override final; - void chat(const int guildId, - const std::string &text) const override final; + void chat(const std::string &text) const override final; - void memberList(const int guildId) const override final; + void memberList() const override final; - void info(const int guildId) override final; + void info() override final; void changeMemberPostion(const GuildMember *const member, const int level) const override final; diff --git a/src/net/guildhandler.h b/src/net/guildhandler.h index bbc7554fd..e68bac19c 100644 --- a/src/net/guildhandler.h +++ b/src/net/guildhandler.h @@ -40,11 +40,9 @@ class GuildHandler notfinal virtual void create(const std::string &name) const = 0; - virtual void invite(const int guildId, - const std::string &name) const = 0; + virtual void invite(const std::string &name) const = 0; - virtual void invite(const int guildId, - const Being *const being) const = 0; + virtual void invite(const Being *const being) const = 0; virtual void inviteResponse(const int guildId, const bool response) const = 0; @@ -54,12 +52,11 @@ class GuildHandler notfinal virtual void kick(const GuildMember *restrict const member, const std::string &restrict reason) const = 0; - virtual void chat(const int guildId, - const std::string &text) const = 0; + virtual void chat(const std::string &text) const = 0; - virtual void memberList(const int guildId) const = 0; + virtual void memberList() const = 0; - virtual void info(const int guildId) = 0; + virtual void info() = 0; virtual void changeMemberPostion(const GuildMember *const member, const int level) const = 0; diff --git a/src/net/tmwa/guildhandler.cpp b/src/net/tmwa/guildhandler.cpp index 60cdbd453..4947f99da 100644 --- a/src/net/tmwa/guildhandler.cpp +++ b/src/net/tmwa/guildhandler.cpp @@ -212,8 +212,7 @@ void GuildHandler::create(const std::string &name) const outMsg.writeString(name, 24, "guild name"); } -void GuildHandler::invite(const int guildId A_UNUSED, - const std::string &name) const +void GuildHandler::invite(const std::string &name) const { if (!actorManager) return; @@ -229,8 +228,7 @@ void GuildHandler::invite(const int guildId A_UNUSED, } } -void GuildHandler::invite(const int guildId A_UNUSED, - const Being *const being) const +void GuildHandler::invite(const Being *const being) const { if (!being) return; @@ -275,8 +273,7 @@ void GuildHandler::kick(const GuildMember *restrict const member, outMsg.writeString(reason, 40, "message"); } -void GuildHandler::chat(const int guildId A_UNUSED, - const std::string &text) const +void GuildHandler::chat(const std::string &text) const { if (!localPlayer) return; @@ -288,7 +285,7 @@ void GuildHandler::chat(const int guildId A_UNUSED, outMsg.writeString(str, static_cast<int>(str.length()), "message"); } -void GuildHandler::memberList(const int guildId A_UNUSED) const +void GuildHandler::memberList() const { // 0 = basic info + alliance info // 1 = position name list + member list @@ -300,7 +297,7 @@ void GuildHandler::memberList(const int guildId A_UNUSED) const outMsg.writeInt32(1, "action"); // Request member list } -void GuildHandler::info(const int guildId A_UNUSED) +void GuildHandler::info() { // 0 = basic info + alliance info // 1 = position name list + member list @@ -367,7 +364,7 @@ void GuildHandler::processGuildPositionInfo(Net::MessageIn &msg) guildTab->loadFromLogFile("#Guild"); if (localPlayer) localPlayer->addGuild(Ea::taGuild); - guildHandler->memberList(guildId); + guildHandler->memberList(); } if (localPlayer) diff --git a/src/net/tmwa/guildhandler.h b/src/net/tmwa/guildhandler.h index b233fc898..8c875ec1c 100644 --- a/src/net/tmwa/guildhandler.h +++ b/src/net/tmwa/guildhandler.h @@ -42,11 +42,9 @@ class GuildHandler final : public Ea::GuildHandler, public MessageHandler void create(const std::string &name) const override final; - void invite(const int guildId, - const std::string &name) const override final; + void invite(const std::string &name) const override final; - void invite(const int guildId, - const Being *const being) const override final; + void invite(const Being *const being) const override final; void inviteResponse(const int guildId, const bool response) const override final; @@ -56,12 +54,11 @@ class GuildHandler final : public Ea::GuildHandler, public MessageHandler void kick(const GuildMember *restrict const member, const std::string &restrict reason) const override final; - void chat(const int guildId, - const std::string &text) const override final; + void chat(const std::string &text) const override final; - void memberList(const int guildId) const override final; + void memberList() const override final; - void info(const int guildId) override final; + void info() override final; void changeMemberPostion(const GuildMember *const member, const int level) const override final; diff --git a/src/utils/chatutils.cpp b/src/utils/chatutils.cpp index 4ee5b6610..903c6eefa 100644 --- a/src/utils/chatutils.cpp +++ b/src/utils/chatutils.cpp @@ -70,7 +70,7 @@ void outStringNormal(ChatTab *const tab, { if (!serverFeatures->haveNativeGuilds()) return; - guildHandler->chat(guild->getId(), str); + guildHandler->chat(str); } #ifdef TMWA_SUPPORT else if (guildManager) |