From d601630f26cd1043f5f2467757093f54c6269158 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 13 Dec 2014 21:52:25 +0300 Subject: Add chat command for unprotect item. New chat command: /unprotectitem ID Alias: /itemunprotect ID --- src/actions/actions.cpp | 8 ++++++++ src/actions/actions.h | 1 + 2 files changed, 9 insertions(+) (limited to 'src/actions') diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index e4b2d9db5..e689db941 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -1501,4 +1501,12 @@ impHandler(protectItem) return true; } +impHandler(unprotectItem) +{ + const int id = atoi(event.args.c_str()); + if (id > 0) + PlayerInfo::unprotectItem(id); + return true; +} + } // namespace Actions diff --git a/src/actions/actions.h b/src/actions/actions.h index 45dc96f11..cbd7489f3 100644 --- a/src/actions/actions.h +++ b/src/actions/actions.h @@ -102,6 +102,7 @@ namespace Actions decHandler(tradeAdd); decHandler(storageToInv); decHandler(protectItem); + decHandler(unprotectItem); } // namespace Actions #undef decHandler -- cgit v1.2.3-70-g09d2