git-svn-id: https://svn.code.sf.net/p/rathena/svn/trunk@13374 54d463be-8e91-2dee-dedb-b68131a5f0ec
This commit is contained in:
ultramage
2008-11-17 15:47:29 +00:00
parent bd429b5a92
commit 859cb0ad08
3 changed files with 5 additions and 2 deletions

View File

@@ -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) )

View File

@@ -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);

View File

@@ -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);