summaryrefslogtreecommitdiff
path: root/src/map
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
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')
-rw-r--r--src/map/atcommand.c1
-rw-r--r--src/map/battle.c7
-rw-r--r--src/map/map.c1
-rw-r--r--src/map/vending.c6
4 files changed, 9 insertions, 6 deletions
diff --git a/src/map/atcommand.c b/src/map/atcommand.c
index f947c0b3b..6acd8334f 100644
--- a/src/map/atcommand.c
+++ b/src/map/atcommand.c
@@ -15,6 +15,7 @@
#include "../common/showmsg.h"
#include "../common/malloc.h"
#include "../common/socket.h"
+#include "../common/strlib.h"
#include "atcommand.h"
#include "log.h"
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)
diff --git a/src/map/map.c b/src/map/map.c
index 43140677e..d02c6da55 100644
--- a/src/map/map.c
+++ b/src/map/map.c
@@ -20,6 +20,7 @@
#include "../common/showmsg.h"
#include "../common/version.h"
#include "../common/nullpo.h"
+#include "../common/strlib.h"
#include "map.h"
#include "chrif.h"
diff --git a/src/map/vending.c b/src/map/vending.c
index 63551272c..44f1a0f11 100644
--- a/src/map/vending.c
+++ b/src/map/vending.c
@@ -227,7 +227,7 @@ void vending_openvending(struct map_session_data *sd,int len,char *message,int f
vending_skill_lvl = pc_checkskill(sd, MC_VENDING);
if(!vending_skill_lvl || !pc_iscarton(sd)) { // cart skill and cart check [Valaris]
- clif_skill_fail(sd,MC_VENDING,0,0);
+ clif_skill_fail(sd, MC_VENDING, 0, 0);
return;
}
@@ -247,8 +247,8 @@ void vending_openvending(struct map_session_data *sd,int len,char *message,int f
}
sd->vending[i].amount = *(short*)(p+2+8*j);
sd->vending[i].value = *(int*)(p+4+8*j);
- if(sd->vending[i].value > battle_config.vending_max_value)
- sd->vending[i].value=battle_config.vending_max_value;
+ if(sd->vending[i].value > (unsigned int)battle_config.vending_max_value)
+ sd->vending[i].value = (unsigned int)battle_config.vending_max_value;
else if(sd->vending[i].value < 1)
sd->vending[i].value = 1000000; // auto set to 1 million [celest]
// カート内のアイテム数と販売するアイテム数に相違があったら中止