From 0c2cf7579324ade56287b9a15f1fc7c0a8dffffd Mon Sep 17 00:00:00 2001 From: Andrei Karas Date: Mon, 16 Jul 2018 06:08:24 +0300 Subject: Replace item id shorts to int in char server. --- src/char/int_storage.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/char/int_storage.c') diff --git a/src/char/int_storage.c b/src/char/int_storage.c index da4522971..130df5515 100644 --- a/src/char/int_storage.c +++ b/src/char/int_storage.c @@ -71,7 +71,7 @@ static int inter_storage_tosql(int account_id, const struct storage_data *p) && (p_it = &VECTOR_INDEX(p->item, j)) != NULL && cp_it->nameid == p_it->nameid && cp_it->unique_id == p_it->unique_id - && memcmp(p_it->card, cp_it->card, sizeof(short) * MAX_SLOTS) == 0 + && memcmp(p_it->card, cp_it->card, sizeof(int) * MAX_SLOTS) == 0 && memcmp(p_it->option, cp_it->option, 5 * MAX_ITEM_OPTIONS) == 0); if (j < VECTOR_LENGTH(p->item)) { @@ -373,7 +373,7 @@ static bool inter_storage_retrieve_bound_items(int char_id, int account_id, int memset(&item, 0, sizeof(item)); SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &item.id, sizeof item.id, NULL, NULL); - SQL->StmtBindColumn(stmt, 1, SQLDT_SHORT, &item.nameid, sizeof item.nameid, NULL, NULL); + SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &item.nameid, sizeof item.nameid, NULL, NULL); SQL->StmtBindColumn(stmt, 2, SQLDT_SHORT, &item.amount, sizeof item.amount, NULL, NULL); SQL->StmtBindColumn(stmt, 3, SQLDT_UINT, &item.equip, sizeof item.equip, NULL, NULL); SQL->StmtBindColumn(stmt, 4, SQLDT_CHAR, &item.identify, sizeof item.identify, NULL, NULL); @@ -384,7 +384,7 @@ static bool inter_storage_retrieve_bound_items(int char_id, int account_id, int SQL->StmtBindColumn(stmt, 9, SQLDT_UINT64, &item.unique_id, sizeof item.unique_id, NULL, NULL); /* Card Slots */ for (j = 0; j < MAX_SLOTS; ++j) - SQL->StmtBindColumn(stmt, 10 + j, SQLDT_SHORT, &item.card[j], sizeof item.card[j], NULL, NULL); + SQL->StmtBindColumn(stmt, 10 + j, SQLDT_INT, &item.card[j], sizeof item.card[j], NULL, NULL); /* Item Options */ for (j = 0; j < MAX_ITEM_OPTIONS; ++j) { SQL->StmtBindColumn(stmt, 10 + MAX_SLOTS + j * 2, SQLDT_INT16, &item.option[j].index, sizeof item.option[j].index, NULL, NULL); -- cgit v1.2.3-70-g09d2