From 917235b0e5ffd8e8e7ec32ea65ca537f0217b954 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Thu, 22 Jun 2017 21:57:15 +0300 Subject: Add chat command for feed pet. --- src/actions/actions.cpp | 10 +++++++++- src/actions/actions.h | 1 + 2 files changed, 10 insertions(+), 1 deletion(-) (limited to 'src/actions') diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index afd774b79..f9ce46cd9 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -90,12 +90,13 @@ #include "net/ipc.h" #include "net/mercenaryhandler.h" #include "net/net.h" -#include "net/vendinghandler.h" #include "net/npchandler.h" #include "net/playerhandler.h" +#include "net/pethandler.h" #include "net/serverfeatures.h" #include "net/uploadcharinfo.h" #include "net/tradehandler.h" +#include "net/vendinghandler.h" #include "resources/iteminfo.h" #include "resources/memorymanager.h" @@ -1616,6 +1617,13 @@ impHandler0(homunculusFeed) return true; } +impHandler0(petFeed) +{ + if (petHandler != nullptr) + petHandler->feed(); + return true; +} + impHandler(useItem) { const int itemId = atoi(event.args.c_str()); diff --git a/src/actions/actions.h b/src/actions/actions.h index 83072680c..f7f5ea0ba 100644 --- a/src/actions/actions.h +++ b/src/actions/actions.h @@ -104,6 +104,7 @@ namespace Actions decHandler(mercenaryToMaster); decHandler(homunculusToMaster); decHandler(homunculusFeed); + decHandler(petFeed); decHandler(useItem); decHandler(useItemInv); decHandler(invToStorage); -- cgit v1.2.3-70-g09d2