summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
Diffstat (limited to 'src/char')
-rw-r--r--src/char/char.c68
-rw-r--r--src/char/int_guild.c12
-rw-r--r--src/char/int_party.c4
-rw-r--r--src/char/inter.c52
-rw-r--r--src/char/inter.h2
-rw-r--r--src/char/mapif.c2
-rw-r--r--src/char/mapif.h2
7 files changed, 71 insertions, 71 deletions
diff --git a/src/char/char.c b/src/char/char.c
index d69ea0d53..9314e8c81 100644
--- a/src/char/char.c
+++ b/src/char/char.c
@@ -519,7 +519,7 @@ int char_mmo_char_tosql(int char_id, struct mmo_charstatus* p)
if (
(p->hair != cp->hair) || (p->hair_color != cp->hair_color) ||
(p->clothes_color != cp->clothes_color) || (p->body != cp->body) ||
- (p->class_ != cp->class_) ||
+ (p->class != cp->class) ||
(p->partner_id != cp->partner_id) || (p->father != cp->father) ||
(p->mother != cp->mother) || (p->child != cp->child) ||
(p->karma != cp->karma) || (p->manner != cp->manner) ||
@@ -531,7 +531,7 @@ int char_mmo_char_tosql(int char_id, struct mmo_charstatus* p)
"`partner_id`='%d', `father`='%d', `mother`='%d', `child`='%d',"
"`karma`='%d', `manner`='%d', `fame`='%d'"
" WHERE `account_id`='%d' AND `char_id` = '%d'",
- char_db, p->class_,
+ char_db, p->class,
p->hair, p->hair_color, p->clothes_color, p->body,
p->partner_id, p->father, p->mother, p->child,
p->karma, p->manner, p->fame,
@@ -961,7 +961,7 @@ int char_mmo_chars_fromsql(struct char_session_data* sd, uint8* buf)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &p.char_id, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_UCHAR, &p.slot, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_STRING, &p.name, sizeof(p.name), NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_SHORT, &p.class_, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_SHORT, &p.class, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &p.base_level, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &p.job_level, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_UINT, &p.base_exp, 0, NULL, NULL)
@@ -1072,7 +1072,7 @@ int char_mmo_char_fromsql(int char_id, struct mmo_charstatus* p, bool load_every
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &p->account_id, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UCHAR, &p->slot, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_STRING, &p->name, sizeof(p->name), NULL, NULL)
- || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_SHORT, &p->class_, 0, NULL, NULL)
+ || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_SHORT, &p->class, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &p->base_level, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_INT, &p->job_level, 0, NULL, NULL)
|| SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT, &p->base_exp, 0, NULL, NULL)
@@ -1544,7 +1544,7 @@ int char_check_char_name(char * name, char * esc_name)
* -5: 'Symbols in Character Names are forbidden'
* char_id: Success
**/
-int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, short starting_job)
+int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int str, int agi, int vit, int int_, int dex, int luk, int slot, int hair_color, int hair_style, int16 starting_class)
{
char name[NAME_LENGTH];
char esc_name[NAME_LENGTH*2+1];
@@ -1560,7 +1560,7 @@ int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int
if (flag < 0)
return flag;
- switch (starting_job) {
+ switch (starting_class) {
case JOB_SUMMONER:
case JOB_NOVICE:
break;
@@ -1592,7 +1592,7 @@ int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int
if (SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `class`, `zeny`, `status_point`,`str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`,"
"`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`) VALUES ("
"'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')",
- char_db, sd->account_id , slot, esc_name, starting_job, start_zeny, 48, str, agi, vit, int_, dex, luk,
+ char_db, sd->account_id , slot, esc_name, starting_class, start_zeny, 48, str, agi, vit, int_, dex, luk,
(40 * (100 + vit)/100) , (40 * (100 + vit)/100 ), (11 * (100 + int_)/100), (11 * (100 + int_)/100), hair_style, hair_color,
mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y) )
{
@@ -1604,7 +1604,7 @@ int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int
if( SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `class`, `zeny`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`,"
"`max_sp`, `sp`, `hair`, `hair_color`, `last_map`, `last_x`, `last_y`, `save_map`, `save_x`, `save_y`) VALUES ("
"'%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d','%d', '%d','%d', '%d', '%s', '%d', '%d', '%s', '%d', '%d')",
- char_db, sd->account_id , slot, esc_name, starting_job, start_zeny, str, agi, vit, int_, dex, luk,
+ char_db, sd->account_id , slot, esc_name, starting_class, start_zeny, str, agi, vit, int_, dex, luk,
(40 * (100 + vit)/100) , (40 * (100 + vit)/100 ), (11 * (100 + int_)/100), (11 * (100 + int_)/100), hair_style, hair_color,
mapindex_id2name(start_point.map), start_point.x, start_point.y, mapindex_id2name(start_point.map), start_point.x, start_point.y) )
{
@@ -1623,7 +1623,7 @@ int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int
if (SQL_ERROR == SQL->Query(inter->sql_handle,
"INSERT INTO `%s` (`time`, `char_msg`, `account_id`, `char_id`, `char_num`, `class`, `name`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `hair`, `hair_color`)"
"VALUES (NOW(), '%s', '%d', '%d', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
- charlog_db, "make new char", sd->account_id, char_id, slot, starting_job, esc_name, str, agi, vit, int_, dex, luk, hair_style, hair_color))
+ charlog_db, "make new char", sd->account_id, char_id, slot, starting_class, esc_name, str, agi, vit, int_, dex, luk, hair_style, hair_color))
Sql_ShowDebug(inter->sql_handle);
}
@@ -1890,7 +1890,7 @@ int char_mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p) {
WBUFW(buf,46) = min(p->sp, INT16_MAX);
WBUFW(buf,48) = min(p->max_sp, INT16_MAX);
WBUFW(buf,50) = DEFAULT_WALK_SPEED; // p->speed;
- WBUFW(buf,52) = p->class_;
+ WBUFW(buf,52) = p->class;
WBUFW(buf,54) = p->hair;
#if PACKETVER >= 20141022
WBUFW(buf,56) = p->body;
@@ -2326,33 +2326,33 @@ void char_changesex(int account_id, int sex)
* @param sex The new sex (SEX_MALE or SEX_FEMALE).
* @param acc The character's account ID.
* @param char_id The character ID.
- * @param class_ The character's current job class.
+ * @param class The character's current job class.
* @param guild_id The character's guild ID.
*/
-void char_change_sex_sub(int sex, int acc, int char_id, int class_, int guild_id)
+void char_change_sex_sub(int sex, int acc, int char_id, int class, int guild_id)
{
// job modification
- if (class_ == JOB_BARD || class_ == JOB_DANCER)
- class_ = (sex == SEX_MALE ? JOB_BARD : JOB_DANCER);
- else if (class_ == JOB_CLOWN || class_ == JOB_GYPSY)
- class_ = (sex == SEX_MALE ? JOB_CLOWN : JOB_GYPSY);
- else if (class_ == JOB_BABY_BARD || class_ == JOB_BABY_DANCER)
- class_ = (sex == SEX_MALE ? JOB_BABY_BARD : JOB_BABY_DANCER);
- else if (class_ == JOB_MINSTREL || class_ == JOB_WANDERER)
- class_ = (sex == SEX_MALE ? JOB_MINSTREL : JOB_WANDERER);
- else if (class_ == JOB_MINSTREL_T || class_ == JOB_WANDERER_T)
- class_ = (sex == SEX_MALE ? JOB_MINSTREL_T : JOB_WANDERER_T);
- else if (class_ == JOB_BABY_MINSTREL || class_ == JOB_BABY_WANDERER)
- class_ = (sex == SEX_MALE ? JOB_BABY_MINSTREL : JOB_BABY_WANDERER);
- else if (class_ == JOB_KAGEROU || class_ == JOB_OBORO)
- class_ = (sex == SEX_MALE ? JOB_KAGEROU : JOB_OBORO);
+ if (class == JOB_BARD || class == JOB_DANCER)
+ class = (sex == SEX_MALE ? JOB_BARD : JOB_DANCER);
+ else if (class == JOB_CLOWN || class == JOB_GYPSY)
+ class = (sex == SEX_MALE ? JOB_CLOWN : JOB_GYPSY);
+ else if (class == JOB_BABY_BARD || class == JOB_BABY_DANCER)
+ class = (sex == SEX_MALE ? JOB_BABY_BARD : JOB_BABY_DANCER);
+ else if (class == JOB_MINSTREL || class == JOB_WANDERER)
+ class = (sex == SEX_MALE ? JOB_MINSTREL : JOB_WANDERER);
+ else if (class == JOB_MINSTREL_T || class == JOB_WANDERER_T)
+ class = (sex == SEX_MALE ? JOB_MINSTREL_T : JOB_WANDERER_T);
+ else if (class == JOB_BABY_MINSTREL || class == JOB_BABY_WANDERER)
+ class = (sex == SEX_MALE ? JOB_BABY_MINSTREL : JOB_BABY_WANDERER);
+ else if (class == JOB_KAGEROU || class == JOB_OBORO)
+ class = (sex == SEX_MALE ? JOB_KAGEROU : JOB_OBORO);
if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `equip`='0' WHERE `char_id`='%d'", inventory_db, char_id))
Sql_ShowDebug(inter->sql_handle);
if (SQL_ERROR == SQL->Query(inter->sql_handle, "UPDATE `%s` SET `class`='%d', `weapon`='0', `shield`='0', "
"`head_top`='0', `head_mid`='0', `head_bottom`='0' WHERE `char_id`='%d'",
- char_db, class_, char_id))
+ char_db, class, char_id))
Sql_ShowDebug(inter->sql_handle);
if (guild_id) // If there is a guild, update the guild_member data [Skotlex]
inter_guild->sex_changed(guild_id, acc, char_id, sex);
@@ -2360,7 +2360,7 @@ void char_change_sex_sub(int sex, int acc, int char_id, int class_, int guild_id
int char_parse_fromlogin_changesex_reply(int fd)
{
- int char_id = 0, class_ = 0, guild_id = 0;
+ int char_id = 0, class = 0, guild_id = 0;
int i;
struct char_auth_node *node;
struct SqlStmt *stmt;
@@ -2389,11 +2389,11 @@ int char_parse_fromlogin_changesex_reply(int fd)
SQL->StmtFree(stmt);
}
SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &char_id, 0, NULL, NULL);
- SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &class_, 0, NULL, NULL);
+ SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &class, 0, NULL, NULL);
SQL->StmtBindColumn(stmt, 2, SQLDT_INT, &guild_id, 0, NULL, NULL);
for (i = 0; i < MAX_CHARS && SQL_SUCCESS == SQL->StmtNextRow(stmt); ++i) {
- char_change_sex_sub(sex, acc, char_id, class_, guild_id);
+ char_change_sex_sub(sex, acc, char_id, class, guild_id);
}
SQL->StmtFree(stmt);
@@ -3371,7 +3371,7 @@ void char_ask_name_ack(int fd, int acc, const char* name, int type, int result)
*/
int char_changecharsex(int char_id, int sex)
{
- int class_ = 0, guild_id = 0, account_id = 0;
+ int class = 0, guild_id = 0, account_id = 0;
char *data;
// get character data
@@ -3384,7 +3384,7 @@ int char_changecharsex(int char_id, int sex)
return 1;
}
SQL->GetData(inter->sql_handle, 0, &data, NULL); account_id = atoi(data);
- SQL->GetData(inter->sql_handle, 1, &data, NULL); class_ = atoi(data);
+ SQL->GetData(inter->sql_handle, 1, &data, NULL); class = atoi(data);
SQL->GetData(inter->sql_handle, 2, &data, NULL); guild_id = atoi(data);
SQL->FreeResult(inter->sql_handle);
@@ -3392,7 +3392,7 @@ int char_changecharsex(int char_id, int sex)
Sql_ShowDebug(inter->sql_handle);
return 1;
}
- char_change_sex_sub(sex, account_id, char_id, class_, guild_id);
+ char_change_sex_sub(sex, account_id, char_id, class, guild_id);
// disconnect player if online on char-server
chr->disconnect_player(account_id);
@@ -5039,7 +5039,7 @@ int char_parse_char(int fd)
// create new char
#if PACKETVER >= 20151001
- // S 0a39 <name>.24B <slot>.B <hair color>.W <hair style>.W <starting job ID>.W <Unknown>.(W or 2 B's)??? <sex>.B
+ // S 0a39 <name>.24B <slot>.B <hair color>.W <hair style>.W <starting job class ID>.W <Unknown>.(W or 2 B's)??? <sex>.B
case 0xa39:
{
FIFOSD_CHECK(36);
diff --git a/src/char/int_guild.c b/src/char/int_guild.c
index dcc1ed7cb..b4b4bdde4 100644
--- a/src/char/int_guild.c
+++ b/src/char/int_guild.c
@@ -251,7 +251,7 @@ int inter_guild_tosql(struct guild *g,int flag)
"VALUES ('%d','%d','%d','%d','%d','%d','%d','%d','%"PRIu64"','%d','%d','%d','%s')",
guild_member_db, 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, esc_name) )
+ m->class, m->lv, m->exp, m->exp_payper, m->online, m->position, esc_name) )
Sql_ShowDebug(inter->sql_handle);
if (m->modified&GS_MEMBER_NEW || new_guild == 1)
{
@@ -433,7 +433,7 @@ struct guild * inter_guild_fromsql(int guild_id)
SQL->GetData(inter->sql_handle, 2, &data, NULL); m->hair = atoi(data);
SQL->GetData(inter->sql_handle, 3, &data, NULL); m->hair_color = atoi(data);
SQL->GetData(inter->sql_handle, 4, &data, NULL); m->gender = atoi(data);
- SQL->GetData(inter->sql_handle, 5, &data, NULL); m->class_ = atoi(data);
+ SQL->GetData(inter->sql_handle, 5, &data, NULL); m->class = atoi(data);
SQL->GetData(inter->sql_handle, 6, &data, NULL); m->lv = atoi(data);
SQL->GetData(inter->sql_handle, 7, &data, NULL); m->exp = strtoull(data, NULL, 10);
SQL->GetData(inter->sql_handle, 8, &data, NULL); m->exp_payper = (unsigned int)atoi(data);
@@ -984,7 +984,7 @@ int mapif_guild_memberinfoshort(struct guild *g, int idx)
WBUFL(buf,10)=g->member[idx].char_id;
WBUFB(buf,14)=(unsigned char)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;
}
@@ -1349,7 +1349,7 @@ int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, in
}
// Change member info
-int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class_)
+int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class)
{
// Could speed up by manipulating only guild_member
struct guild * g;
@@ -1365,7 +1365,7 @@ int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id,
{
g->member[i].online = online;
g->member[i].lv = lv;
- g->member[i].class_ = class_;
+ g->member[i].class = class;
g->member[i].modified = GS_MEMBER_MODIFIED;
mapif->guild_memberinfoshort(g,i);
}
@@ -1602,7 +1602,7 @@ int mapif_parse_GuildMemberInfoChange(int fd, int guild_id, int account_id, int
}
case GMI_CLASS:
{
- g->member[i].class_ = *(const short *)data;
+ g->member[i].class = *(const int16 *)data;
g->member[i].modified = GS_MEMBER_MODIFIED;
mapif->guild_memberinfochanged(guild_id,account_id,char_id,type,data,len);
g->save_flag |= GS_MEMBER; //Save new data.
diff --git a/src/char/int_party.c b/src/char/int_party.c
index e2be9f3ca..2fc39c328 100644
--- a/src/char/int_party.c
+++ b/src/char/int_party.c
@@ -89,7 +89,7 @@ static void inter_party_calc_state(struct party_data *p)
// FIXME[Haru]: What if the occupied positions aren't the first three? It can happen if some party members leave. This is the reason why family sharing some times stops working until you recreate your party
if( p->size == 2 && ( chr->char_child(p->party.member[0].char_id,p->party.member[1].char_id) || chr->char_child(p->party.member[1].char_id,p->party.member[0].char_id) ) ) {
//Child should be able to share with either of their parents [RoM]
- if(p->party.member[0].class_&JOBL_BABY) //first slot is the child?
+ if (p->party.member[0].class >= JOB_BABY && p->party.member[0].class <= JOB_SUPER_BABY) //first slot is the child?
p->family = p->party.member[0].char_id;
else
p->family = p->party.member[1].char_id;
@@ -252,7 +252,7 @@ struct party_data *inter_party_fromsql(int party_id)
SQL->GetData(inter->sql_handle, 3, &data, NULL); m->lv = atoi(data);
SQL->GetData(inter->sql_handle, 4, &data, NULL); m->map = mapindex->name2id(data);
SQL->GetData(inter->sql_handle, 5, &data, NULL); m->online = (atoi(data) ? 1 : 0);
- SQL->GetData(inter->sql_handle, 6, &data, NULL); m->class_ = atoi(data);
+ SQL->GetData(inter->sql_handle, 6, &data, NULL); m->class = atoi(data);
m->leader = (m->account_id == leader_id && m->char_id == leader_char ? 1 : 0);
}
SQL->FreeResult(inter->sql_handle);
diff --git a/src/char/inter.c b/src/char/inter.c
index fd3fe8c16..d076bb657 100644
--- a/src/char/inter.c
+++ b/src/char/inter.c
@@ -168,9 +168,9 @@ void inter_do_final_msg(void)
aFree(msg_table[i]);
}
/* from pc.c due to @accinfo. any ideas to replace this crap are more than welcome. */
-const char* inter_job_name(int class_)
+const char* inter_job_name(int class)
{
- switch (class_) {
+ switch (class) {
case JOB_NOVICE: // 550
case JOB_SWORDMAN: // 551
case JOB_MAGE: // 552
@@ -178,7 +178,7 @@ const char* inter_job_name(int class_)
case JOB_ACOLYTE: // 554
case JOB_MERCHANT: // 555
case JOB_THIEF: // 556
- return inter->msg_txt(550 - JOB_NOVICE+class_);
+ return inter->msg_txt(550 - JOB_NOVICE + class);
case JOB_KNIGHT: // 557
case JOB_PRIEST: // 558
@@ -186,7 +186,7 @@ const char* inter_job_name(int class_)
case JOB_BLACKSMITH: // 560
case JOB_HUNTER: // 561
case JOB_ASSASSIN: // 562
- return inter->msg_txt(557 - JOB_KNIGHT+class_);
+ return inter->msg_txt(557 - JOB_KNIGHT + class);
case JOB_KNIGHT2:
return inter->msg_txt(557);
@@ -198,7 +198,7 @@ const char* inter_job_name(int class_)
case JOB_ALCHEMIST: // 567
case JOB_BARD: // 568
case JOB_DANCER: // 569
- return inter->msg_txt(563 - JOB_CRUSADER+class_);
+ return inter->msg_txt(563 - JOB_CRUSADER + class);
case JOB_CRUSADER2:
return inter->msg_txt(563);
@@ -208,7 +208,7 @@ const char* inter_job_name(int class_)
case JOB_GUNSLINGER: // 572
case JOB_NINJA: // 573
case JOB_XMAS: // 574
- return inter->msg_txt(570 - JOB_WEDDING+class_);
+ return inter->msg_txt(570 - JOB_WEDDING + class);
case JOB_SUMMER:
return inter->msg_txt(621);
@@ -220,7 +220,7 @@ const char* inter_job_name(int class_)
case JOB_ACOLYTE_HIGH: // 579
case JOB_MERCHANT_HIGH: // 580
case JOB_THIEF_HIGH: // 581
- return inter->msg_txt(575 - JOB_NOVICE_HIGH+class_);
+ return inter->msg_txt(575 - JOB_NOVICE_HIGH + class);
case JOB_LORD_KNIGHT: // 582
case JOB_HIGH_PRIEST: // 583
@@ -228,7 +228,7 @@ const char* inter_job_name(int class_)
case JOB_WHITESMITH: // 585
case JOB_SNIPER: // 586
case JOB_ASSASSIN_CROSS: // 587
- return inter->msg_txt(582 - JOB_LORD_KNIGHT+class_);
+ return inter->msg_txt(582 - JOB_LORD_KNIGHT + class);
case JOB_LORD_KNIGHT2:
return inter->msg_txt(582);
@@ -240,7 +240,7 @@ const char* inter_job_name(int class_)
case JOB_CREATOR: // 592
case JOB_CLOWN: // 593
case JOB_GYPSY: // 594
- return inter->msg_txt(588 - JOB_PALADIN + class_);
+ return inter->msg_txt(588 - JOB_PALADIN + class);
case JOB_PALADIN2:
return inter->msg_txt(588);
@@ -252,7 +252,7 @@ const char* inter_job_name(int class_)
case JOB_BABY_ACOLYTE: // 599
case JOB_BABY_MERCHANT: // 600
case JOB_BABY_THIEF: // 601
- return inter->msg_txt(595 - JOB_BABY + class_);
+ return inter->msg_txt(595 - JOB_BABY + class);
case JOB_BABY_KNIGHT: // 602
case JOB_BABY_PRIEST: // 603
@@ -260,7 +260,7 @@ const char* inter_job_name(int class_)
case JOB_BABY_BLACKSMITH: // 605
case JOB_BABY_HUNTER: // 606
case JOB_BABY_ASSASSIN: // 607
- return inter->msg_txt(602 - JOB_BABY_KNIGHT + class_);
+ return inter->msg_txt(602 - JOB_BABY_KNIGHT + class);
case JOB_BABY_KNIGHT2:
return inter->msg_txt(602);
@@ -272,7 +272,7 @@ const char* inter_job_name(int class_)
case JOB_BABY_ALCHEMIST: // 612
case JOB_BABY_BARD: // 613
case JOB_BABY_DANCER: // 614
- return inter->msg_txt(608 - JOB_BABY_CRUSADER + class_);
+ return inter->msg_txt(608 - JOB_BABY_CRUSADER + class);
case JOB_BABY_CRUSADER2:
return inter->msg_txt(608);
@@ -291,7 +291,7 @@ const char* inter_job_name(int class_)
case JOB_GANGSI: // 622
case JOB_DEATH_KNIGHT: // 623
case JOB_DARK_COLLECTOR: // 624
- return inter->msg_txt(622 - JOB_GANGSI+class_);
+ return inter->msg_txt(622 - JOB_GANGSI + class);
case JOB_RUNE_KNIGHT: // 625
case JOB_WARLOCK: // 626
@@ -299,7 +299,7 @@ const char* inter_job_name(int class_)
case JOB_ARCH_BISHOP: // 628
case JOB_MECHANIC: // 629
case JOB_GUILLOTINE_CROSS: // 630
- return inter->msg_txt(625 - JOB_RUNE_KNIGHT+class_);
+ return inter->msg_txt(625 - JOB_RUNE_KNIGHT + class);
case JOB_RUNE_KNIGHT_T: // 656
case JOB_WARLOCK_T: // 657
@@ -307,7 +307,7 @@ const char* inter_job_name(int class_)
case JOB_ARCH_BISHOP_T: // 659
case JOB_MECHANIC_T: // 660
case JOB_GUILLOTINE_CROSS_T: // 661
- return inter->msg_txt(656 - JOB_RUNE_KNIGHT_T+class_);
+ return inter->msg_txt(656 - JOB_RUNE_KNIGHT_T + class);
case JOB_ROYAL_GUARD: // 631
case JOB_SORCERER: // 632
@@ -316,7 +316,7 @@ const char* inter_job_name(int class_)
case JOB_SURA: // 635
case JOB_GENETIC: // 636
case JOB_SHADOW_CHASER: // 637
- return inter->msg_txt(631 - JOB_ROYAL_GUARD+class_);
+ return inter->msg_txt(631 - JOB_ROYAL_GUARD + class);
case JOB_ROYAL_GUARD_T: // 662
case JOB_SORCERER_T: // 663
@@ -325,7 +325,7 @@ const char* inter_job_name(int class_)
case JOB_SURA_T: // 666
case JOB_GENETIC_T: // 667
case JOB_SHADOW_CHASER_T: // 668
- return inter->msg_txt(662 - JOB_ROYAL_GUARD_T+class_);
+ return inter->msg_txt(662 - JOB_ROYAL_GUARD_T + class);
case JOB_RUNE_KNIGHT2:
return inter->msg_txt(625);
@@ -364,7 +364,7 @@ const char* inter_job_name(int class_)
case JOB_BABY_SURA: // 648
case JOB_BABY_GENETIC: // 649
case JOB_BABY_CHASER: // 650
- return inter->msg_txt(638 - JOB_BABY_RUNE+class_);
+ return inter->msg_txt(638 - JOB_BABY_RUNE + class);
case JOB_BABY_RUNE2:
return inter->msg_txt(638);
@@ -380,11 +380,11 @@ const char* inter_job_name(int class_)
case JOB_SUPER_NOVICE_E: // 651
case JOB_SUPER_BABY_E: // 652
- return inter->msg_txt(651 - JOB_SUPER_NOVICE_E+class_);
+ return inter->msg_txt(651 - JOB_SUPER_NOVICE_E + class);
case JOB_KAGEROU: // 653
case JOB_OBORO: // 654
- return inter->msg_txt(653 - JOB_KAGEROU+class_);
+ return inter->msg_txt(653 - JOB_KAGEROU + class);
case JOB_REBELLION:
return inter->msg_txt(655);
@@ -477,18 +477,18 @@ void mapif_parse_accinfo(int fd)
} else {// more than one, listing... [Dekamaster/Nightroad]
inter->msg_to_fd(fd, u_fd, aid, "Your query returned the following %d results, please be more specific...",(int)SQL->NumRows(inter->sql_handle));
while ( SQL_SUCCESS == SQL->NextRow(inter->sql_handle) ) {
- int class_;
+ int class;
int base_level, job_level, online;
char name[NAME_LENGTH];
SQL->GetData(inter->sql_handle, 0, &data, NULL); account_id = atoi(data);
SQL->GetData(inter->sql_handle, 1, &data, NULL); safestrncpy(name, data, sizeof(name));
- SQL->GetData(inter->sql_handle, 2, &data, NULL); class_ = atoi(data);
+ SQL->GetData(inter->sql_handle, 2, &data, NULL); class = atoi(data);
SQL->GetData(inter->sql_handle, 3, &data, NULL); base_level = atoi(data);
SQL->GetData(inter->sql_handle, 4, &data, NULL); job_level = atoi(data);
SQL->GetData(inter->sql_handle, 5, &data, NULL); online = atoi(data);
- inter->msg_to_fd(fd, u_fd, aid, "[AID: %d] %s | %s | Level: %d/%d | %s", account_id, name, inter->job_name(class_), base_level, job_level, online?"Online":"Offline");
+ inter->msg_to_fd(fd, u_fd, aid, "[AID: %d] %s | %s | Level: %d/%d | %s", account_id, name, inter->job_name(class), base_level, job_level, online?"Online":"Offline");
}
SQL->FreeResult(inter->sql_handle);
return;
@@ -549,19 +549,19 @@ void mapif_parse_accinfo2(bool success, int map_fd, int u_fd, int u_aid, int acc
} else {
while ( SQL_SUCCESS == SQL->NextRow(inter->sql_handle) ) {
char *data;
- int char_id, class_;
+ int char_id, class;
int char_num, base_level, job_level, online;
char name[NAME_LENGTH];
SQL->GetData(inter->sql_handle, 0, &data, NULL); char_id = atoi(data);
SQL->GetData(inter->sql_handle, 1, &data, NULL); safestrncpy(name, data, sizeof(name));
SQL->GetData(inter->sql_handle, 2, &data, NULL); char_num = atoi(data);
- SQL->GetData(inter->sql_handle, 3, &data, NULL); class_ = atoi(data);
+ SQL->GetData(inter->sql_handle, 3, &data, NULL); class = atoi(data);
SQL->GetData(inter->sql_handle, 4, &data, NULL); base_level = atoi(data);
SQL->GetData(inter->sql_handle, 5, &data, NULL); job_level = atoi(data);
SQL->GetData(inter->sql_handle, 6, &data, NULL); online = atoi(data);
- inter->msg_to_fd(map_fd, u_fd, u_aid, "[Slot/CID: %d/%d] %s | %s | Level: %d/%d | %s", char_num, char_id, name, inter->job_name(class_), base_level, job_level, online?"On":"Off");
+ inter->msg_to_fd(map_fd, u_fd, u_aid, "[Slot/CID: %d/%d] %s | %s | Level: %d/%d | %s", char_num, char_id, name, inter->job_name(class), base_level, job_level, online?"On":"Off");
}
}
SQL->FreeResult(inter->sql_handle);
diff --git a/src/char/inter.h b/src/char/inter.h
index dbbc6f4e8..796f89a96 100644
--- a/src/char/inter.h
+++ b/src/char/inter.h
@@ -39,7 +39,7 @@ struct inter_interface {
const char* (*msg_txt) (int msg_number);
bool (*msg_config_read) (const char *cfg_name, bool allow_override);
void (*do_final_msg) (void);
- const char* (*job_name) (int class_);
+ const char* (*job_name) (int class);
void (*vmsg_to_fd) (int fd, int u_fd, int aid, char* msg, va_list ap);
void (*msg_to_fd) (int fd, int u_fd, int aid, char *msg, ...) __attribute__((format(printf, 4, 5)));
void (*savereg) (int account_id, int char_id, const char *key, unsigned int index, intptr_t val, bool is_string);
diff --git a/src/char/mapif.c b/src/char/mapif.c
index 0c0a68654..1dafb79c3 100644
--- a/src/char/mapif.c
+++ b/src/char/mapif.c
@@ -89,7 +89,7 @@ int mapif_parse_CreateGuild(int fd, int account_id, const char *name, const stru
int mapif_parse_GuildInfo(int fd, int guild_id);
int mapif_parse_GuildAddMember(int fd, int guild_id, const struct guild_member *m);
int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, int flag, const char *mes);
-int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class_);
+int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
int mapif_parse_BreakGuild(int fd, int guild_id);
int mapif_parse_GuildMessage(int fd, int guild_id, int account_id, const char *mes, int len);
int mapif_parse_GuildBasicInfoChange(int fd, int guild_id, int type, const void *data, int len);
diff --git a/src/char/mapif.h b/src/char/mapif.h
index 7f1d53b3e..ebbddead0 100644
--- a/src/char/mapif.h
+++ b/src/char/mapif.h
@@ -83,7 +83,7 @@ struct mapif_interface {
int (*parse_GuildInfo) (int fd, int guild_id);
int (*parse_GuildAddMember) (int fd, int guild_id, const struct guild_member *m);
int (*parse_GuildLeave) (int fd, int guild_id, int account_id, int char_id, int flag, const char *mes);
- int (*parse_GuildChangeMemberInfoShort) (int fd, int guild_id, int account_id, int char_id, int online, int lv, int class_);
+ int (*parse_GuildChangeMemberInfoShort) (int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class);
int (*parse_BreakGuild) (int fd, int guild_id);
int (*parse_GuildMessage) (int fd, int guild_id, int account_id, const char *mes, int len);
int (*parse_GuildBasicInfoChange) (int fd, int guild_id, int type, const void *data, int len);