summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-07 04:21:29 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-07 04:21:29 +0000
commitfe1cc2f25ac9ddaad8213e6f34268f1329c3d865 (patch)
tree31e23dd04d1db2632626ebf960061c9c3885527c /src/map/battle.c
parent6729808a6dd1e3760c3f8b5453d07f27f35dca45 (diff)
downloadhercules-fe1cc2f25ac9ddaad8213e6f34268f1329c3d865.tar.gz
hercules-fe1cc2f25ac9ddaad8213e6f34268f1329c3d865.tar.bz2
hercules-fe1cc2f25ac9ddaad8213e6f34268f1329c3d865.tar.xz
hercules-fe1cc2f25ac9ddaad8213e6f34268f1329c3d865.zip
- Moved e_mail_check() and config_switch() to strlib.h
- Synchronized the login servers a bit git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10174 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c24
1 files changed, 2 insertions, 22 deletions
diff --git a/src/map/battle.c b/src/map/battle.c
index f758c3914..6eda8fa78 100644
--- a/src/map/battle.c
+++ b/src/map/battle.c
@@ -3339,26 +3339,6 @@ int battle_check_range(struct block_list *src,struct block_list *bl,int range)
return path_search_long(NULL,src->m,src->x,src->y,bl->x,bl->y);
}
-/*==========================================
- * Return numerical value of a switch configuration (modified by [Yor])
- * on/off, english, français, deutsch, español
- *------------------------------------------
- */
-int battle_config_switch(const char *str) {
- if(strncmpi(str, "on",2) == 0 ||
- strncmpi(str, "yes",3) == 0 ||
- strncmpi(str, "oui",3) == 0 ||
- strncmpi(str, "ja",2) == 0 ||
- strncmpi(str, "si",2) == 0)
- return 1;
- if(strncmpi(str, "off",3) == 0 ||
- strncmpi(str, "no",2) == 0 ||
- strncmpi(str, "non",3) == 0 ||
- strncmpi(str, "nein",4) == 0)
- return 0;
- return (int)strtol(str,NULL,0);
-}
-
static const struct battle_data_short {
const char *str;
unsigned short *val;
@@ -3730,12 +3710,12 @@ int battle_set_value(const char* w1, const char* w2) {
int i;
for(i = 0; i < sizeof(battle_data_short) / (sizeof(battle_data_short[0])); i++)
if (strcmpi(w1, battle_data_short[i].str) == 0) {
- * battle_data_short[i].val = battle_config_switch(w2);
+ * battle_data_short[i].val = config_switch(w2);
return 1;
}
for(i = 0; i < sizeof(battle_data_int) / (sizeof(battle_data_int[0])); i++)
if (strcmpi(w1, battle_data_int[i].str) == 0) {
- *battle_data_int[i].val = battle_config_switch(w2);
+ *battle_data_int[i].val = config_switch(w2);
return 1;
}
return 0;