diff options
author | Andrei Karas <akaras@inbox.ru> | 2014-08-26 18:48:18 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2014-08-26 18:49:47 +0300 |
commit | 647c1a8b8b02b737b11b1e08af86ecc84f649a81 (patch) | |
tree | 1b1f30daaeeee39dd19195f07401a8bfd6a142f4 /src/actions | |
parent | 537b66dbab370463a4a8d0d860a98626f73b4635 (diff) | |
download | mv-647c1a8b8b02b737b11b1e08af86ecc84f649a81.tar.gz mv-647c1a8b8b02b737b11b1e08af86ecc84f649a81.tar.bz2 mv-647c1a8b8b02b737b11b1e08af86ecc84f649a81.tar.xz mv-647c1a8b8b02b737b11b1e08af86ecc84f649a81.zip |
Move chat command /undress into actions.
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 |