summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKenpachi Developer <Kenpachi.Developer@gmx.de>2020-02-15 05:26:52 +0100
committerHaru <haru@dotalux.com>2020-04-05 21:20:35 +0200
commit745dc5a2e2e32359e3a78cdac412e93b4ad940b5 (patch)
tree1329cd162090140adac4324c0f34ff3bdd96e779
parent7b33fb29e0b5014e9765ef091c6c27911c2ea636 (diff)
downloadhercules-745dc5a2e2e32359e3a78cdac412e93b4ad940b5.tar.gz
hercules-745dc5a2e2e32359e3a78cdac412e93b4ad940b5.tar.bz2
hercules-745dc5a2e2e32359e3a78cdac412e93b4ad940b5.tar.xz
hercules-745dc5a2e2e32359e3a78cdac412e93b4ad940b5.zip
Remove pet_equip_min_friendly config setting
-rw-r--r--conf/map/battle/pet.conf3
-rw-r--r--src/map/battle.c1
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/pet.c6
-rw-r--r--src/map/status.c2
5 files changed, 2 insertions, 11 deletions
diff --git a/conf/map/battle/pet.conf b/conf/map/battle/pet.conf
index 2aea861f9..ed784d49c 100644
--- a/conf/map/battle/pet.conf
+++ b/conf/map/battle/pet.conf
@@ -58,9 +58,6 @@ pet_damage_support: false
// At max (1000) support rate is 150%.
pet_support_min_friendly: 900
-// Same as above, but this is to use the pet_script field with official pet abilities.
-pet_equip_min_friendly: 900
-
// Whether or not the pet's will use skills. (Note 1)
// Note: Offensive pet skills need at least pet_attack_support or
// pet_damage_support to work (they trigger while the pet is attacking).
diff --git a/src/map/battle.c b/src/map/battle.c
index 7b3a4cbe2..99fd2ab8c 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -7093,7 +7093,6 @@ static const struct battle_data {
{ "pet_attack_support", &battle_config.pet_attack_support, 0, 0, 1, },
{ "pet_damage_support", &battle_config.pet_damage_support, 0, 0, 1, },
{ "pet_support_min_friendly", &battle_config.pet_support_min_friendly, 900, 0, 950, },
- { "pet_equip_min_friendly", &battle_config.pet_equip_min_friendly, 900, 0, 950, },
{ "pet_support_rate", &battle_config.pet_support_rate, 100, 0, INT_MAX, },
{ "pet_attack_exp_to_master", &battle_config.pet_attack_exp_to_master, 0, 0, 1, },
{ "pet_attack_exp_rate", &battle_config.pet_attack_exp_rate, 100, 0, INT_MAX, },
diff --git a/src/map/battle.h b/src/map/battle.h
index 79d07af8e..f923e6c99 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -220,7 +220,6 @@ struct Battle_Config {
int pet_attack_support;
int pet_damage_support;
int pet_support_min_friendly; //[Skotlex]
- int pet_equip_min_friendly;
int pet_support_rate;
int pet_attack_exp_to_master;
int pet_attack_exp_rate;
diff --git a/src/map/pet.c b/src/map/pet.c
index 6b1f3176f..a1ddec8e3 100644
--- a/src/map/pet.c
+++ b/src/map/pet.c
@@ -78,17 +78,13 @@ static int pet_hungry_val(struct pet_data *pd)
static void pet_set_intimate(struct pet_data *pd, int value)
{
- int intimate;
struct map_session_data *sd;
nullpo_retv(pd);
- intimate = pd->pet.intimate;
sd = pd->msd;
pd->pet.intimate = cap_value(value, PET_INTIMACY_NONE, PET_INTIMACY_MAX);
-
- if( (intimate >= battle_config.pet_equip_min_friendly && pd->pet.intimate < battle_config.pet_equip_min_friendly) || (intimate < battle_config.pet_equip_min_friendly && pd->pet.intimate >= battle_config.pet_equip_min_friendly) )
- status_calc_pc(sd,SCO_NONE);
+ status_calc_pc(sd, SCO_NONE);
/* Pet is lost, delete the egg */
if (pd->pet.intimate == PET_INTIMACY_NONE) {
diff --git a/src/map/status.c b/src/map/status.c
index bee5645ad..d290eb0e6 100644
--- a/src/map/status.c
+++ b/src/map/status.c
@@ -2581,7 +2581,7 @@ static int status_calc_pc_(struct map_session_data *sd, enum e_status_calc_opt o
if( sd->pd ) { // Pet Bonus
struct pet_data *pd = sd->pd;
- if( pd && pd->petDB && pd->petDB->equip_script && pd->pet.intimate >= battle_config.pet_equip_min_friendly )
+ if (pd != NULL && pd->petDB != NULL && pd->petDB->equip_script != NULL)
script->run(pd->petDB->equip_script,0,sd->bl.id,0);
if (pd && pd->pet.intimate > PET_INTIMACY_NONE && (!battle_config.pet_equip_required || pd->pet.equip > 0) && pd->state.skillbonus == 1 && pd->bonus)
pc->bonus(sd,pd->bonus->type, pd->bonus->val);