summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-24 03:45:45 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-24 03:45:45 +0000
commitf3d5e6ef7b9e66bcf04ee91b0cd706c5a5c70a12 (patch)
treeaaffbb3b1153c55d0e5015a412d519857210e5bd /src
parent6a6ecaf8ff94fb319767c2707f06087415624637 (diff)
downloadhercules-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')
-rw-r--r--src/char_sql/char.c16
-rw-r--r--src/map/pc.c3
2 files changed, 11 insertions, 8 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");
diff --git a/src/map/pc.c b/src/map/pc.c
index 151ec47a3..aab6e406b 100644
--- a/src/map/pc.c
+++ b/src/map/pc.c
@@ -416,8 +416,7 @@ int pc_makesavestatus(struct map_session_data *sd)
sd->status.skill[i].id=0;
sd->status.skill[i].lv=0;
sd->status.skill[i].flag=0;
- } else if ((sd->status.skill[i].lv != 0) && (sd->status.skill[i].id == 0))
- sd->status.skill[i].id = i;
+ }
}
return 0;