diff options
author | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-07 13:48:54 +0000 |
---|---|---|
committer | skotlex <skotlex@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2006-07-07 13:48:54 +0000 |
commit | bda4ddd3612d2ba0d6abf62bb2ccf4c9f3b33e2b (patch) | |
tree | 91ec492c387e7e9886e1c74c6953f34530c2a3e9 | |
parent | 2479f55a86fc2919805e4f38f6ae556f2f045fd4 (diff) | |
download | hercules-bda4ddd3612d2ba0d6abf62bb2ccf4c9f3b33e2b.tar.gz hercules-bda4ddd3612d2ba0d6abf62bb2ccf4c9f3b33e2b.tar.bz2 hercules-bda4ddd3612d2ba0d6abf62bb2ccf4c9f3b33e2b.tar.xz hercules-bda4ddd3612d2ba0d6abf62bb2ccf4c9f3b33e2b.zip |
- Fixed signed/unsigned comparison issues in the char txt/sql server.
- Fixed the cooking success chances. Thanks to Ishizu Chan.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@7560 54d463be-8e91-2dee-dedb-b68131a5f0ec
-rw-r--r-- | Changelog-Trunk.txt | 3 | ||||
-rw-r--r-- | src/char/int_party.c | 6 | ||||
-rw-r--r-- | src/char/inter.c | 6 | ||||
-rw-r--r-- | src/char/inter.h | 2 | ||||
-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 | ||||
-rw-r--r-- | src/map/skill.c | 4 |
8 files changed, 19 insertions, 15 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt index ebf3bad06..94b16da51 100644 --- a/Changelog-Trunk.txt +++ b/Changelog-Trunk.txt @@ -4,6 +4,9 @@ AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
2006/07/07
+ * Fixed signed/unsigned comparison issues in the char txt/sql server.
+ [Skotlex]
+ * Fixed the cooking success chances. Thanks to Ishizu Chan. [Skotlex]
* Added a temporary band-aid to prevent executing the script of non-arrows
when they are equipped on the arrow-slot (until the actual cause of why
pc_unequipitem is not working correctly is discovered/fixed) [Skotlex]
diff --git a/src/char/int_party.c b/src/char/int_party.c index 0c1608361..b0cedabe6 100644 --- a/src/char/int_party.c +++ b/src/char/int_party.c @@ -35,7 +35,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++){
@@ -58,7 +59,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/inter.c b/src/char/inter.c index c3940765e..80d9f653a 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -36,7 +36,7 @@ struct accreg { struct global_reg reg[ACCOUNT_REG_NUM];
};
-int party_share_level = 10;
+unsigned int party_share_level = 10;
int kick_on_disconnect = 1;
// 送信パケット長リスト
@@ -209,9 +209,7 @@ int inter_config_read(const char *cfgName) { } else if (strcmpi(w1, "kick_on_disconnect") == 0) {
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, "inter_log_filename") == 0) {
strncpy(inter_log_filename, w2, sizeof(inter_log_filename));
} else if(strcmpi(w1,"log_inter")==0) {
diff --git a/src/char/inter.h b/src/char/inter.h index ac8709cdc..b95d041dd 100644 --- a/src/char/inter.h +++ b/src/char/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;
extern char inter_log_filename[1024];
extern int log_inter;
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];
diff --git a/src/map/skill.c b/src/map/skill.c index 1aac9f22c..5c020b76d 100644 --- a/src/map/skill.c +++ b/src/map/skill.c @@ -10085,8 +10085,8 @@ int skill_produce_mix (struct map_session_data *sd, int skill_id, int nameid, in if (sd->menuskill_lv >= 15) //Legendary Cooking Set. make_per = 10000; //100% Success else - make_per = 12*(sd->menuskill_lv-10) //12% chance per set level. - + 700 - 70*(skill_produce_db[idx].itemlv-10); //70% - 7% per dish level + make_per = 120*(sd->menuskill_lv-10) //12% chance per set level. + + 7000 - 700*(skill_produce_db[idx].itemlv-10); //70% - 7% per dish level break; } make_per = 5000; |