summaryrefslogtreecommitdiff
path: root/src/char_sql
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-29 05:05:50 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2005-03-29 05:05:50 +0000
commit7bfe35400c79bf97a5b0bed9f170912c37cf9452 (patch)
tree5651eae9e5b8e67d4f5476445d5faccb99c72248 /src/char_sql
parent1038bc42b33b73eca592b22f2868844b6e64e842 (diff)
downloadhercules-7bfe35400c79bf97a5b0bed9f170912c37cf9452.tar.gz
hercules-7bfe35400c79bf97a5b0bed9f170912c37cf9452.tar.bz2
hercules-7bfe35400c79bf97a5b0bed9f170912c37cf9452.tar.xz
hercules-7bfe35400c79bf97a5b0bed9f170912c37cf9452.zip
Fixed use of storage variable to conform to ANSI C spec [MouseJstr]
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@1327 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql')
-rw-r--r--src/char_sql/int_storage.c92
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;