From 226331a5e5399ef447bf4eb161d79dfc69a01c5c Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sun, 20 Mar 2016 00:24:57 +0300 Subject: Add chat command /adoptchild. --- src/actions/commands.cpp | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'src/actions/commands.cpp') diff --git a/src/actions/commands.cpp b/src/actions/commands.cpp index a91e6f244..1c57bd677 100644 --- a/src/actions/commands.cpp +++ b/src/actions/commands.cpp @@ -62,6 +62,7 @@ #include "net/chathandler.h" #include "net/guildhandler.h" #ifdef EATHENA_SUPPORT +#include "net/familyhandler.h" #include "net/homunculushandler.h" #include "net/mailhandler.h" #include "net/net.h" @@ -1576,4 +1577,19 @@ impHandler(mailTo) #endif } +impHandler(adoptChild) +{ +#ifdef EATHENA_SUPPORT + const std::string nick = getNick(event); + Being *const being = actorManager->findBeingByName( + nick, ActorType::Player); + if (!being) + return true; + familyHandler->askForChild(being); + return true; +#else + return false; +#endif +} + } // namespace Actions -- cgit v1.2.3-70-g09d2