diff options
author | Haru <haru@dotalux.com> | 2018-07-23 01:04:25 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-07-23 01:04:25 +0200 |
commit | be3209bc5ff1b88314c47a6fdc53d73deaa9e96a (patch) | |
tree | a12e7ac7b7e6ae8410ba170d345a3022da0e51a5 /src/char/int_storage.c | |
parent | bcaf5eaa9c8ef65068ab5468d7bd13e2df516cab (diff) | |
parent | 6c73aa1b03b04d4d9a2ba9056b8583475856da12 (diff) | |
download | hercules-be3209bc5ff1b88314c47a6fdc53d73deaa9e96a.tar.gz hercules-be3209bc5ff1b88314c47a6fdc53d73deaa9e96a.tar.bz2 hercules-be3209bc5ff1b88314c47a6fdc53d73deaa9e96a.tar.xz hercules-be3209bc5ff1b88314c47a6fdc53d73deaa9e96a.zip |
Merge pull request #2134 from 4144/itemint
Update int fields to using int32
Diffstat (limited to 'src/char/int_storage.c')
-rw-r--r-- | src/char/int_storage.c | 6 |
1 files changed, 3 insertions, 3 deletions
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); |