summaryrefslogtreecommitdiff
path: root/src/map/battle.c
diff options
context:
space:
mode:
authorultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-07 12:06:25 +0000
committerultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec>2007-04-07 12:06:25 +0000
commit8c1bb7b498aae6203289dd9295e187b05c8b7014 (patch)
treebaabad310c3bef2983e12c33ff3bb417f5230a8d /src/map/battle.c
parentba13e8d6612aaddebe640d0538f9bb859b600ba2 (diff)
downloadhercules-8c1bb7b498aae6203289dd9295e187b05c8b7014.tar.gz
hercules-8c1bb7b498aae6203289dd9295e187b05c8b7014.tar.bz2
hercules-8c1bb7b498aae6203289dd9295e187b05c8b7014.tar.xz
hercules-8c1bb7b498aae6203289dd9295e187b05c8b7014.zip
- 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
Diffstat (limited to 'src/map/battle.c')
-rw-r--r--src/map/battle.c7
1 files changed, 4 insertions, 3 deletions
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)