diff options
author | Andrei Karas <akaras@inbox.ru> | 2015-02-28 21:53:24 +0300 |
---|---|---|
committer | Andrei Karas <akaras@inbox.ru> | 2015-02-28 21:53:24 +0300 |
commit | 22bb94a2587fa16d808ec966f01d07dc27d9f5d9 (patch) | |
tree | c2b6cc27c3bb420c32e2d8bacdd8f1634f85e419 /src/being | |
parent | 510d030cbf0cca87e81801b1f484c24e8d4b7940 (diff) | |
download | manaplus-22bb94a2587fa16d808ec966f01d07dc27d9f5d9.tar.gz manaplus-22bb94a2587fa16d808ec966f01d07dc27d9f5d9.tar.bz2 manaplus-22bb94a2587fa16d808ec966f01d07dc27d9f5d9.tar.xz manaplus-22bb94a2587fa16d808ec966f01d07dc27d9f5d9.zip |
Build mercenaryhandler only if eathena enabled.
Diffstat (limited to 'src/being')
-rw-r--r-- | src/being/localplayer.cpp | 4 | ||||
-rw-r--r-- | src/being/playerinfo.cpp | 6 | ||||
-rw-r--r-- | src/being/playerinfo.h | 2 |
3 files changed, 8 insertions, 4 deletions
diff --git a/src/being/localplayer.cpp b/src/being/localplayer.cpp index 79f68dfbe..cd9b642f0 100644 --- a/src/being/localplayer.cpp +++ b/src/being/localplayer.cpp @@ -466,7 +466,9 @@ void LocalPlayer::nextTile(unsigned char dir A_UNUSED = 0) Being::nextTile(); } +#ifdef EATHENA_SUPPORT PlayerInfo::updateMoveAI(); +#endif } bool LocalPlayer::pickUp(FloorItem *const item) @@ -781,7 +783,9 @@ void LocalPlayer::attack(Being *const target, const bool keep, const int targetId = target->getId(); playerHandler->attack(targetId, mServerAttack); +#ifdef EATHENA_SUPPORT PlayerInfo::updateAttackAi(targetId, mServerAttack); +#endif } if (!keep) diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp index a3eb640a9..dc7eb3732 100644 --- a/src/being/playerinfo.cpp +++ b/src/being/playerinfo.cpp @@ -559,25 +559,23 @@ int getMercenaryId() return mMercenary ? mMercenary->id : 0; } +#ifdef EATHENA_SUPPORT void updateMoveAI() { if (mMercenary) mercenaryHandler->moveToMaster(); -#ifdef EATHENA_SUPPORT if (mHomunculus) homunculusHandler->moveToMaster(); -#endif } void updateAttackAi(const int targetId, const bool keep) { if (mMercenary) mercenaryHandler->attack(targetId, keep); -#ifdef EATHENA_SUPPORT if (mHomunculus) homunculusHandler->attack(targetId, keep); -#endif } +#endif void setGuildPositionFlags(const GuildPositionFlags::Type pos) { diff --git a/src/being/playerinfo.h b/src/being/playerinfo.h index 54c578163..49f4d54e5 100644 --- a/src/being/playerinfo.h +++ b/src/being/playerinfo.h @@ -263,9 +263,11 @@ namespace PlayerInfo int getMercenaryId(); +#ifdef EATHENA_SUPPORT void updateMoveAI(); void updateAttackAi(const int targetId, const bool keep); +#endif void setGuildPositionFlags(const GuildPositionFlags::Type pos); |