diff options
author | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-02-20 19:47:17 +0000 |
---|---|---|
committer | ultramage <ultramage@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2009-02-20 19:47:17 +0000 |
commit | 72c7b505f1aee0d307f0dfc985d53c66e29fdf56 (patch) | |
tree | 80704d27eb459db5a96014cb86ec96f099be42d6 /src/char/char.c | |
parent | 6765daf13f27924282acbeed84f4481c04338596 (diff) | |
download | hercules-72c7b505f1aee0d307f0dfc985d53c66e29fdf56.tar.gz hercules-72c7b505f1aee0d307f0dfc985d53c66e29fdf56.tar.bz2 hercules-72c7b505f1aee0d307f0dfc985d53c66e29fdf56.tar.xz hercules-72c7b505f1aee0d307f0dfc985d53c66e29fdf56.zip |
Increased variable size for status/skill points to remove the 65k cap (bugreport:1579).
Added sql upgrade script to adjust the appropriate char table columns.
This is an enhancement to r5762.
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/trunk@13541 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char/char.c')
-rw-r--r-- | src/char/char.c | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/char/char.c b/src/char/char.c index 3d9df5752..526a4e78c 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -675,8 +675,8 @@ int mmo_char_fromstr(char *str, struct mmo_charstatus *p, struct global_reg *reg p->int_ = tmp_int[16]; p->dex = tmp_int[17]; p->luk = tmp_int[18]; - p->status_point = min(tmp_int[19], USHRT_MAX); - p->skill_point = min(tmp_int[20], USHRT_MAX); + p->status_point = tmp_int[19]; + p->skill_point = tmp_int[20]; p->option = tmp_int[21]; p->karma = tmp_int[22]; p->manner = tmp_int[23]; @@ -2077,10 +2077,7 @@ int parse_fromlogin(int fd) // remove specifical skills of classes 19, 4020 and 4042 for(j = 315; j <= 322; j++) { if (char_dat[i].status.skill[j].id > 0 && !char_dat[i].status.skill[j].flag) { - if (char_dat[i].status.skill_point > USHRT_MAX - char_dat[i].status.skill[j].lv) - char_dat[i].status.skill_point = USHRT_MAX; - else - char_dat[i].status.skill_point += char_dat[i].status.skill[j].lv; + char_dat[i].status.skill_point += char_dat[i].status.skill[j].lv; char_dat[i].status.skill[j].id = 0; char_dat[i].status.skill[j].lv = 0; } @@ -2088,11 +2085,7 @@ int parse_fromlogin(int fd) // remove specifical skills of classes 20, 4021 and 4043 for(j = 323; j <= 330; j++) { if (char_dat[i].status.skill[j].id > 0 && !char_dat[i].status.skill[j].flag) { - if (char_dat[i].status.skill_point > USHRT_MAX - char_dat[i].status.skill[j].lv) - char_dat[i].status.skill_point = USHRT_MAX; - else - char_dat[i].status.skill_point += char_dat[i].status.skill[j].lv; - + char_dat[i].status.skill_point += char_dat[i].status.skill[j].lv; char_dat[i].status.skill[j].id = 0; char_dat[i].status.skill[j].lv = 0; } |