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 /src | |
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
Diffstat (limited to 'src')
-rw-r--r-- | src/map/battle.c | 1 | ||||
-rw-r--r-- | src/map/battle.h | 1 | ||||
-rw-r--r-- | src/map/pet.c | 6 |
3 files changed, 6 insertions, 2 deletions
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); |