summaryrefslogtreecommitdiff
path: root/src/actions/actions.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-12-13 21:19:26 +0300
committerAndrei Karas <akaras@inbox.ru>2014-12-13 21:19:26 +0300
commitca333756a61de5af5d07614dbedc6195c2e78023 (patch)
treed85f67b43b02a5c6e068ffea50de5f37cc426171 /src/actions/actions.cpp
parentb2043642e62a5fe58c42ee07a25c41b4ef6b67cc (diff)
downloadmanaplus-ca333756a61de5af5d07614dbedc6195c2e78023.tar.gz
manaplus-ca333756a61de5af5d07614dbedc6195c2e78023.tar.bz2
manaplus-ca333756a61de5af5d07614dbedc6195c2e78023.tar.xz
manaplus-ca333756a61de5af5d07614dbedc6195c2e78023.zip
Add chat command for protect item.
New chat command: /protectitem ID Alias: /itemprotect ID
Diffstat (limited to 'src/actions/actions.cpp')
-rw-r--r--src/actions/actions.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp
index 1397791d1..e4b2d9db5 100644
--- a/src/actions/actions.cpp
+++ b/src/actions/actions.cpp
@@ -1493,4 +1493,12 @@ impHandler(storageToInv)
return true;
}
+impHandler(protectItem)
+{
+ const int id = atoi(event.args.c_str());
+ if (id > 0)
+ PlayerInfo::protectItem(id);
+ return true;
+}
+
} // namespace Actions