From d0b9510cf0d7a47e53aa341462a1175326dfc09d Mon Sep 17 00:00:00 2001 From: shennetsind Date: Wed, 19 Feb 2014 15:16:46 -0300 Subject: Follow up 9132878d911cfe720eaad94ad3d4a5dd11958f99 Fixed issue (8023) with sc rows (only those of tick = -1, aka permanent scs) duplicating due to lack of primary index. Special Thanks to Flash, Haru. Note that the upgrade script will clear the permanent statuses from your sc_data table (e.g. lex aeterna, carts) to ensure no issues are left. Signed-off-by: shennetsind --- src/char/char.c | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src/char') diff --git a/src/char/char.c b/src/char/char.c index 1ee3cfd1d..5b497bd0c 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -3574,6 +3574,10 @@ int parse_frommap(int fd) cid = RFIFOL(fd, 8); count = RFIFOW(fd, 12); + /* clear; ensure no left overs e.g. permanent */ + if( SQL_ERROR == SQL->Query(sql_handle, "DELETE FROM `%s` WHERE `account_id` = '%d' AND `char_id`='%d'", scdata_db, aid, cid) ) + Sql_ShowDebug(sql_handle); + if( count > 0 ) { struct status_change_data data; -- cgit v1.2.3-60-g2f50