summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/commands.cpp21
-rw-r--r--src/actions/commands.h1
2 files changed, 22 insertions, 0 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index 84011b3ec..114144477 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -38,6 +38,8 @@
#ifdef EATHENA_SUPPORT
#include "gui/shortcut/emoteshortcut.h"
+
+#include "gui/windows/npcdialog.h"
#endif
#include "gui/windows/chatwindow.h"
@@ -57,6 +59,7 @@
#include "net/homunculushandler.h"
#include "net/mailhandler.h"
#include "net/net.h"
+#include "net/npchandler.h"
#endif
#include "net/partyhandler.h"
#include "net/serverfeatures.h"
@@ -1133,4 +1136,22 @@ impHandler(craft)
return true;
}
+impHandler(npcClipboard)
+{
+ int x = 0;
+ int y = 0;
+
+ if (npcHandler)
+ {
+ NpcDialog *const dialog = npcHandler->getCurrentNpcDialog();
+
+ if (dialog && parse2Int(event.args, x, y))
+ {
+ dialog->copyToClipboard(x, y);
+ return true;
+ }
+ }
+ return false;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index d901683b1..451f84285 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -93,6 +93,7 @@ namespace Actions
decHandler(selectSkillLevel);
decHandler(skill);
decHandler(craft);
+ decHandler(npcClipboard);
} // namespace Actions
#undef decHandler