diff options
author | Andrei Karas <akaras@inbox.ru> | 2017-06-22 22:24:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2017-06-22 22:24:24 +0300 |
commit | f6596726b6978a7380de163740e6b65c8394ca42 (patch) | |
tree | d1264b5536c1aeefb791b5e8d27b2c9500fc7cca | |
parent | 92eb0630eb067fbe0a18edb93a02f6fd424c3212 (diff) | |
download | manaplus-f6596726b6978a7380de163740e6b65c8394ca42.tar.gz manaplus-f6596726b6978a7380de163740e6b65c8394ca42.tar.bz2 manaplus-f6596726b6978a7380de163740e6b65c8394ca42.tar.xz manaplus-f6596726b6978a7380de163740e6b65c8394ca42.zip |
Move pets actions from actions.cpp into pets.cpp
-rw-r--r-- | src/actions/actions.cpp | 15 | ||||
-rw-r--r-- | src/actions/actions.h | 2 | ||||
-rw-r--r-- | src/actions/pets.cpp | 14 | ||||
-rw-r--r-- | src/actions/pets.h | 2 | ||||
-rw-r--r-- | src/dyetool/actions/actions.cpp | 2 | ||||
-rw-r--r-- | src/dyetool/actions/pets.cpp | 2 |
6 files changed, 18 insertions, 19 deletions
diff --git a/src/actions/actions.cpp b/src/actions/actions.cpp index 96a6e48ca..c5bbf075b 100644 --- a/src/actions/actions.cpp +++ b/src/actions/actions.cpp @@ -92,7 +92,6 @@ #include "net/net.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" @@ -1617,20 +1616,6 @@ impHandler0(homunculusFeed) return true; } -impHandler0(petFeed) -{ - if (petHandler != nullptr) - petHandler->feed(); - return true; -} - -impHandler0(petDropLoot) -{ - if (petHandler != nullptr) - petHandler->dropLoot(); - 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 bbe1c4847..83072680c 100644 --- a/src/actions/actions.h +++ b/src/actions/actions.h @@ -104,8 +104,6 @@ namespace Actions decHandler(mercenaryToMaster); decHandler(homunculusToMaster); decHandler(homunculusFeed); - decHandler(petFeed); - decHandler(petDropLoot); decHandler(useItem); decHandler(useItemInv); decHandler(invToStorage); diff --git a/src/actions/pets.cpp b/src/actions/pets.cpp index 79e004f15..01542edf4 100644 --- a/src/actions/pets.cpp +++ b/src/actions/pets.cpp @@ -217,4 +217,18 @@ impHandler(petMove) return false; } +impHandler0(petFeed) +{ + if (petHandler != nullptr) + petHandler->feed(); + return true; +} + +impHandler0(petDropLoot) +{ + if (petHandler != nullptr) + petHandler->dropLoot(); + return true; +} + } // namespace Actions diff --git a/src/actions/pets.h b/src/actions/pets.h index 750ba2366..a3ac0795f 100644 --- a/src/actions/pets.h +++ b/src/actions/pets.h @@ -41,6 +41,8 @@ namespace Actions decHandler(petDirectLeft); decHandler(petDirectRight); decHandler(petMove); + decHandler(petFeed); + decHandler(petDropLoot); } // namespace Actions #undef decHandler diff --git a/src/dyetool/actions/actions.cpp b/src/dyetool/actions/actions.cpp index a09685e03..58353b699 100644 --- a/src/dyetool/actions/actions.cpp +++ b/src/dyetool/actions/actions.cpp @@ -100,8 +100,6 @@ impHandlerVoid(mercenaryFire) impHandlerVoid(mercenaryToMaster) impHandlerVoid(homunculusToMaster) impHandlerVoid(homunculusFeed) -impHandlerVoid(petFeed) -impHandlerVoid(petDropLoot) impHandlerVoid(useItem) impHandlerVoid(useItemInv) impHandlerVoid(invToStorage) diff --git a/src/dyetool/actions/pets.cpp b/src/dyetool/actions/pets.cpp index 9f12a76e0..16658ebc7 100644 --- a/src/dyetool/actions/pets.cpp +++ b/src/dyetool/actions/pets.cpp @@ -41,5 +41,7 @@ impHandlerVoid(petDirectDown) impHandlerVoid(petDirectLeft) impHandlerVoid(petDirectRight) impHandlerVoid(petMove) +impHandlerVoid(petFeed) +impHandlerVoid(petDropLoot) } // namespace Actions |