diff options
author | (no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-29 08:57:25 +0000 |
---|---|---|
committer | (no author) <(no author)@54d463be-8e91-2dee-dedb-b68131a5f0ec> | 2005-01-29 08:57:25 +0000 |
commit | c66c8c7943a24c134bea8bba631d1acd24f2e213 (patch) | |
tree | 39a23ef4d39f9f06ecde4f06ab08466f90b2b9f6 /src/char_sql/char.c | |
parent | 7f6f823834ec15931921693be1fd519d1e9efb49 (diff) | |
download | hercules-c66c8c7943a24c134bea8bba631d1acd24f2e213.tar.gz hercules-c66c8c7943a24c134bea8bba631d1acd24f2e213.tar.bz2 hercules-c66c8c7943a24c134bea8bba631d1acd24f2e213.tar.xz hercules-c66c8c7943a24c134bea8bba631d1acd24f2e213.zip |
fixed named item storage dupe
in sql
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1013 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql/char.c')
-rw-r--r-- | src/char_sql/char.c | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index b745ea504..4c8d7e29f 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -815,10 +815,11 @@ int memitemdata_to_sql(struct itemtemp mapitem, int eqcount, int noteqcount, int //printf("the same item : %d ; i : %d ; flag : %d\n", mapitem.notequip[i].nameid, i, mapitem.notequip[i].flag); //DEBUG-STRING } else{ + //named item dupe bugfix by Nimion [Lupus] sprintf(tmp_sql,"UPDATE `%s` SET `amount`='%d', `equip`='%d', `identify`='%d'," - "`attribute`='%d' WHERE `%s`='%d' AND `nameid`='%d'", + "`attribute`='%d' WHERE `%s`='%d' AND `nameid`='%d' AND `card0`='%d' AND `card2`='%d'", tablename, mapitem.notequip[i].amount, mapitem.notequip[i].equip, mapitem.notequip[i].identify, mapitem.notequip[i].attribute, - selectoption, char_id, mapitem.notequip[i].nameid); + selectoption, char_id, mapitem.notequip[i].nameid,mapitem.notequip[i].card[0],mapitem.notequip[i].card[2]); //printf("%s",tmp_sql); if(mysql_query(&mysql_handle, tmp_sql)) printf("DB server Error (UPdate `notequ %s`)- %s\n",tablename ,mysql_error(&mysql_handle)); |