From 22bb94a2587fa16d808ec966f01d07dc27d9f5d9 Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Sat, 28 Feb 2015 21:53:24 +0300 Subject: Build mercenaryhandler only if eathena enabled. --- src/being/localplayer.cpp | 4 ++++ src/being/playerinfo.cpp | 6 ++---- src/being/playerinfo.h | 2 ++ 3 files changed, 8 insertions(+), 4 deletions(-) (limited to 'src/being') 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); -- cgit v1.2.3-60-g2f50