From 8c1bb7b498aae6203289dd9295e187b05c8b7014 Mon Sep 17 00:00:00 2001 From: ultramage Date: Sat, 7 Apr 2007 12:06:25 +0000 Subject: - Added function str2ip() to do platform-safe conversions - Removed a bunch of unused stuff - Moved SIGILL to unix-only defines since tests and docs show that Windows doesn't issue SIGILL - Fixed several annoying compilation warnings git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@10177 54d463be-8e91-2dee-dedb-b68131a5f0ec --- src/map/battle.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/map/battle.c') diff --git a/src/map/battle.c b/src/map/battle.c index 6eda8fa78..54c416ae7 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -12,6 +12,7 @@ #include "../common/malloc.h" #include "../common/showmsg.h" #include "../common/ers.h" +#include "../common/strlib.h" #include "map.h" #include "pc.h" @@ -3710,7 +3711,7 @@ 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 = 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++) @@ -3725,7 +3726,7 @@ int battle_get_value(const char* w1) { 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) { - return * battle_data_short[i].val; + return *battle_data_short[i].val; } for(i = 0; i < sizeof(battle_data_int) / (sizeof(battle_data_int[0])); i++) if (strcmpi(w1, battle_data_int[i].str) == 0) { @@ -4236,7 +4237,7 @@ void battle_validate_conf() { if (battle_config.any_warp_GM_min_level > 100) battle_config.any_warp_GM_min_level = 100; - if (battle_config.vending_max_value > MAX_ZENY || battle_config.vending_max_value==0) + if (battle_config.vending_max_value > MAX_ZENY || battle_config.vending_max_value <= 0) battle_config.vending_max_value = MAX_ZENY; if (battle_config.vending_tax > 10000) -- cgit v1.2.3-60-g2f50