summaryrefslogtreecommitdiff
path: root/src/char_sql
diff options
context:
space:
mode:
authoramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-29 19:18:18 +0000
committeramber <amber@54d463be-8e91-2dee-dedb-b68131a5f0ec>2004-12-29 19:18:18 +0000
commitab0a9edc2f5754c4f778c008caff1682d43d65eb (patch)
tree639e173ce8010bd59ddddb5460fdc56858a1ac1a /src/char_sql
parente5bce970b13d3485cfa823aa4810787c2006181a (diff)
downloadhercules-ab0a9edc2f5754c4f778c008caff1682d43d65eb.tar.gz
hercules-ab0a9edc2f5754c4f778c008caff1682d43d65eb.tar.bz2
hercules-ab0a9edc2f5754c4f778c008caff1682d43d65eb.tar.xz
hercules-ab0a9edc2f5754c4f778c008caff1682d43d65eb.zip
cxx updates
git-svn-id: https://rathena.svn.sourceforge.net/svnroot/rathena/branches/stable@861 54d463be-8e91-2dee-dedb-b68131a5f0ec
Diffstat (limited to 'src/char_sql')
-rw-r--r--src/char_sql/char.c10
-rw-r--r--src/char_sql/int_guild.c10
-rw-r--r--src/char_sql/int_pet.c8
3 files changed, 14 insertions, 14 deletions
diff --git a/src/char_sql/char.c b/src/char_sql/char.c
index be8611889..6e982ac67 100644
--- a/src/char_sql/char.c
+++ b/src/char_sql/char.c
@@ -440,7 +440,7 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
//=====================================================================================================
- if ((p->base_exp != cp->base_exp) || (p->class != cp->class) ||
+ if ((p->base_exp != cp->base_exp) || (p->class_ != cp->class_) ||
(p->base_level != cp->base_level) || (p->job_level != cp->job_level) ||
(p->job_exp != cp->job_exp) || (p->zeny != cp->zeny) ||
(p->last_point.x != cp->last_point.x) || (p->last_point.y != cp->last_point.y) ||
@@ -498,7 +498,7 @@ int mmo_char_tosql(int char_id, struct mmo_charstatus *p){
"`option`='%d',`karma`='%d',`manner`='%d',`party_id`='%d',`guild_id`='%d',`pet_id`='%d',"
"`hair`='%d',`hair_color`='%d',`clothes_color`='%d',`weapon`='%d',`shield`='%d',`head_top`='%d',`head_mid`='%d',`head_bottom`='%d',"
"`last_map`='%s',`last_x`='%d',`last_y`='%d',`save_map`='%s',`save_x`='%d',`save_y`='%d',`partner_id`='%d' WHERE `account_id`='%d' AND `char_id` = '%d'",
- char_db, p->class, p->base_level, p->job_level,
+ char_db, p->class_, p->base_level, p->job_level,
p->base_exp, p->job_exp, p->zeny,
p->max_hp, p->hp, p->max_sp, p->sp, p->status_point, p->skill_point,
p->str, p->agi, p->vit, p->int_, p->dex, p->luk,
@@ -913,7 +913,7 @@ int mmo_char_fromsql(int char_id, struct mmo_charstatus *p, int online){
p->account_id = atoi(sql_row[1]);
p->char_num = atoi(sql_row[2]);
strcpy(p->name, sql_row[3]);
- p->class = atoi(sql_row[4]);
+ p->class_ = atoi(sql_row[4]);
p->base_level = atoi(sql_row[5]);
p->job_level = atoi(sql_row[6]);
p->base_exp = atoi(sql_row[7]);
@@ -1429,7 +1429,7 @@ int mmo_char_send006b(int fd, struct char_session_data *sd) {
WFIFOW(fd,j+46) = (p->sp > 0x7fff) ? 0x7fff : p->sp;
WFIFOW(fd,j+48) = (p->max_sp > 0x7fff) ? 0x7fff : p->max_sp;
WFIFOW(fd,j+50) = DEFAULT_WALK_SPEED; // p->speed;
- WFIFOW(fd,j+52) = p->class;
+ WFIFOW(fd,j+52) = p->class_;
WFIFOW(fd,j+54) = p->hair;
WFIFOW(fd,j+56) = p->weapon;
WFIFOW(fd,j+58) = p->base_level;
@@ -2539,7 +2539,7 @@ int parse_char(int fd) {
WFIFOW(fd,2+46) = (char_dat[i].sp > 0x7fff) ? 0x7fff : char_dat[i].sp;
WFIFOW(fd,2+48) = (char_dat[i].max_sp > 0x7fff) ? 0x7fff : char_dat[i].max_sp;
WFIFOW(fd,2+50) = DEFAULT_WALK_SPEED; // char_dat[i].speed;
- WFIFOW(fd,2+52) = char_dat[i].class;
+ WFIFOW(fd,2+52) = char_dat[i].class_;
WFIFOW(fd,2+54) = char_dat[i].hair;
WFIFOW(fd,2+58) = char_dat[i].base_level;
diff --git a/src/char_sql/int_guild.c b/src/char_sql/int_guild.c
index 5fee88511..258c173cf 100644
--- a/src/char_sql/int_guild.c
+++ b/src/char_sql/int_guild.c
@@ -229,7 +229,7 @@ int inter_guild_tosql(struct guild *g,int flag)
g->guild_id,
m->account_id,m->char_id,
m->hair,m->hair_color,m->gender,
- m->class,m->lv,m->exp,m->exp_payper,m->online,m->position,
+ m->class_,m->lv,m->exp,m->exp_payper,m->online,m->position,
0,0,
jstrescapecpy(t_member,m->name));
@@ -405,7 +405,7 @@ struct guild * inter_guild_fromsql(int guild_id)
m->hair=atoi(sql_row[3]);
m->hair_color=atoi(sql_row[4]);
m->gender=atoi(sql_row[5]);
- m->class=atoi(sql_row[6]);
+ m->class_=atoi(sql_row[6]);
m->lv=atoi(sql_row[7]);
m->exp=atoi(sql_row[8]);
m->exp_payper=atoi(sql_row[9]);
@@ -908,7 +908,7 @@ int mapif_guild_memberinfoshort(struct guild *g,int idx)
WBUFL(buf,10)=g->member[idx].char_id;
WBUFB(buf,14)=g->member[idx].online;
WBUFW(buf,15)=g->member[idx].lv;
- WBUFW(buf,17)=g->member[idx].class;
+ WBUFW(buf,17)=g->member[idx].class_;
mapif_sendall(buf,19);
return 0;
}
@@ -1283,7 +1283,7 @@ int mapif_parse_GuildChangeMemberInfoShort(int fd,int guild_id,
g->member[i].online=online;
g->member[i].lv=lv;
- g->member[i].class=class;
+ g->member[i].class_=class;
mapif_guild_memberinfoshort(g,i);
idx = i;
}
@@ -1303,7 +1303,7 @@ int mapif_parse_GuildChangeMemberInfoShort(int fd,int guild_id,
if(mysql_query(&mysql_handle, tmp_sql) )
printf("DB server Error: %s - %s\n", tmp_sql, mysql_error(&mysql_handle) );
- sprintf(tmp_sql, "UPDATE `%s` SET `online`=%d,`lv`=%d,`class`=%d WHERE `char_id`=%d", guild_member_db, g->member[idx].online, g->member[idx].lv, g->member[idx].class, g->member[idx].char_id);
+ sprintf(tmp_sql, "UPDATE `%s` SET `online`=%d,`lv`=%d,`class`=%d WHERE `char_id`=%d", guild_member_db, g->member[idx].online, g->member[idx].lv, g->member[idx].class_, g->member[idx].char_id);
if(mysql_query(&mysql_handle, tmp_sql) )
printf("DB server Error: %s - %s\n", tmp_sql, mysql_error(&mysql_handle) );
diff --git a/src/char_sql/int_pet.c b/src/char_sql/int_pet.c
index 97548aeff..edad95f84 100644
--- a/src/char_sql/int_pet.c
+++ b/src/char_sql/int_pet.c
@@ -39,11 +39,11 @@ int inter_pet_tosql(int pet_id, struct s_pet *p) {
if (sql_res!=NULL && mysql_num_rows(sql_res)>0)
//row reside -> updating
sprintf(tmp_sql, "UPDATE `%s` SET `class`='%d',`name`='%s',`account_id`='%d',`char_id`='%d',`level`='%d',`egg_id`='%d',`equip`='%d',`intimate`='%d',`hungry`='%d',`rename_flag`='%d',`incuvate`='%d' WHERE `pet_id`='%d'",
- pet_db, p->class, t_name, p->account_id, p->char_id, p->level, p->egg_id,
+ pet_db, p->class_, t_name, p->account_id, p->char_id, p->level, p->egg_id,
p->equip, p->intimate, p->hungry, p->rename_flag, p->incuvate, p->pet_id);
else //no row -> insert
sprintf(tmp_sql,"INSERT INTO `%s` (`pet_id`, `class`,`name`,`account_id`,`char_id`,`level`,`egg_id`,`equip`,`intimate`,`hungry`,`rename_flag`,`incuvate`) VALUES ('%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
- pet_db, pet_id, p->class, t_name, p->account_id, p->char_id, p->level, p->egg_id,
+ pet_db, pet_id, p->class_, t_name, p->account_id, p->char_id, p->level, p->egg_id,
p->equip, p->intimate, p->hungry, p->rename_flag, p->incuvate);
mysql_free_result(sql_res) ; //resource free
if(mysql_query(&mysql_handle, tmp_sql) ) {
@@ -72,7 +72,7 @@ int inter_pet_fromsql(int pet_id, struct s_pet *p){
sql_row = mysql_fetch_row(sql_res);
p->pet_id = pet_id;
- p->class = atoi(sql_row[1]);
+ p->class_ = atoi(sql_row[1]);
memcpy(p->name, sql_row[2],24);
p->account_id = atoi(sql_row[3]);
p->char_id = atoi(sql_row[4]);
@@ -215,7 +215,7 @@ int mapif_create_pet(int fd, int account_id, int char_id, short pet_class, short
pet_pt->account_id = account_id;
pet_pt->char_id = char_id;
}
- pet_pt->class = pet_class;
+ pet_pt->class_ = pet_class;
pet_pt->level = pet_lv;
pet_pt->egg_id = pet_egg_id;
pet_pt->equip = pet_equip;