From fbafb947631a4d0b1c4afcc15afa011a9179ecea Mon Sep 17 00:00:00 2001 From: toms Date: Mon, 31 Jul 2006 21:21:55 +0000 Subject: Added possibility to restrict duel usage to same map git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@8013 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/atcommand.c | 6 ++++++ src/map/battle.c | 6 ++++-- src/map/battle.h | 1 + 3 files changed, 11 insertions(+), 2 deletions(-) (limited to 'src/map') diff --git a/src/map/atcommand.c b/src/map/atcommand.c index e0c4b5405..ccdbab7bf 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -10181,6 +10181,12 @@ int atcommand_invite( clif_displaymessage(fd, msg_txt(353)); return 0; } + + if(battle_config.duel_only_on_same_map && target_sd->bl.m != sd->bl.m) + { + clif_displaymessage(fd, msg_txt(364)); + return 0; + } duel_invite(did, sd, target_sd); // "Duel: Invitation has been sent." diff --git a/src/map/battle.c b/src/map/battle.c index 50c35867a..27b718bc9 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -3731,7 +3731,8 @@ static const struct battle_data_short { { "duel_allow_teleport", &battle_config.duel_allow_teleport}, // [LuzZza] { "duel_autoleave_when_die", &battle_config.duel_autoleave_when_die}, //[LuzZza] { "duel_time_interval", &battle_config.duel_time_interval}, // [LuzZza] - + { "duel_only_on_same_map", &battle_config.duel_only_on_same_map}, // [Toms] + { "skip_teleport_lv1_menu", &battle_config.skip_teleport_lv1_menu}, // [LuzZza] { "allow_skill_without_day", &battle_config.allow_skill_without_day}, // [Komurka] { "allow_es_magic_player", &battle_config.allow_es_magic_pc }, @@ -4156,10 +4157,11 @@ void battle_set_defaults() { battle_config.duel_enable = 1; battle_config.duel_allow_pvp = 0; - battle_config.duel_allow_pvp = 0; + battle_config.duel_allow_gvg = 0; battle_config.duel_allow_teleport = 0; battle_config.duel_autoleave_when_die = 1; battle_config.duel_time_interval = 60; + battle_config.duel_only_on_same_map = 0; battle_config.skip_teleport_lv1_menu = 0; battle_config.allow_skill_without_day = 0; diff --git a/src/map/battle.h b/src/map/battle.h index 12e4b2488..5ff2cfc30 100644 --- a/src/map/battle.h +++ b/src/map/battle.h @@ -420,6 +420,7 @@ extern struct Battle_Config { unsigned short duel_allow_teleport; // [LuzZza] unsigned short duel_autoleave_when_die; // [LuzZza] unsigned short duel_time_interval; // [LuzZza] + unsigned short duel_only_on_same_map; // [Toms] unsigned short skip_teleport_lv1_menu; // possibility to disable (skip) Teleport Lv1 menu, that have only two lines `Random` and `Cancel` [LuzZza] -- cgit v1.2.3-70-g09d2