diff options
author | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-24 03:45:45 +0000 |
---|---|---|
committer | amber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2004-12-24 03:45:45 +0000 |
commit | f3d5e6ef7b9e66bcf04ee91b0cd706c5a5c70a12 (patch) | |
tree | aaffbb3b1153c55d0e5015a412d519857210e5bd /src/char_sql | |
parent | 6a6ecaf8ff94fb319767c2707f06087415624637 (diff) | |
download | hercules-f3d5e6ef7b9e66bcf04ee91b0cd706c5a5c70a12.tar.gz hercules-f3d5e6ef7b9e66bcf04ee91b0cd706c5a5c70a12.tar.bz2 hercules-f3d5e6ef7b9e66bcf04ee91b0cd706c5a5c70a12.tar.xz hercules-f3d5e6ef7b9e66bcf04ee91b0cd706c5a5c70a12.zip |
Fix
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@764 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql')
-rw-r--r-- | src/char_sql/char.c | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index b390b2c82..f637e0683 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -543,12 +543,16 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus *p){ } diff = 0; - for(i=0;i<MAX_SKILL;i++) - if((p->skill[i].id != cp->skill[i].id) || (p->skill[i].lv != cp->skill[i].lv) || - (p->skill[i].flag != cp->skill[i].flag)) { - diff = 1; - break; - } + for(i=0;i<MAX_SKILL;i++) { + if ((p.skill[i].lv != 0) && (p.skill[i].id == 0)) + p->skill[i].id = i; + + if((p->skill[i].id != cp->skill[i].id) || (p->skill[i].lv != cp->skill[i].lv) || + (p->skill[i].flag != cp->skill[i].flag)) { + diff = 1; + break; + } + } if (diff) { //printf("- Save skill data to MySQL!\n"); |