diff options
-rw-r--r-- | src/char_sql/char.c | 4 | ||||
-rw-r--r-- | src/char_sql/int_auction.c | 1 | ||||
-rw-r--r-- | src/char_sql/int_storage.c | 2 |
3 files changed, 5 insertions, 2 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c index edfc19498..9a03612d4 100644 --- a/src/char_sql/char.c +++ b/src/char_sql/char.c @@ -1035,7 +1035,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything || SQL_ERROR == SqlStmt_BindColumn(stmt, 4, SQLDT_CHAR, &tmp_item.identify, 0, NULL, NULL) || SQL_ERROR == SqlStmt_BindColumn(stmt, 5, SQLDT_CHAR, &tmp_item.refine, 0, NULL, NULL) || SQL_ERROR == SqlStmt_BindColumn(stmt, 6, SQLDT_CHAR, &tmp_item.attribute, 0, NULL, NULL) - || SQL_ERROR == SqlStmt_BindColumn(stmt, 7, SQLDT_UINT, &tmp_item.expire_time, 0, NULL, NULL) ) + || SQL_ERROR == SqlStmt_BindColumn(stmt, 7, SQLDT_UINT, &tmp_item.expire_time, 0, NULL, NULL) ) SqlStmt_ShowDebug(stmt); for( i = 0; i < MAX_SLOTS; ++i ) if( SQL_ERROR == SqlStmt_BindColumn(stmt, 8+i, SQLDT_SHORT, &tmp_item.card[i], 0, NULL, NULL) ) @@ -1064,7 +1064,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_everything || SQL_ERROR == SqlStmt_BindColumn(stmt, 4, SQLDT_CHAR, &tmp_item.identify, 0, NULL, NULL) || SQL_ERROR == SqlStmt_BindColumn(stmt, 5, SQLDT_CHAR, &tmp_item.refine, 0, NULL, NULL) || SQL_ERROR == SqlStmt_BindColumn(stmt, 6, SQLDT_CHAR, &tmp_item.attribute, 0, NULL, NULL) - || SQL_ERROR == SqlStmt_BindColumn(stmt, 7, SQLDT_UINT, &tmp_item.expire_time, 0, NULL, NULL) ) + || SQL_ERROR == SqlStmt_BindColumn(stmt, 7, SQLDT_UINT, &tmp_item.expire_time, 0, NULL, NULL) ) SqlStmt_ShowDebug(stmt); for( i = 0; i < MAX_SLOTS; ++i ) if( SQL_ERROR == SqlStmt_BindColumn(stmt, 8+i, SQLDT_SHORT, &tmp_item.card[i], 0, NULL, NULL) ) diff --git a/src/char_sql/int_auction.c b/src/char_sql/int_auction.c index fa9654f90..06d37aa0a 100644 --- a/src/char_sql/int_auction.c +++ b/src/char_sql/int_auction.c @@ -109,6 +109,7 @@ unsigned int auction_create(struct auction_data *auction) auction->item.amount = 1; auction->item.identify = 1; + auction->item.expire_time = 0; auction->auction_id = (unsigned int)SqlStmt_LastInsertId(stmt); auction->auction_end_timer = add_timer( gettick() + tick , auction_end_timer, auction->auction_id, 0); diff --git a/src/char_sql/int_storage.c b/src/char_sql/int_storage.c index d85c4cf07..cc6ccd1b7 100644 --- a/src/char_sql/int_storage.c +++ b/src/char_sql/int_storage.c @@ -59,6 +59,7 @@ int storage_fromsql(int account_id, struct storage_data* p) Sql_GetData(sql_handle, 4, &data, NULL); item->identify = atoi(data); Sql_GetData(sql_handle, 5, &data, NULL); item->refine = atoi(data); Sql_GetData(sql_handle, 6, &data, NULL); item->attribute = atoi(data); + item->expire_time = 0; for( j = 0; j < MAX_SLOTS; ++j ) { Sql_GetData(sql_handle, 7+j, &data, NULL); item->card[j] = atoi(data); @@ -116,6 +117,7 @@ int guild_storage_fromsql(int guild_id, struct guild_storage* p) Sql_GetData(sql_handle, 4, &data, NULL); item->identify = atoi(data); Sql_GetData(sql_handle, 5, &data, NULL); item->refine = atoi(data); Sql_GetData(sql_handle, 6, &data, NULL); item->attribute = atoi(data); + item->expire_time = 0; for( j = 0; j < MAX_SLOTS; ++j ) { Sql_GetData(sql_handle, 7+j, &data, NULL); item->card[j] = atoi(data); |