summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/actions/commands.cpp9
-rw-r--r--src/actions/commands.h1
-rw-r--r--src/dyetool/actions/commands.cpp1
-rw-r--r--src/enums/input/inputaction.h1
-rw-r--r--src/gui/popups/popupmenu.cpp20
-rw-r--r--src/input/inputactionmap.h6
-rw-r--r--src/net/adminhandler.h2
-rw-r--r--src/net/eathena/adminhandler.cpp5
-rw-r--r--src/net/eathena/adminhandler.h2
-rw-r--r--src/net/tmwa/adminhandler.cpp4
-rw-r--r--src/net/tmwa/adminhandler.h2
11 files changed, 48 insertions, 5 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index a163ad5ab..9e70c55de 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -1533,4 +1533,13 @@ impHandler(commandBreakGuild)
return true;
}
+impHandler(commandGuildRecall)
+{
+ const std::string args = event.args;
+ if (args.empty())
+ return false;
+ adminHandler->guildRecall(args);
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index e314226cb..41db1e042 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -137,6 +137,7 @@ namespace Actions
decHandler(commandChangePartyLeader);
decHandler(commandPartyRecall);
decHandler(commandBreakGuild);
+ decHandler(commandGuildRecall);
} // namespace Actions
#undef decHandler
diff --git a/src/dyetool/actions/commands.cpp b/src/dyetool/actions/commands.cpp
index 50ccc0c9f..1da8b9540 100644
--- a/src/dyetool/actions/commands.cpp
+++ b/src/dyetool/actions/commands.cpp
@@ -137,5 +137,6 @@ impHandlerVoid(commandNpcShow)
impHandlerVoid(commandChangePartyLeader)
impHandlerVoid(commandPartyRecall)
impHandlerVoid(commandBreakGuild)
+impHandlerVoid(commandGuildRecall)
} // namespace Actions
diff --git a/src/enums/input/inputaction.h b/src/enums/input/inputaction.h
index 96d9fca3e..71a0e4631 100644
--- a/src/enums/input/inputaction.h
+++ b/src/enums/input/inputaction.h
@@ -666,6 +666,7 @@ enumStart(InputAction)
COMMAND_CHANGE_PARTY_LEADER,
COMMAND_PARTY_RECALL,
COMMAND_BREAK_GUILD,
+ COMMAND_GUILD_RECALL,
TOTAL
}
enumEnd(InputAction);
diff --git a/src/gui/popups/popupmenu.cpp b/src/gui/popups/popupmenu.cpp
index dae11fd12..101072d58 100644
--- a/src/gui/popups/popupmenu.cpp
+++ b/src/gui/popups/popupmenu.cpp
@@ -2771,12 +2771,22 @@ void PopupMenu::showPlayerGMCommands(const std::string &name)
{
Being *const being = actorManager->findBeingByName(name,
ActorType::Player);
- if (being && !being->getPartyName().empty())
+ if (being)
{
- mBrowserBox->addRow("/partyrecall 'PARTY'",
- // TRANSLATORS: popup menu item
- // TRANSLATORS: recall all party to player location
- _("Recall party"));
+ if (!being->getPartyName().empty())
+ {
+ mBrowserBox->addRow("/partyrecall 'PARTY'",
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: recall all party members to player location
+ _("Recall party"));
+ }
+ if (!being->getGuildName().empty())
+ {
+ mBrowserBox->addRow("/guildrecall 'PARTY'",
+ // TRANSLATORS: popup menu item
+ // TRANSLATORS: recall all guild members to player location
+ _("Recall guild"));
+ }
}
if (localPlayer && localPlayer->isInParty())
{
diff --git a/src/input/inputactionmap.h b/src/input/inputactionmap.h
index b8df98796..e2e2a8b14 100644
--- a/src/input/inputactionmap.h
+++ b/src/input/inputactionmap.h
@@ -5485,6 +5485,12 @@ static const InputActionData inputActionData
"breakguild|gmbreakguild",
UseArgs_true,
Protected_true},
+ {"keyCommandGuildRecall",
+ defaultAction(&Actions::commandGuildRecall),
+ InputCondition::INGAME,
+ "guildrecall|recallguild",
+ UseArgs_true,
+ Protected_true},
};
#undef defaultAction
diff --git a/src/net/adminhandler.h b/src/net/adminhandler.h
index ee9c2b76a..71517229f 100644
--- a/src/net/adminhandler.h
+++ b/src/net/adminhandler.h
@@ -176,6 +176,8 @@ class AdminHandler notfinal
virtual void partyRecall(const std::string &name) const = 0;
virtual void breakGuild(const std::string &name) const = 0;
+
+ virtual void guildRecall(const std::string &name) const = 0;
};
} // namespace Net
diff --git a/src/net/eathena/adminhandler.cpp b/src/net/eathena/adminhandler.cpp
index d02a26479..0084c6e98 100644
--- a/src/net/eathena/adminhandler.cpp
+++ b/src/net/eathena/adminhandler.cpp
@@ -362,4 +362,9 @@ void AdminHandler::breakGuild(const std::string &name) const
Gm::runCharCommand("breakguild", name);
}
+void AdminHandler::guildRecall(const std::string &name) const
+{
+ Gm::runCommand("guildrecall", name);
+}
+
} // namespace EAthena
diff --git a/src/net/eathena/adminhandler.h b/src/net/eathena/adminhandler.h
index d5f937307..542fab695 100644
--- a/src/net/eathena/adminhandler.h
+++ b/src/net/eathena/adminhandler.h
@@ -152,6 +152,8 @@ class AdminHandler final : public Ea::AdminHandler
void breakGuild(const std::string &name) const override final;
+ void guildRecall(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 edcb5f76a..b6c4ff33e 100644
--- a/src/net/tmwa/adminhandler.cpp
+++ b/src/net/tmwa/adminhandler.cpp
@@ -283,4 +283,8 @@ void AdminHandler::breakGuild(const std::string &name A_UNUSED) const
{
}
+void AdminHandler::guildRecall(const std::string &name A_UNUSED) const
+{
+}
+
} // namespace TmwAthena
diff --git a/src/net/tmwa/adminhandler.h b/src/net/tmwa/adminhandler.h
index bff931718..21eddd437 100644
--- a/src/net/tmwa/adminhandler.h
+++ b/src/net/tmwa/adminhandler.h
@@ -165,6 +165,8 @@ class AdminHandler final : public Ea::AdminHandler
void partyRecall(const std::string &name) const override final A_CONST;
void breakGuild(const std::string &name) const override final A_CONST;
+
+ void guildRecall(const std::string &name) const override final A_CONST;
};
} // namespace TmwAthena