diff options
author | Andrei Karas <akaras@inbox.ru> | 2016-03-20 00:24:57 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2016-03-20 00:24:57 +0300 |
commit | 226331a5e5399ef447bf4eb161d79dfc69a01c5c (patch) | |
tree | 4c81bdc026488480ddd6604248447975276d3ac1 /src/actions | |
parent | e7b0eec60bdd4b2a6cd33077c069e90a1aab7ad3 (diff) | |
download | manaplus-226331a5e5399ef447bf4eb161d79dfc69a01c5c.tar.gz manaplus-226331a5e5399ef447bf4eb161d79dfc69a01c5c.tar.bz2 manaplus-226331a5e5399ef447bf4eb161d79dfc69a01c5c.tar.xz manaplus-226331a5e5399ef447bf4eb161d79dfc69a01c5c.zip |
Add chat command /adoptchild.
Diffstat (limited to 'src/actions')
-rw-r--r-- | src/actions/commands.cpp | 16 | ||||
-rw-r--r-- | src/actions/commands.h | 1 |
2 files changed, 17 insertions, 0 deletions
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 diff --git a/src/actions/commands.h b/src/actions/commands.h index 76dc683e9..d2b6e5eeb 100644 --- a/src/actions/commands.h +++ b/src/actions/commands.h @@ -139,6 +139,7 @@ namespace Actions decHandler(commandBreakGuild); decHandler(commandGuildRecall); decHandler(mailTo); + decHandler(adoptChild); } // namespace Actions #undef decHandler |