summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c3
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/skill.c4
3 files changed, 6 insertions, 2 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index 895876300..a784f6884 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -6966,7 +6966,8 @@ static const struct battle_data {
{ "player_damage_delay_rate", &battle_config.pc_damage_delay_rate, 100, 0, INT_MAX, },
{ "defunit_not_enemy", &battle_config.defnotenemy, 0, 0, 1, },
{ "gvg_traps_target_all", &battle_config.vs_traps_bctall, BL_PC, BL_NUL, BL_ALL, },
- { "trap_visibility", &battle_config.trap_visibility, 0, 0, 2, },
+ { "trap_options/visibility", &battle_config.trap_visibility, 2, 0, 2, },
+ { "trap_options/display_on_trigger", &battle_config.trap_trigger, 1, 0, 1, },
{ "summon_flora_setting", &battle_config.summon_flora, 1|2, 0, 1|2, },
{ "clear_skills_on_death", &battle_config.clear_unit_ondeath, BL_NUL, BL_NUL, BL_ALL, },
{ "clear_skills_on_warp", &battle_config.clear_unit_onwarp, BL_ALL, BL_NUL, BL_ALL, },
diff --git a/src/map/battle.h b/src/map/battle.h
index 297768765..007fbabd2 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -150,6 +150,7 @@ struct Battle_Config {
int defnotenemy;
int vs_traps_bctall;
int trap_visibility;
+ int trap_trigger;
int summon_flora; //[Skotlex]
int clear_unit_ondeath; //[Skotlex]
int clear_unit_onwarp; //[Skotlex]
diff --git a/src/map/skill.c b/src/map/skill.c
index 2b31de6fc..c320fe4b3 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -12759,7 +12759,9 @@ static int skill_unit_onplace_timer(struct skill_unit *src, struct block_list *b
ts->tick += sg->interval*(map->count_oncell(bl->m,bl->x,bl->y,BL_CHAR,0)-1);
}
- if (battle_config.trap_visibility != 0 && skill->get_inf2(sg->skill_id) & INF2_HIDDEN_TRAP) {
+ if (sg->skill_id == HT_ANKLESNARE
+ || (battle_config.trap_trigger == 1 && skill->get_inf2(sg->skill_id) & INF2_HIDDEN_TRAP)
+ ) {
src->visible = true;
clif->skillunit_update(&src->bl);
}