diff options
Diffstat (limited to 'src/char_sql')
-rw-r--r-- | src/char_sql/int_party.c | 6 | ||||
-rw-r--r-- | src/char_sql/inter.c | 5 | ||||
-rw-r--r-- | src/char_sql/inter.h | 2 |
3 files changed, 7 insertions, 6 deletions
diff --git a/src/char_sql/int_party.c b/src/char_sql/int_party.c index 3a2bfa094..bfd0cef79 100644 --- a/src/char_sql/int_party.c +++ b/src/char_sql/int_party.c @@ -56,7 +56,8 @@ int mapif_party_optionchanged(int fd,struct party *p, int account_id, int flag); //Updates party's level range and unsets even share if broken.
static int int_party_check_lv(struct party_data *p) {
- int i,lv;
+ int i;
+ unsigned int lv;
p->min_lv = UINT_MAX;
p->max_lv = 0;
for(i=0;i<MAX_PARTY;i++){
@@ -78,7 +79,8 @@ static int int_party_check_lv(struct party_data *p) { //Calculates the state of a party.
static void int_party_calc_state(struct party_data *p)
{
- int i, lv;
+ int i;
+ unsigned int lv;
p->min_lv = UINT_MAX;
p->max_lv = 0;
p->party.count =
diff --git a/src/char_sql/inter.c b/src/char_sql/inter.c index 1097cd552..2566a159f 100644 --- a/src/char_sql/inter.c +++ b/src/char_sql/inter.c @@ -29,7 +29,7 @@ struct accreg { static struct accreg *accreg_pt;
-int party_share_level = 10;
+unsigned int party_share_level = 10;
int kick_on_disconnect = 1;
MYSQL mysql_handle;
MYSQL_RES* sql_res ;
@@ -260,8 +260,7 @@ int inter_config_read(const char *cfgName) { kick_on_disconnect=atoi(w2);
}
else if(strcmpi(w1,"party_share_level")==0){
- party_share_level=atoi(w2);
- if(party_share_level < 0) party_share_level = 0;
+ party_share_level=(unsigned int)atof(w2);
}
else if(strcmpi(w1,"log_inter")==0){
log_inter = atoi(w2);
diff --git a/src/char_sql/inter.h b/src/char_sql/inter.h index 12a06b314..512cf666a 100644 --- a/src/char_sql/inter.h +++ b/src/char_sql/inter.h @@ -18,7 +18,7 @@ int inter_log(char *fmt,...); #define inter_cfgName "conf/inter_athena.conf"
-extern int party_share_level;
+extern unsigned int party_share_level;
extern int kick_on_disconnect; //For deciding whether characters are kicked or not on reconnections. [Skotlex]
extern char inter_log_filename[1024];
|