diff options
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/actions.cpp | 14 | ||||
-rw-r--r-- | src/actions/actions.h | 1 |
2 files changed, 15 insertions, 0 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 3a8aeaa4a..6c5f365af 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -70,6 +70,7 @@ #include "render/graphics.h" +#include "net/beinghandler.h" #include "net/chathandler.h" #include "net/gamehandler.h" #include "net/ipc.h" @@ -681,4 +682,17 @@ impHandler0(disconnect) return true; } +impHandler(undress) +{ + if (!actorManager || !localPlayer) + return false; + + Being *target = localPlayer->getTarget(); + if (!target) + target = actorManager->findNearestByName(event.args); + if (target) + Net::getBeingHandler()->undress(target); + return true; +} + } // namespace Actions diff --git a/src/actions/actions.h b/src/actions/actions.h index 9e7e9f12c..4b586b169 100644 --- a/src/actions/actions.h +++ b/src/actions/actions.h @@ -65,6 +65,7 @@ namespace Actions decHandler(priceSave); decHandler(cacheInfo); decHandler(disconnect); + decHandler(undress); } // namespace Actions #undef decHandler |