summaryrefslogtreecommitdiff
path: root/src/being
diff options
context:
space:
mode:
Diffstat (limited to 'src/being')
-rw-r--r--src/being/localplayer.cpp4
-rw-r--r--src/being/playerinfo.cpp6
-rw-r--r--src/being/playerinfo.h2
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);