diff options
author | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-06-22 05:03:39 +0200 |
---|---|---|
committer | Kenpachi Developer <Kenpachi.Developer@gmx.de> | 2020-06-22 05:03:39 +0200 |
commit | 42a3bcaf96be26aeed560574d650e61091282995 (patch) | |
tree | 605207f1e151063605d8b7b0975fb69bafdc3e2c | |
parent | 2129555fa2752cfa0b9e73151fad2897d426fe63 (diff) | |
download | hercules-42a3bcaf96be26aeed560574d650e61091282995.tar.gz hercules-42a3bcaf96be26aeed560574d650e61091282995.tar.bz2 hercules-42a3bcaf96be26aeed560574d650e61091282995.tar.xz hercules-42a3bcaf96be26aeed560574d650e61091282995.zip |
Add battle flag for immediately removing the pet when its intimacy drops to 0
-rw-r--r-- | conf/map/battle/pet.conf | 4 | ||||
-rw-r--r-- | src/map/battle.c | 1 | ||||
-rw-r--r-- | src/map/battle.h | 1 | ||||
-rw-r--r-- | src/map/pet.c | 6 |
4 files changed, 10 insertions, 2 deletions
diff --git a/conf/map/battle/pet.conf b/conf/map/battle/pet.conf index 5797bb2a5..3060b6e64 100644 --- a/conf/map/battle/pet.conf +++ b/conf/map/battle/pet.conf @@ -99,3 +99,7 @@ pet_max_atk2: 1000 // If set to true, pets are automatically returned to egg when entering castles during WoE times // and hatching is forbidden within as well. pet_disable_in_gvg: false + +// Should the pet immediately be removed when its intimacy drops to 0? (Note 1) +// If set to false the pet will randomly walk around the map before being removed. +pet_remove_immediately: true diff --git a/src/map/battle.c b/src/map/battle.c index 611154953..c25825e6e 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -7101,6 +7101,7 @@ static const struct battle_data { { "pet_max_atk1", &battle_config.pet_max_atk1, 750, 0, INT_MAX, }, { "pet_max_atk2", &battle_config.pet_max_atk2, 1000, 0, INT_MAX, }, { "pet_disable_in_gvg", &battle_config.pet_no_gvg, 0, 0, 1, }, + { "pet_remove_immediately", &battle_config.pet_remove_immediately, 1, 0, 1, }, { "skill_min_damage", &battle_config.skill_min_damage, 2|4, 0, 1|2|4, }, { "finger_offensive_type", &battle_config.finger_offensive_type, 0, 0, 1, }, { "heal_exp", &battle_config.heal_exp, 0, 0, INT_MAX, }, diff --git a/src/map/battle.h b/src/map/battle.h index 55ee32445..8477d943d 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -230,6 +230,7 @@ struct Battle_Config { int pet_max_atk2; //[Skotlex] int pet_no_gvg; //Disables pets in gvg. [Skotlex] int pet_equip_required; + int pet_remove_immediately; int skill_min_damage; int finger_offensive_type; diff --git a/src/map/pet.c b/src/map/pet.c index 3c75c23b5..fe803d93f 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -154,8 +154,10 @@ static void pet_set_intimate(struct pet_data *pd, int value) if (i != sd->status.inventorySize) pc->delitem(sd, i, 1, 0, DELITEM_NORMAL, LOG_TYPE_EGG); - pet_stop_attack(pd); - unit->remove_map(&pd->bl, CLR_OUTSIGHT, ALC_MARK); + if (battle_config.pet_remove_immediately != 0) { + pet_stop_attack(pd); + unit->remove_map(&pd->bl, CLR_OUTSIGHT, ALC_MARK); + } } status_calc_pc(sd, SCO_NONE); |