From 2c68db9faadcf3e8bac7cd6193de15aa7dfd5a5c Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Fri, 20 Apr 2018 19:22:13 +0200 Subject: [PATCH] Fixed a few problems with homunculus autofeed (#3062) --- conf/battle/feature.conf | 4 ---- src/map/battle.cpp | 3 +-- src/map/battle.hpp | 3 +-- src/map/clif.cpp | 4 ++-- src/map/homunculus.cpp | 4 ---- 5 files changed, 4 insertions(+), 14 deletions(-) diff --git a/conf/battle/feature.conf b/conf/battle/feature.conf index 92ef0f7edb..a3f920825f 100644 --- a/conf/battle/feature.conf +++ b/conf/battle/feature.conf @@ -71,7 +71,3 @@ feature.achievement: on // Homunculues Autofeeding (Note 1) // Requires: 2017-09-20bRagexeRE or later feature.homunculus_autofeed: off - -// At which rate should homunculus autofeeding trigger? -// Default: 30 -feature.homunculus_autofeed_rate: 30 diff --git a/src/map/battle.cpp b/src/map/battle.cpp index d1dea0102c..a6a0e0019e 100644 --- a/src/map/battle.cpp +++ b/src/map/battle.cpp @@ -8513,8 +8513,7 @@ static const struct _battle_data { { "broadcast_hide_name", &battle_config.broadcast_hide_name, 2, 0, NAME_LENGTH, }, { "skill_drop_items_full", &battle_config.skill_drop_items_full, 0, 0, 1, }, { "feature.homunculus_autofeed", &battle_config.feature_homunculus_autofeed, 1, 0, 1, }, - { "feature.homunculus_autofeed_rate", &battle_config.feature_homunculus_autofeed_rate,30, 0, 100, }, - { "summoner_trait", &battle_config.summoner_trait, 3, 0, 3, }, + { "summoner_trait", &battle_config.summoner_trait, 3, 0, 3, }, #include "../custom/battle_config_init.inc" }; diff --git a/src/map/battle.hpp b/src/map/battle.hpp index b5fe7d41c8..c240e6de22 100644 --- a/src/map/battle.hpp +++ b/src/map/battle.hpp @@ -641,8 +641,7 @@ struct Battle_Config int autoloot_adjust; int broadcast_hide_name; int skill_drop_items_full; - int feature_homunculus_autofeed; - int feature_homunculus_autofeed_rate; + int feature_homunculus_autofeed; int summoner_trait; #include "../custom/battle_config_struct.inc" diff --git a/src/map/clif.cpp b/src/map/clif.cpp index 0bafe87afc..421dc61b1c 100644 --- a/src/map/clif.cpp +++ b/src/map/clif.cpp @@ -10448,7 +10448,7 @@ void clif_parse_LoadEndAck(int fd,struct map_session_data *sd) clif_equipcheckbox(sd); #endif #if PACKETVER >= 20170920 - if( sd->hd ){ + if( sd->hd && battle_config.feature_homunculus_autofeed ){ clif_configuration( sd, CONFIG_HOMUNCULUS_AUTOFEED, sd->hd->homunculus.autofeed ); }else{ clif_configuration( sd, CONFIG_HOMUNCULUS_AUTOFEED, false ); @@ -16568,7 +16568,7 @@ void clif_parse_configuration( int fd, struct map_session_data* sd ){ break; case CONFIG_HOMUNCULUS_AUTOFEED: // Player can not click this if he does not have a homunculus or it is vaporized - if( sd->hd == nullptr || sd->hd->homunculus.vaporize ){ + if( sd->hd == nullptr || sd->hd->homunculus.vaporize || !battle_config.feature_homunculus_autofeed ){ return; } diff --git a/src/map/homunculus.cpp b/src/map/homunculus.cpp index 5738de619e..e9477d254c 100644 --- a/src/map/homunculus.cpp +++ b/src/map/homunculus.cpp @@ -892,10 +892,6 @@ static int hom_hungry(int tid, unsigned int tick, int id, intptr_t data) clif_emotion(&hd->bl, ET_OK); } - if( battle_config.feature_homunculus_autofeed && hd->homunculus.autofeed && hd->homunculus.hunger <= battle_config.feature_homunculus_autofeed_rate ){ - hom_food( sd, hd ); - } - if (hd->homunculus.hunger < 0) { hd->homunculus.hunger = 0; // Delete the homunculus if intimacy <= 100