summaryrefslogtreecommitdiff
path: root/src/char
diff options
context:
space:
mode:
Diffstat (limited to 'src/char')
-rw-r--r--src/char/Makefile.in6
-rw-r--r--src/char/char.c127
-rw-r--r--src/char/char.h2
-rw-r--r--src/char/geoip.c2
-rw-r--r--src/char/geoip.h2
-rw-r--r--src/char/int_auction.c2
-rw-r--r--src/char/int_auction.h2
-rw-r--r--src/char/int_elemental.h2
-rw-r--r--src/char/int_guild.c12
-rw-r--r--src/char/int_guild.h2
-rw-r--r--src/char/int_homun.h2
-rw-r--r--src/char/int_mail.c2
-rw-r--r--src/char/int_mail.h2
-rw-r--r--src/char/int_mercenary.h2
-rw-r--r--src/char/int_party.c4
-rw-r--r--src/char/int_party.h2
-rw-r--r--src/char/int_pet.h2
-rw-r--r--src/char/int_quest.c2
-rw-r--r--src/char/int_quest.h2
-rw-r--r--src/char/int_storage.c2
-rw-r--r--src/char/int_storage.h2
-rw-r--r--src/char/inter.c55
-rw-r--r--src/char/inter.h2
-rw-r--r--src/char/loginif.c2
-rw-r--r--src/char/loginif.h2
-rw-r--r--src/char/mapif.c4
-rw-r--r--src/char/mapif.h4
27 files changed, 138 insertions, 114 deletions
diff --git a/src/char/Makefile.in b/src/char/Makefile.in
index fe40621fb..7806ce2bb 100644
--- a/src/char/Makefile.in
+++ b/src/char/Makefile.in
@@ -51,7 +51,7 @@ CHAR_PH =
HAVE_MYSQL=@HAVE_MYSQL@
ifeq ($(HAVE_MYSQL),yes)
- CHAR_SERVER_SQL_DEPENDS=$(CHAR_OBJ) $(COMMON_D)/obj_sql/common_sql.a $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) $(SYSINFO_INC)
+ CHAR_SERVER_SQL_DEPENDS=$(CHAR_OBJ) $(COMMON_D)/obj_all/common.a $(COMMON_D)/obj_sql/common_sql.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) $(SYSINFO_INC)
else
CHAR_SERVER_SQL_DEPENDS=needs_mysql
endif
@@ -110,8 +110,8 @@ char-server: ../../char-server@EXEEXT@
../../char-server@EXEEXT@: $(CHAR_SERVER_SQL_DEPENDS) Makefile
@echo " LD $(notdir $@)"
- @$(CC) @STATIC@ @LDFLAGS@ -o ../../char-server@EXEEXT@ $(CHAR_OBJ) $(COMMON_D)/obj_sql/common_sql.a \
- $(COMMON_D)/obj_all/common.a $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
+ @$(CC) @STATIC@ @LDFLAGS@ -o ../../char-server@EXEEXT@ $(CHAR_OBJ) $(COMMON_D)/obj_all/common.a $(COMMON_D)/obj_sql/common_sql.a \
+ $(MT19937AR_OBJ) $(LIBCONFIG_OBJ) @LIBS@ @MYSQL_LIBS@
# missing object files
$(COMMON_D)/obj_all/common.a:
diff --git a/src/char/char.c b/src/char/char.c
index 952c3d781..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)
+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];
@@ -1557,9 +1557,17 @@ int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int
SQL->EscapeStringLen(inter->sql_handle, esc_name, name, strnlen(name, NAME_LENGTH));
flag = chr->check_char_name(name,esc_name);
- if( flag < 0 )
+ if (flag < 0)
return flag;
+ switch (starting_class) {
+ case JOB_SUMMONER:
+ case JOB_NOVICE:
+ break;
+ default:
+ return -2; // Char Creation Denied
+ }
+
//check other inputs
#if PACKETVER >= 20120307
if(slot < 0 || slot >= sd->char_slots)
@@ -1580,11 +1588,11 @@ int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int
return -2; /* character account limit exceeded */
#if PACKETVER >= 20120307
- //Insert the new char entry to the database
- if( SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `zeny`, `status_point`,`str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`,"
+ // Insert the new char entry to the database
+ 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', '%s', '%d', '%d', '%s', '%d', '%d')",
- char_db, sd->account_id , slot, esc_name, start_zeny, 48, str, agi, vit, int_, dex, luk,
+ "'%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_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) )
{
@@ -1593,10 +1601,10 @@ int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int
}
#else
//Insert the new char entry to the database
- if( SQL_ERROR == SQL->Query(inter->sql_handle, "INSERT INTO `%s` (`account_id`, `char_num`, `name`, `zeny`, `str`, `agi`, `vit`, `int`, `dex`, `luk`, `max_hp`, `hp`,"
+ 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', '%s', '%d', '%d', '%s', '%d', '%d')",
- char_db, sd->account_id , slot, esc_name, start_zeny, str, agi, vit, int_, dex, luk,
+ "'%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_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) )
{
@@ -1613,9 +1621,9 @@ int char_make_new_char_sql(struct char_session_data *sd, const char *name_, int
// Validation success, log result
if (chr->enable_logs) {
if (SQL_ERROR == SQL->Query(inter->sql_handle,
- "INSERT INTO `%s` (`time`, `char_msg`,`account_id`,`char_id`,`char_num`,`name`,`str`,`agi`,`vit`,`int`,`dex`,`luk`,`hair`,`hair_color`)"
- "VALUES (NOW(), '%s', '%d', '%d', '%d', '%s', '%d', '%d', '%d', '%d', '%d', '%d', '%d', '%d')",
- charlog_db, "make new char", sd->account_id, char_id, slot, esc_name, str, agi, vit, int_, dex, luk, hair_style, hair_color))
+ "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_class, esc_name, str, agi, vit, int_, dex, luk, hair_style, hair_color))
Sql_ShowDebug(inter->sql_handle);
}
@@ -1882,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;
@@ -1945,11 +1953,15 @@ int char_mmo_char_tobuf(uint8* buffer, struct mmo_charstatus* p) {
}
/* Made Possible by Yommy~! <3 */
-void char_mmo_char_send099d(int fd, struct char_session_data *sd) {
+void char_mmo_char_send099d(int fd, struct char_session_data *sd)
+{
+// support added for client between 20121010 and 20130320
+#if PACKETVER > 20120418
WFIFOHEAD(fd,4 + (MAX_CHARS*MAX_CHAR_BUF));
WFIFOW(fd,0) = 0x99d;
WFIFOW(fd,2) = chr->mmo_chars_fromsql(sd, WFIFOP(fd,4)) + 4;
WFIFOSET(fd,WFIFOW(fd,2));
+#endif
}
/* Sends character ban list */
@@ -2314,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);
@@ -2348,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;
@@ -2377,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);
@@ -3359,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
@@ -3372,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);
@@ -3380,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);
@@ -4621,10 +4633,12 @@ void char_parse_char_create_new_char(int fd, struct char_session_data* sd)
//turn character creation on/off [Kevin]
result = -2;
} else {
- #if PACKETVER >= 20120307
- result = chr->make_new_char_sql(sd, RFIFOP(fd,2), 1, 1, 1, 1, 1, 1, RFIFOB(fd,26),RFIFOW(fd,27),RFIFOW(fd,29));
+ #if PACKETVER >= 20151001
+ result = chr->make_new_char_sql(sd, RFIFOP(fd,2), 1, 1, 1, 1, 1, 1, RFIFOB(fd,26), RFIFOW(fd,27), RFIFOW(fd,29), RFIFOW(fd, 31));
+ #elif PACKETVER >= 20120307
+ result = chr->make_new_char_sql(sd, RFIFOP(fd,2), 1, 1, 1, 1, 1, 1, RFIFOB(fd,26), RFIFOW(fd,27), RFIFOW(fd,29), JOB_NOVICE);
#else
- result = chr->make_new_char_sql(sd, RFIFOP(fd,2),RFIFOB(fd,26),RFIFOB(fd,27),RFIFOB(fd,28),RFIFOB(fd,29),RFIFOB(fd,30),RFIFOB(fd,31),RFIFOB(fd,32),RFIFOW(fd,33),RFIFOW(fd,35));
+ result = chr->make_new_char_sql(sd, RFIFOP(fd,2), RFIFOB(fd,26), RFIFOB(fd,27), RFIFOB(fd,28), RFIFOB(fd,29), RFIFOB(fd,30), RFIFOB(fd,31), RFIFOB(fd,32), RFIFOW(fd,33), RFIFOW(fd,35), JOB_NOVICE);
#endif
}
@@ -4640,11 +4654,13 @@ void char_parse_char_create_new_char(int fd, struct char_session_data* sd)
// add new entry to the chars list
sd->found_char[char_dat.slot] = result; // the char_id of the new char
}
- #if PACKETVER >= 20120307
- RFIFOSKIP(fd,31);
- #else
- RFIFOSKIP(fd,37);
- #endif
+#if PACKETVER >= 20151001
+ RFIFOSKIP(fd, 36);
+#elif PACKETVER >= 20120307
+ RFIFOSKIP(fd, 31);
+#else
+ RFIFOSKIP(fd, 37);
+#endif
}
// flag:
@@ -5022,17 +5038,22 @@ int char_parse_char(int fd)
break;
// create new char
- #if PACKETVER >= 20120307
+#if PACKETVER >= 20151001
+ // 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);
+#elif PACKETVER >= 20120307
// S 0970 <name>.24B <slot>.B <hair color>.W <hair style>.W
case 0x970:
{
FIFOSD_CHECK(31);
- #else
+#else
// S 0067 <name>.24B <str>.B <agi>.B <vit>.B <int>.B <dex>.B <luk>.B <slot>.B <hair color>.W <hair style>.W
case 0x67:
{
FIFOSD_CHECK(37);
- #endif
+#endif
chr->parse_char_create_new_char(fd, sd);
}
@@ -5919,7 +5940,7 @@ bool char_config_read_player_new(const char *filename, const struct config_t *co
#else
const char *start_point_setting = "start_point_pre";
#endif
- long long int i64 = 0; // TODO: Temporary until the signature of libconfig->setting_lookup_int64 is changed to take a defined-size int (int64)
+ int64 i64 = 0;
nullpo_retr(false, filename);
nullpo_retr(false, config);
diff --git a/src/char/char.h b/src/char/char.h
index 4dbdfd9db..d7bc96e13 100644
--- a/src/char/char.h
+++ b/src/char/char.h
@@ -147,7 +147,7 @@ struct char_interface {
bool (*char_slotchange) (struct char_session_data *sd, int fd, unsigned short from, unsigned short to);
int (*rename_char_sql) (struct char_session_data *sd, int char_id);
int (*check_char_name) (char * name, char * esc_name);
- int (*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);
+ int (*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 (*divorce_char_sql) (int partner_id1, int partner_id2);
int (*count_users) (void);
int (*mmo_char_tobuf) (uint8* buffer, struct mmo_charstatus* p);
diff --git a/src/char/geoip.c b/src/char/geoip.c
index 002045850..0b84d2b09 100644
--- a/src/char/geoip.c
+++ b/src/char/geoip.c
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
diff --git a/src/char/geoip.h b/src/char/geoip.h
index 61ebb535f..c5d71f5e1 100644
--- a/src/char/geoip.h
+++ b/src/char/geoip.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
diff --git a/src/char/int_auction.c b/src/char/int_auction.c
index 51acb32a6..bf690327c 100644
--- a/src/char/int_auction.c
+++ b/src/char/int_auction.c
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
diff --git a/src/char/int_auction.h b/src/char/int_auction.h
index ccd5bfbf5..9f0ccbd09 100644
--- a/src/char/int_auction.h
+++ b/src/char/int_auction.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
diff --git a/src/char/int_elemental.h b/src/char/int_elemental.h
index 9cdd63e7f..8a046b0f8 100644
--- a/src/char/int_elemental.h
+++ b/src/char/int_elemental.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
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_guild.h b/src/char/int_guild.h
index 252c2dc47..93bf6c699 100644
--- a/src/char/int_guild.h
+++ b/src/char/int_guild.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
diff --git a/src/char/int_homun.h b/src/char/int_homun.h
index e070cccb6..7ea7331f2 100644
--- a/src/char/int_homun.h
+++ b/src/char/int_homun.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
diff --git a/src/char/int_mail.c b/src/char/int_mail.c
index bf3403b5f..10f905a0d 100644
--- a/src/char/int_mail.c
+++ b/src/char/int_mail.c
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
diff --git a/src/char/int_mail.h b/src/char/int_mail.h
index 346adeea7..cb72db504 100644
--- a/src/char/int_mail.h
+++ b/src/char/int_mail.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
diff --git a/src/char/int_mercenary.h b/src/char/int_mercenary.h
index 17cc97fda..3b1623438 100644
--- a/src/char/int_mercenary.h
+++ b/src/char/int_mercenary.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
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/int_party.h b/src/char/int_party.h
index 62fef4192..77363dd45 100644
--- a/src/char/int_party.h
+++ b/src/char/int_party.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
diff --git a/src/char/int_pet.h b/src/char/int_pet.h
index 3eb19d656..13291e226 100644
--- a/src/char/int_pet.h
+++ b/src/char/int_pet.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
diff --git a/src/char/int_quest.c b/src/char/int_quest.c
index 7b3d746dd..bd49cb7d4 100644
--- a/src/char/int_quest.c
+++ b/src/char/int_quest.c
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
diff --git a/src/char/int_quest.h b/src/char/int_quest.h
index 8d5cd5807..737213fff 100644
--- a/src/char/int_quest.h
+++ b/src/char/int_quest.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
diff --git a/src/char/int_storage.c b/src/char/int_storage.c
index e46a1c80f..8e3ebdff3 100644
--- a/src/char/int_storage.c
+++ b/src/char/int_storage.c
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
diff --git a/src/char/int_storage.h b/src/char/int_storage.h
index 3c48c00ec..8c6341e85 100644
--- a/src/char/int_storage.h
+++ b/src/char/int_storage.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
diff --git a/src/char/inter.c b/src/char/inter.c
index 05f2bf4f6..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,15 +380,18 @@ 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);
+ case JOB_SUMMONER:
+ return inter->msg_txt(669);
+
default:
return inter->msg_txt(620); // "Unknown Job"
}
@@ -474,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;
@@ -546,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/loginif.c b/src/char/loginif.c
index 1e457fcca..b0e18eb1f 100644
--- a/src/char/loginif.c
+++ b/src/char/loginif.c
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
diff --git a/src/char/loginif.h b/src/char/loginif.h
index d1bfe5c3c..daafdf4ac 100644
--- a/src/char/loginif.h
+++ b/src/char/loginif.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
diff --git a/src/char/mapif.c b/src/char/mapif.c
index 91bfd884c..1dafb79c3 100644
--- a/src/char/mapif.c
+++ b/src/char/mapif.c
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
* Copyright (C) Athena Dev Teams
*
* Hercules is free software: you can redistribute it and/or modify
@@ -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 37d9444e2..ebbddead0 100644
--- a/src/char/mapif.h
+++ b/src/char/mapif.h
@@ -2,7 +2,7 @@
* This file is part of Hercules.
* http://herc.ws - http://github.com/HerculesWS/Hercules
*
- * Copyright (C) 2012-2015 Hercules Dev Team
+ * Copyright (C) 2012-2016 Hercules Dev Team
*
* Hercules is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@@ -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);