summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/battle.c2
-rw-r--r--src/map/battle.h1
-rw-r--r--src/map/skill.c8
3 files changed, 11 insertions, 0 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index be22f4bc7..191608a3a 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3321,6 +3321,7 @@ static const struct battle_data_short {
{ "pvp_exp", &battle_config.pvp_exp },
{ "gtb_sc_immunity", &battle_config.gtb_sc_immunity},
{ "guild_max_castles", &battle_config.guild_max_castles },
+ { "emergency_call", &battle_config.emergency_call },
{ "death_penalty_type", &battle_config.death_penalty_type },
{ "death_penalty_base", &battle_config.death_penalty_base },
{ "death_penalty_job", &battle_config.death_penalty_job },
@@ -3738,6 +3739,7 @@ void battle_set_defaults() {
battle_config.gm_join_chat=0;
battle_config.gm_kick_chat=0;
battle_config.guild_max_castles=0;
+ battle_config.emergency_call=2;
battle_config.skillfree = 0;
battle_config.skillup_limit = 0;
battle_config.wp_rate=100;
diff --git a/src/map/battle.h b/src/map/battle.h
index a2a9a2943..57d574917 100644
--- a/src/map/battle.h
+++ b/src/map/battle.h
@@ -167,6 +167,7 @@ extern struct Battle_Config {
unsigned short guild_emperium_check;
unsigned short guild_exp_limit;
unsigned short guild_max_castles;
+ unsigned short emergency_call;
unsigned short pc_invincible_time;
unsigned short pet_catch_rate;
unsigned short pet_rename;
diff --git a/src/map/skill.c b/src/map/skill.c
index dacb57a75..d9f6fbc62 100644
--- a/src/map/skill.c
+++ b/src/map/skill.c
@@ -906,6 +906,14 @@ int skillnotok (int skillid, struct map_session_data *sd)
clif_skill_fail(sd,skillid,0,0);
return 1;
}
+ case GD_EMERGENCYCALL:
+ if (!battle_config.emergency_call ||
+ (map[sd->bl.m].flag.nowarpto && battle_config.emergency_call&1))
+ {
+ clif_skill_fail(sd,skillid,0,0);
+ return 1;
+ }
+ break;
}
return (map[sd->bl.m].flag.noskill);
}