summaryrefslogtreecommitdiff
path: root/src/being/playerinfo.cpp
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2014-09-25 23:04:34 +0300
committerAndrei Karas <akaras@inbox.ru>2014-09-25 23:04:34 +0300
commit42701a1ac7b553f445b68c23fd115cc522d1b679 (patch)
treee16c5577d7c2f3fb6e1e2bcbaa69f05a5faebeeb /src/being/playerinfo.cpp
parenta8f264a9aad2ec9d90759a65d556cc97d7785fb6 (diff)
downloadmv-42701a1ac7b553f445b68c23fd115cc522d1b679.tar.gz
mv-42701a1ac7b553f445b68c23fd115cc522d1b679.tar.bz2
mv-42701a1ac7b553f445b68c23fd115cc522d1b679.tar.xz
mv-42701a1ac7b553f445b68c23fd115cc522d1b679.zip
Add simple follow logic for mercenary and homunculus.
Diffstat (limited to 'src/being/playerinfo.cpp')
-rw-r--r--src/being/playerinfo.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/being/playerinfo.cpp b/src/being/playerinfo.cpp
index 428878af9..d2749a9b1 100644
--- a/src/being/playerinfo.cpp
+++ b/src/being/playerinfo.cpp
@@ -39,7 +39,9 @@
#include "resources/iteminfo.h"
+#include "net/homunculushandler.h"
#include "net/inventoryhandler.h"
+#include "net/mercenaryhandler.h"
#include "net/net.h"
#include "net/playerhandler.h"
@@ -543,4 +545,12 @@ int getMercenaryId()
return mMercenary ? mMercenary->id : 0;
}
+void updateMoveAI()
+{
+ if (mMercenary)
+ mercenaryHandler->moveToMaster();
+ if (mHomunculus)
+ homunculusHandler->moveToMaster();
+}
+
} // namespace PlayerInfo