summaryrefslogtreecommitdiff
path: root/src/map/homunculus.c
diff options
context:
space:
mode:
authorAsheraf <acheraf1998@gmail.com>2017-11-05 00:51:34 +0000
committerAsheraf <acheraf1998@gmail.com>2017-11-18 22:45:11 +0000
commit1a4327551900db5e2ecbb754bef7c05f4edfc6dd (patch)
treef60c6951a12ba3b634f5c6b5c40f6c1b62ece349 /src/map/homunculus.c
parent41f3237e4537d7105fb47d56b455d31cf33c155c (diff)
downloadhercules-1a4327551900db5e2ecbb754bef7c05f4edfc6dd.tar.gz
hercules-1a4327551900db5e2ecbb754bef7c05f4edfc6dd.tar.bz2
hercules-1a4327551900db5e2ecbb754bef7c05f4edfc6dd.tar.xz
hercules-1a4327551900db5e2ecbb754bef7c05f4edfc6dd.zip
Implement Homunculus autofeeding
Diffstat (limited to 'src/map/homunculus.c')
-rw-r--r--src/map/homunculus.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/src/map/homunculus.c b/src/map/homunculus.c
index ddaf3443a..9f5756885 100644
--- a/src/map/homunculus.c
+++ b/src/map/homunculus.c
@@ -683,7 +683,12 @@ int homunculus_hunger_timer(int tid, int64 tick, int id, intptr_t data) {
} else if(hd->homunculus.hunger == 75) {
clif->emotion(&hd->bl, E_OK);
}
-
+ if (battle_config.feature_enable_homun_autofeed != 0) {
+ if (hd->homunculus.autofeed) {
+ if (hd->homunculus.hunger < 30)
+ homun->feed(sd, hd);
+ }
+ }
if(hd->homunculus.hunger < 0) {
hd->homunculus.hunger = 0;
// Delete the homunculus if intimacy <= 100