summaryrefslogtreecommitdiff
path: root/src/actions/actions.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-08-26 18:48:18 +0300
committerAndrei Karas <akaras@inbox.ru>2014-08-26 18:49:47 +0300
commit647c1a8b8b02b737b11b1e08af86ecc84f649a81 (patch)
tree1b1f30daaeeee39dd19195f07401a8bfd6a142f4 /src/actions/actions.cpp
parent537b66dbab370463a4a8d0d860a98626f73b4635 (diff)
downloadmanaverse-647c1a8b8b02b737b11b1e08af86ecc84f649a81.tar.gz
manaverse-647c1a8b8b02b737b11b1e08af86ecc84f649a81.tar.bz2
manaverse-647c1a8b8b02b737b11b1e08af86ecc84f649a81.tar.xz
manaverse-647c1a8b8b02b737b11b1e08af86ecc84f649a81.zip
Move chat command /undress into actions.
Diffstat (limited to 'src/actions/actions.cpp')
-rw-r--r--src/actions/actions.cpp14
1 files changed, 14 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