summaryrefslogtreecommitdiff
path: root/src/being/playerinfo.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-25 23:13:19 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-25 23:13:19 +0300
commit19d5a1ca912c89d46ea567079777d0fff1211c25 (patch)
tree4fd05c1c6593de88eed22332c60b49dac6cc587c /src/being/playerinfo.cpp
parent42701a1ac7b553f445b68c23fd115cc522d1b679 (diff)
downloadmanaverse-19d5a1ca912c89d46ea567079777d0fff1211c25.tar.gz
manaverse-19d5a1ca912c89d46ea567079777d0fff1211c25.tar.bz2
manaverse-19d5a1ca912c89d46ea567079777d0fff1211c25.tar.xz
manaverse-19d5a1ca912c89d46ea567079777d0fff1211c25.zip
Add simple attack logic for mercenary and homunculus.
Diffstat (limited to 'src/being/playerinfo.cpp')
-rw-r--r--src/being/playerinfo.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp
index d2749a9b1..07696b66c 100644
--- a/src/being/playerinfo.cpp
+++ b/src/being/playerinfo.cpp
@@ -553,4 +553,12 @@ void updateMoveAI()
homunculusHandler->moveToMaster();
}
+void updateAttackAi(const int targetId, const bool keep)
+{
+ if (mMercenary)
+ mercenaryHandler->attack(targetId, keep);
+ if (mHomunculus)
+ homunculusHandler->attack(targetId, keep);
+}
+
} // namespace PlayerInfo