diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-01 14:27:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-01 14:27:18 +0300 |
commit | 5f4951d34c52e92ddd38606b140e8dcded25448c (patch) | |
tree | 560bd34ab871b4c903d44f98832ee4680c091e46 | |
parent | a5ce1a9872c4c34af4d4336e3fd512036511c659 (diff) | |
download | plus-5f4951d34c52e92ddd38606b140e8dcded25448c.tar.gz plus-5f4951d34c52e92ddd38606b140e8dcded25448c.tar.bz2 plus-5f4951d34c52e92ddd38606b140e8dcded25448c.tar.xz plus-5f4951d34c52e92ddd38606b140e8dcded25448c.zip |
Add chat command /breakguild. Also add it to player context menu.
-rw-r--r-- | src/actions/commands.cpp | 6 | ||||
-rw-r--r-- | src/actions/commands.h | 1 | ||||
-rw-r--r-- | src/dyetool/actions/commands.cpp | 1 | ||||
-rw-r--r-- | src/enums/input/inputaction.h | 1 | ||||
-rw-r--r-- | src/gui/popups/popupmenu.cpp | 4 | ||||
-rw-r--r-- | src/input/inputactionmap.h | 6 | ||||
-rw-r--r-- | src/net/adminhandler.h | 2 | ||||
-rw-r--r-- | src/net/eathena/adminhandler.cpp | 5 | ||||
-rw-r--r-- | src/net/eathena/adminhandler.h | 2 | ||||
-rw-r--r-- | src/net/tmwa/adminhandler.cpp | 4 | ||||
-rw-r--r-- | src/net/tmwa/adminhandler.h | 2 |
11 files changed, 34 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index afc1c6d80..a163ad5ab 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -1527,4 +1527,10 @@ impHandler(commandPartyRecall) return true; } +impHandler(commandBreakGuild) +{ + adminHandler->breakGuild(event.args); + return true; +} + } // namespace Actions diff --git a/src/actions/commands.h b/src/actions/commands.h index 76b20effd..e314226cb 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -136,6 +136,7 @@ namespace Actions decHandler(commandNpcShow); decHandler(commandChangePartyLeader); decHandler(commandPartyRecall); + decHandler(commandBreakGuild); } // namespace Actions #undef decHandler diff --git a/src/dyetool/actions/commands.cpp b/src/dyetool/actions/commands.cpp index 3778e2611..50ccc0c9f 100644 --- a/src/dyetool/actions/commands.cpp +++ b/src/dyetool/actions/commands.cpp @@ -136,5 +136,6 @@ impHandlerVoid(commandNpcHide) impHandlerVoid(commandNpcShow) impHandlerVoid(commandChangePartyLeader) impHandlerVoid(commandPartyRecall) +impHandlerVoid(commandBreakGuild) } // namespace Actions diff --git a/src/enums/input/inputaction.h b/src/enums/input/inputaction.h index ba7135e05..96d9fca3e 100644 --- a/src/enums/input/inputaction.h +++ b/src/enums/input/inputaction.h @@ -665,6 +665,7 @@ enumStart(InputAction) COMMAND_NPC_SHOW, COMMAND_CHANGE_PARTY_LEADER, COMMAND_PARTY_RECALL, + COMMAND_BREAK_GUILD, TOTAL } enumEnd(InputAction); diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp index 13e54ba3e..dae11fd12 100644 --- a/src/gui/popups/popupmenu.cpp +++ b/src/gui/popups/popupmenu.cpp @@ -2860,6 +2860,10 @@ void PopupMenu::showPlayerGMCommands(const std::string &name) // TRANSLATORS: popup menu item // TRANSLATORS: spawn evil player clone mBrowserBox->addRow("/spawnevilclone 'NAME'", _("Spawn evil clone")); + mBrowserBox->addRow("##3---"); + // TRANSLATORS: popup menu item + // TRANSLATORS: break guild + mBrowserBox->addRow("/gmbreakguild 'NAME'", _("Break guild")); } if (mBeingId != BeingId_zero) { diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h index 0fb223d53..b8df98796 100644 --- a/src/input/inputactionmap.h +++ b/src/input/inputactionmap.h @@ -5479,6 +5479,12 @@ static const InputActionData inputActionData "partyrecall|recallparty", UseArgs_true, Protected_true}, + {"keyCommandBreakGuild", + defaultAction(&Actions::commandBreakGuild), + InputCondition::INGAME, + "breakguild|gmbreakguild", + UseArgs_true, + Protected_true}, }; #undef defaultAction diff --git a/src/net/adminhandler.h b/src/net/adminhandler.h index 878e24782..ee9c2b76a 100644 --- a/src/net/adminhandler.h +++ b/src/net/adminhandler.h @@ -174,6 +174,8 @@ class AdminHandler notfinal virtual void changePartyLeader(const std::string &name) const = 0; virtual void partyRecall(const std::string &name) const = 0; + + virtual void breakGuild(const std::string &name) const = 0; }; } // namespace Net diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp index 29e346af8..d02a26479 100644 --- a/src/net/eathena/adminhandler.cpp +++ b/src/net/eathena/adminhandler.cpp @@ -357,4 +357,9 @@ void AdminHandler::partyRecall(const std::string &name) const Gm::runCommand("partyrecall", name); } +void AdminHandler::breakGuild(const std::string &name) const +{ + Gm::runCharCommand("breakguild", name); +} + } // namespace EAthena diff --git a/src/net/eathena/adminhandler.h b/src/net/eathena/adminhandler.h index c34e6d049..d5f937307 100644 --- a/src/net/eathena/adminhandler.h +++ b/src/net/eathena/adminhandler.h @@ -150,6 +150,8 @@ class AdminHandler final : public Ea::AdminHandler void partyRecall(const std::string &name) const override final; + void breakGuild(const std::string &name) const override final; + protected: static std::string mStatsName; }; diff --git a/src/net/tmwa/adminhandler.cpp b/src/net/tmwa/adminhandler.cpp index 88c9683fe..edcb5f76a 100644 --- a/src/net/tmwa/adminhandler.cpp +++ b/src/net/tmwa/adminhandler.cpp @@ -279,4 +279,8 @@ void AdminHandler::partyRecall(const std::string &name A_UNUSED) const { } +void AdminHandler::breakGuild(const std::string &name A_UNUSED) const +{ +} + } // namespace TmwAthena diff --git a/src/net/tmwa/adminhandler.h b/src/net/tmwa/adminhandler.h index 5d43c14ff..bff931718 100644 --- a/src/net/tmwa/adminhandler.h +++ b/src/net/tmwa/adminhandler.h @@ -163,6 +163,8 @@ class AdminHandler final : public Ea::AdminHandler A_CONST; void partyRecall(const std::string &name) const override final A_CONST; + + void breakGuild(const std::string &name) const override final A_CONST; }; } // namespace TmwAthena |