summaryrefslogtreecommitdiff
path: root/src/actions
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2016-01-27 15:37:21 +0300
committerAndrei Karas <akaras@inbox.ru>2016-01-27 15:37:21 +0300
commit57ae5040b2f2fcaed6b80f5a10573a0abaccdf5f (patch)
tree2f83339787e953d762221737bb1dd4eeffa393f0 /src/actions
parent3a19b08078d42837126cc585d2a9b6f5f61b2c2b (diff)
downloadplus-57ae5040b2f2fcaed6b80f5a10573a0abaccdf5f.tar.gz
plus-57ae5040b2f2fcaed6b80f5a10573a0abaccdf5f.tar.bz2
plus-57ae5040b2f2fcaed6b80f5a10573a0abaccdf5f.tar.xz
plus-57ae5040b2f2fcaed6b80f5a10573a0abaccdf5f.zip
Add chat command for move selected item to craft slot.
New chat command: /craft SLOT
Diffstat (limited to 'src/actions')
-rw-r--r--src/actions/commands.cpp13
-rw-r--r--src/actions/commands.h1
2 files changed, 13 insertions, 1 deletions
diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp
index a87db0a16..84011b3ec 100644
--- a/src/actions/commands.cpp
+++ b/src/actions/commands.cpp
@@ -41,9 +41,10 @@
#endif
#include "gui/windows/chatwindow.h"
+#include "gui/windows/inventorywindow.h"
+#include "gui/windows/outfitwindow.h"
#include "gui/windows/skilldialog.h"
#include "gui/windows/socialwindow.h"
-#include "gui/windows/outfitwindow.h"
#include "gui/widgets/tabs/chat/whispertab.h"
@@ -1122,4 +1123,14 @@ impHandler(skill)
return true;
}
+impHandler(craft)
+{
+ const std::string args = event.args;
+ if (args.empty() || !inventoryWindow)
+ return false;
+
+ inventoryWindow->moveItemToCraft(atoi(args.c_str()));
+ return true;
+}
+
} // namespace Actions
diff --git a/src/actions/commands.h b/src/actions/commands.h
index 6eceaa208..d901683b1 100644
--- a/src/actions/commands.h
+++ b/src/actions/commands.h
@@ -92,6 +92,7 @@ namespace Actions
decHandler(slide);
decHandler(selectSkillLevel);
decHandler(skill);
+ decHandler(craft);
} // namespace Actions
#undef decHandler