Browse Source

- Added battle config setting emergency_recall, specifies behaviour of that skill (skill.conf): 0 - Disabled. 1 - can't be used in nowarpto maps. 2 - Can be used everywhere.

git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@7516 54d463be-8e91-2dee-dedb-b68131a5f0ec
skotlex 19 years ago
parent
commit
6ca52ab9dc
5 changed files with 21 additions and 0 deletions
  1. 3 0
      Changelog-Trunk.txt
  2. 7 0
      conf-tmpl/battle/skill.conf
  3. 2 0
      src/map/battle.c
  4. 1 0
      src/map/battle.h
  5. 8 0
      src/map/skill.c

+ 3 - 0
Changelog-Trunk.txt

@@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK.  ALL UNTESTED BUGFIXES/FEATURES GO
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
 
 
 2006/07/04
 2006/07/04
+	* Added battle config setting emergency_recall, specifies behaviour of that
+	  skill (skill.conf): 0 - Disabled. 1 - can't be used in nowarpto maps. 2 -
+	  Can be used everywhere. [Skotlex]
 	* Removed the NPC/Dance/Song inf2 check of AbraCadabra. whether a skill can
 	* Removed the NPC/Dance/Song inf2 check of AbraCadabra. whether a skill can
 	  come out or not is entirely decided by the abra db file now. [Skotlex]
 	  come out or not is entirely decided by the abra db file now. [Skotlex]
 	* Added structure s_addeffect to handle status change additions. Cleaned up
 	* Added structure s_addeffect to handle status change additions. Cleaned up

+ 7 - 0
conf-tmpl/battle/skill.conf

@@ -223,6 +223,13 @@ berserk_cancels_buffs: no
 max_heal: 9999
 max_heal: 9999
 max_heal_lv: 11
 max_heal_lv: 11
 
 
+// Emergency Recall Guild Skill setting.
+// 0: Skill is disabled, can't be used anywhere.
+// 1: Skill fails when used on "nowarpto" maps
+//    (note that by default all GVG maps are nowarpto)
+// 2: Skill is usable everywhere.
+emergency_call: 2
+
 // Max Possible Level of Monster skills
 // Max Possible Level of Monster skills
 // Note: If your MVPs are too tough, reduce it to 10.
 // Note: If your MVPs are too tough, reduce it to 10.
 mob_max_skilllvl: 100
 mob_max_skilllvl: 100

+ 2 - 0
src/map/battle.c

@@ -3321,6 +3321,7 @@ static const struct battle_data_short {
 	{ "pvp_exp",                           &battle_config.pvp_exp		},
 	{ "pvp_exp",                           &battle_config.pvp_exp		},
 	{ "gtb_sc_immunity",                   &battle_config.gtb_sc_immunity},
 	{ "gtb_sc_immunity",                   &battle_config.gtb_sc_immunity},
 	{ "guild_max_castles",                 &battle_config.guild_max_castles		},
 	{ "guild_max_castles",                 &battle_config.guild_max_castles		},
+	{ "emergency_call",                    &battle_config.emergency_call },
 	{ "death_penalty_type",                &battle_config.death_penalty_type		},
 	{ "death_penalty_type",                &battle_config.death_penalty_type		},
 	{ "death_penalty_base",                &battle_config.death_penalty_base		},
 	{ "death_penalty_base",                &battle_config.death_penalty_base		},
 	{ "death_penalty_job",                 &battle_config.death_penalty_job		},
 	{ "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_join_chat=0;
 	battle_config.gm_kick_chat=0;
 	battle_config.gm_kick_chat=0;
 	battle_config.guild_max_castles=0;
 	battle_config.guild_max_castles=0;
+	battle_config.emergency_call=2;
 	battle_config.skillfree = 0;
 	battle_config.skillfree = 0;
 	battle_config.skillup_limit = 0;
 	battle_config.skillup_limit = 0;
 	battle_config.wp_rate=100;
 	battle_config.wp_rate=100;

+ 1 - 0
src/map/battle.h

@@ -167,6 +167,7 @@ extern struct Battle_Config {
 	unsigned short guild_emperium_check;
 	unsigned short guild_emperium_check;
 	unsigned short guild_exp_limit;
 	unsigned short guild_exp_limit;
 	unsigned short guild_max_castles;
 	unsigned short guild_max_castles;
+	unsigned short emergency_call;
 	unsigned short pc_invincible_time;
 	unsigned short pc_invincible_time;
 	unsigned short pet_catch_rate;
 	unsigned short pet_catch_rate;
 	unsigned short pet_rename;
 	unsigned short pet_rename;

+ 8 - 0
src/map/skill.c

@@ -906,6 +906,14 @@ int skillnotok (int skillid, struct map_session_data *sd)
 				clif_skill_fail(sd,skillid,0,0);
 				clif_skill_fail(sd,skillid,0,0);
 				return 1;
 				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);
 	return (map[sd->bl.m].flag.noskill);
 }
 }