diff options
Diffstat (limited to 'src/char_sql/int_storage.c')
-rw-r--r-- | src/char_sql/int_storage.c | 92 |
1 files changed, 46 insertions, 46 deletions
diff --git a/src/char_sql/int_storage.c b/src/char_sql/int_storage.c index 7f059fcf8..c13c782a6 100644 --- a/src/char_sql/int_storage.c +++ b/src/char_sql/int_storage.c @@ -24,19 +24,19 @@ int storage_tosql(int account_id,struct storage *p){ int count=0; struct itemtmp mapitem[MAX_GUILD_STORAGE]; for(i=0;i<MAX_STORAGE;i++){ - if(p->storage[i].nameid>0){ + if(p->storage_[i].nameid>0){ mapitem[count].flag=0; - mapitem[count].id = p->storage[i].id; - mapitem[count].nameid=p->storage[i].nameid; - mapitem[count].amount = p->storage[i].amount; - mapitem[count].equip = p->storage[i].equip; - mapitem[count].identify = p->storage[i].identify; - mapitem[count].refine = p->storage[i].refine; - mapitem[count].attribute = p->storage[i].attribute; - mapitem[count].card[0] = p->storage[i].card[0]; - mapitem[count].card[1] = p->storage[i].card[1]; - mapitem[count].card[2] = p->storage[i].card[2]; - mapitem[count].card[3] = p->storage[i].card[3]; + mapitem[count].id = p->storage_[i].id; + mapitem[count].nameid=p->storage_[i].nameid; + mapitem[count].amount = p->storage_[i].amount; + mapitem[count].equip = p->storage_[i].equip; + mapitem[count].identify = p->storage_[i].identify; + mapitem[count].refine = p->storage_[i].refine; + mapitem[count].attribute = p->storage_[i].attribute; + mapitem[count].card[0] = p->storage_[i].card[0]; + mapitem[count].card[1] = p->storage_[i].card[1]; + mapitem[count].card[2] = p->storage_[i].card[2]; + mapitem[count].card[3] = p->storage_[i].card[3]; count++; } } @@ -64,17 +64,17 @@ int storage_fromsql(int account_id, struct storage *p){ if (sql_res) { while((sql_row = mysql_fetch_row(sql_res))) { //start to fetch - p->storage[i].id= atoi(sql_row[0]); - p->storage[i].nameid= atoi(sql_row[1]); - p->storage[i].amount= atoi(sql_row[2]); - p->storage[i].equip= atoi(sql_row[3]); - p->storage[i].identify= atoi(sql_row[4]); - p->storage[i].refine= atoi(sql_row[5]); - p->storage[i].attribute= atoi(sql_row[6]); - p->storage[i].card[0]= atoi(sql_row[7]); - p->storage[i].card[1]= atoi(sql_row[8]); - p->storage[i].card[2]= atoi(sql_row[9]); - p->storage[i].card[3]= atoi(sql_row[10]); + p->storage_[i].id= atoi(sql_row[0]); + p->storage_[i].nameid= atoi(sql_row[1]); + p->storage_[i].amount= atoi(sql_row[2]); + p->storage_[i].equip= atoi(sql_row[3]); + p->storage_[i].identify= atoi(sql_row[4]); + p->storage_[i].refine= atoi(sql_row[5]); + p->storage_[i].attribute= atoi(sql_row[6]); + p->storage_[i].card[0]= atoi(sql_row[7]); + p->storage_[i].card[1]= atoi(sql_row[8]); + p->storage_[i].card[2]= atoi(sql_row[9]); + p->storage_[i].card[3]= atoi(sql_row[10]); p->storage_amount = ++i; } mysql_free_result(sql_res); @@ -92,19 +92,19 @@ int guild_storage_tosql(int guild_id, struct guild_storage *p){ int count=0; struct itemtmp mapitem[MAX_GUILD_STORAGE]; for(i=0;i<MAX_GUILD_STORAGE;i++){ - if(p->storage[i].nameid>0){ + if(p->storage_[i].nameid>0){ mapitem[count].flag=0; - mapitem[count].id = p->storage[i].id; - mapitem[count].nameid=p->storage[i].nameid; - mapitem[count].amount = p->storage[i].amount; - mapitem[count].equip = p->storage[i].equip; - mapitem[count].identify = p->storage[i].identify; - mapitem[count].refine = p->storage[i].refine; - mapitem[count].attribute = p->storage[i].attribute; - mapitem[count].card[0] = p->storage[i].card[0]; - mapitem[count].card[1] = p->storage[i].card[1]; - mapitem[count].card[2] = p->storage[i].card[2]; - mapitem[count].card[3] = p->storage[i].card[3]; + mapitem[count].id = p->storage_[i].id; + mapitem[count].nameid=p->storage_[i].nameid; + mapitem[count].amount = p->storage_[i].amount; + mapitem[count].equip = p->storage_[i].equip; + mapitem[count].identify = p->storage_[i].identify; + mapitem[count].refine = p->storage_[i].refine; + mapitem[count].attribute = p->storage_[i].attribute; + mapitem[count].card[0] = p->storage_[i].card[0]; + mapitem[count].card[1] = p->storage_[i].card[1]; + mapitem[count].card[2] = p->storage_[i].card[2]; + mapitem[count].card[3] = p->storage_[i].card[3]; count++; } } @@ -134,17 +134,17 @@ int guild_storage_fromsql(int guild_id, struct guild_storage *p){ if (sql_res) { while((sql_row = mysql_fetch_row(sql_res))) { //start to fetch - p->storage[i].id= atoi(sql_row[0]); - p->storage[i].nameid= atoi(sql_row[1]); - p->storage[i].amount= atoi(sql_row[2]); - p->storage[i].equip= atoi(sql_row[3]); - p->storage[i].identify= atoi(sql_row[4]); - p->storage[i].refine= atoi(sql_row[5]); - p->storage[i].attribute= atoi(sql_row[6]); - p->storage[i].card[0]= atoi(sql_row[7]); - p->storage[i].card[1]= atoi(sql_row[8]); - p->storage[i].card[2]= atoi(sql_row[9]); - p->storage[i].card[3]= atoi(sql_row[10]); + p->storage_[i].id= atoi(sql_row[0]); + p->storage_[i].nameid= atoi(sql_row[1]); + p->storage_[i].amount= atoi(sql_row[2]); + p->storage_[i].equip= atoi(sql_row[3]); + p->storage_[i].identify= atoi(sql_row[4]); + p->storage_[i].refine= atoi(sql_row[5]); + p->storage_[i].attribute= atoi(sql_row[6]); + p->storage_[i].card[0]= atoi(sql_row[7]); + p->storage_[i].card[1]= atoi(sql_row[8]); + p->storage_[i].card[2]= atoi(sql_row[9]); + p->storage_[i].card[3]= atoi(sql_row[10]); p->storage_amount = ++i; if (i >= MAX_GUILD_STORAGE) break; |