diff options
author | Haru <haru@dotalux.com> | 2019-02-11 02:00:58 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-11 02:00:58 +0100 |
commit | 2d8a44b753832610d23678629127369f5db576a3 (patch) | |
tree | 258e78c458642cc017837f674b0d23255ac49bf4 | |
parent | 68126f7d762e001b1a34cfe5e0a340db9c7d9da8 (diff) | |
parent | dbaa9ac111496fdfde9948d5cb15a0b052843b3f (diff) | |
download | hercules-2d8a44b753832610d23678629127369f5db576a3.tar.gz hercules-2d8a44b753832610d23678629127369f5db576a3.tar.bz2 hercules-2d8a44b753832610d23678629127369f5db576a3.tar.xz hercules-2d8a44b753832610d23678629127369f5db576a3.zip |
Merge pull request #2364 from 4144/shortfixes
Change different variables types short to int
36 files changed, 241 insertions, 241 deletions
diff --git a/src/char/char.c b/src/char/char.c index 49135aa79..34a3ea7a8 100644 --- a/src/char/char.c +++ b/src/char/char.c @@ -1098,7 +1098,7 @@ static int char_mmo_chars_fromsql(struct char_session_data *sd, uint8 *buf, int || SQL_ERROR == SQL->StmtBindColumn(stmt, 0, SQLDT_INT, &p.char_id, sizeof p.char_id, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_UCHAR, &p.slot, sizeof p.slot, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_STRING, &p.name, sizeof p.name, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_INT16, &p.class, sizeof p.class, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_INT, &p.class, sizeof p.class, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &p.base_level, sizeof p.base_level, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &p.job_level, sizeof p.job_level, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_UINT64, &p.base_exp, sizeof p.base_exp, NULL, NULL) @@ -1221,7 +1221,7 @@ static int char_mmo_char_fromsql(int char_id, struct mmo_charstatus *p, bool loa || SQL_ERROR == SQL->StmtBindColumn(stmt, 1, SQLDT_INT, &p->account_id, sizeof p->account_id, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 2, SQLDT_UCHAR, &p->slot, sizeof p->slot, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 3, SQLDT_STRING, &p->name, sizeof p->name, NULL, NULL) - || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT16, &p->class, sizeof p->class, NULL, NULL) + || SQL_ERROR == SQL->StmtBindColumn(stmt, 4, SQLDT_INT, &p->class, sizeof p->class, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 5, SQLDT_INT, &p->base_level, sizeof p->base_level, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 6, SQLDT_INT, &p->job_level, sizeof p->job_level, NULL, NULL) || SQL_ERROR == SQL->StmtBindColumn(stmt, 7, SQLDT_UINT64, &p->base_exp, sizeof p->base_exp, NULL, NULL) @@ -1705,7 +1705,7 @@ static int char_check_char_name(const char *name, const char *esc_name) * -5: 'Symbols in Character Names are forbidden' * char_id: Success **/ -static 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, uint8 sex) +static 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 starting_class, uint8 sex) { char name[NAME_LENGTH]; char esc_name[NAME_LENGTH*2+1]; diff --git a/src/char/char.h b/src/char/char.h index 632695ca4..5de3e2a80 100644 --- a/src/char/char.h +++ b/src/char/char.h @@ -149,7 +149,7 @@ struct char_interface { int (*rename_char_sql) (struct char_session_data *sd, int char_id); bool (*name_exists) (const char *name, const char *esc_name); int (*check_char_name) (const char *name, const 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, short starting_job, uint8 sex); + 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 starting_job, uint8 sex); 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/int_guild.c b/src/char/int_guild.c index 56e1c1ba3..9c0be1629 100644 --- a/src/char/int_guild.c +++ b/src/char/int_guild.c @@ -1060,7 +1060,7 @@ static bool inter_guild_leave(int guild_id, int account_id, int char_id, int fla } // Change member info -static bool inter_guild_update_member_info_short(int guild_id, int account_id, int char_id, int online, int lv, int16 class) +static bool inter_guild_update_member_info_short(int guild_id, int account_id, int char_id, int online, int lv, int class) { // Could speed up by manipulating only guild_member struct guild *g; @@ -1602,7 +1602,7 @@ static int inter_guild_parse_frommap(int fd) case 0x3032: mapif->parse_GuildAddMember(fd, RFIFOL(fd,4), RFIFOP(fd,8)); break; case 0x3033: mapif->parse_GuildMasterChange(fd, RFIFOL(fd,4), RFIFOP(fd,8), RFIFOW(fd,2)-8); break; case 0x3034: mapif->parse_GuildLeave(fd, RFIFOL(fd,2), RFIFOL(fd,6), RFIFOL(fd,10), RFIFOB(fd,14), RFIFOP(fd,15)); break; - case 0x3035: mapif->parse_GuildChangeMemberInfoShort(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOW(fd,17)); break; + case 0x3035: mapif->parse_GuildChangeMemberInfoShort(fd,RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOL(fd,15),RFIFOL(fd,19)); break; case 0x3036: mapif->parse_BreakGuild(fd,RFIFOL(fd,2)); break; case 0x3037: mapif->parse_GuildMessage(fd, RFIFOL(fd,4), RFIFOL(fd,8), RFIFOP(fd,12), RFIFOW(fd,2)-12); break; case 0x3039: mapif->parse_GuildBasicInfoChange(fd, RFIFOL(fd,4), RFIFOW(fd,8), RFIFOP(fd,10), RFIFOW(fd,2)-10); break; diff --git a/src/char/int_guild.h b/src/char/int_guild.h index 33873edcd..4ed0f526e 100644 --- a/src/char/int_guild.h +++ b/src/char/int_guild.h @@ -72,7 +72,7 @@ struct inter_guild_interface { struct guild *(*create) (const char *name, const struct guild_member *master); bool (*add_member) (int guild_id, const struct guild_member *member, int map_fd); bool (*leave) (int guild_id, int account_id, int char_id, int flag, const char *mes, int map_fd); - bool (*update_member_info_short) (int guild_id, int account_id, int char_id, int online, int lv, int16 class); + bool (*update_member_info_short) (int guild_id, int account_id, int char_id, int online, int lv, int class); bool (*update_member_info) (int guild_id, int account_id, int char_id, int type, const char *data, int len); bool (*disband) (int guild_id); bool (*update_basic_info) (int guild_id, int type, const void *data, int len); diff --git a/src/char/int_pet.c b/src/char/int_pet.c index 8f87becff..d31e7545c 100644 --- a/src/char/int_pet.c +++ b/src/char/int_pet.c @@ -160,7 +160,7 @@ static int inter_pet_delete(int pet_id) return 0; } //------------------------------------------------------ -static struct s_pet *inter_pet_create(int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, +static struct s_pet *inter_pet_create(int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name) { nullpo_ret(pet_name); diff --git a/src/char/int_pet.h b/src/char/int_pet.h index 104771735..b5852d441 100644 --- a/src/char/int_pet.h +++ b/src/char/int_pet.h @@ -37,7 +37,7 @@ struct inter_pet_interface { int (*delete_) (int pet_id); int (*parse_frommap) (int fd); - struct s_pet *(*create) (int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, + struct s_pet *(*create) (int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name); struct s_pet *(*load) (int account_id, int char_id, int pet_id); }; diff --git a/src/char/int_rodex.c b/src/char/int_rodex.c index 18c277574..5725c3777 100644 --- a/src/char/int_rodex.c +++ b/src/char/int_rodex.c @@ -268,7 +268,7 @@ static bool inter_rodex_hasnew(int char_id, int account_id) } /// Checks player name and retrieves some data -static bool inter_rodex_checkname(const char *name, int *target_char_id, short *target_class, int *target_level) +static bool inter_rodex_checkname(const char *name, int *target_char_id, int *target_class, int *target_level) { char esc_name[NAME_LENGTH * 2 + 1]; bool found = false; @@ -286,7 +286,7 @@ static bool inter_rodex_checkname(const char *name, int *target_char_id, short * if (SQL_SUCCESS == SQL->NextRow(inter->sql_handle)) { char *data; SQL->GetData(inter->sql_handle, 0, &data, NULL); *target_char_id = atoi(data); - SQL->GetData(inter->sql_handle, 1, &data, NULL); *target_class = (short)atoi(data); + SQL->GetData(inter->sql_handle, 1, &data, NULL); *target_class = atoi(data); SQL->GetData(inter->sql_handle, 2, &data, NULL); *target_level = atoi(data); found = true; } diff --git a/src/char/int_rodex.h b/src/char/int_rodex.h index 43e2d891c..7fae77d8d 100644 --- a/src/char/int_rodex.h +++ b/src/char/int_rodex.h @@ -34,7 +34,7 @@ struct inter_rodex_interface { int (*parse_frommap) (int fd); int (*fromsql) (int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails); bool (*hasnew) (int char_id, int account_id); - bool (*checkname) (const char *name, int *target_char_id, short *target_class, int *target_level); + bool (*checkname) (const char *name, int *target_char_id, int *target_class, int *target_level); int64 (*savemessage) (struct rodex_message* msg); bool (*updatemail) (int64 mail_id, int8 flag); }; diff --git a/src/char/inter.c b/src/char/inter.c index 418c9b0a1..1f1750e32 100644 --- a/src/char/inter.c +++ b/src/char/inter.c @@ -73,12 +73,12 @@ static int inter_recv_packet_length[] = { -1,-1, 7,-1, -1,13,36, (2 + 4 + 4 + 4 + NAME_LENGTH), 0, 0, 0, 0, 0, 0, 0, 0, // 3000- 6,-1, 6,-1, 0, 0, 0, 0, 10,-1, 0, 0, 0, 0, 0, 0, // 3010- Account Storage, Achievements [Smokexyz] -1,10,-1,14, 14,19, 6,-1, 14,14, 0, 0, 0, 0, 0, 0, // 3020- Party - -1, 6,-1,-1, 55,19, 6,-1, 14,-1,-1,-1, 18,19,186,-1, // 3030- + -1, 6,-1,-1, 55,23, 6,-1, 14,-1,-1,-1, 18,19,186,-1, // 3030- -1, 9, 0, 0, 10,10, 0, 0, 7, 6,10,10, 10,-1, 0, 0, // 3040- Clan System(3044-3045) -1,-1,10,10, 0,-1,12, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3050- Auction System [Zephyrus], Item Bound [Mhalicot] 6,-1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3060- Quest system [Kevin] [Inkfish] -1,10, 6,-1, 0, 0, 0, 0, 0, 0, 0, 0, -1,10, 6,-1, // 3070- Mercenary packets [Zephyrus], Elemental packets [pakpil] - 52,14,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3080- + 56,14,-1, 6, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, // 3080- -1,10,-1, 6, 0, 20,10,11, -1,6 + NAME_LENGTH, 0, 0, 0, 0, 0, 0, // 3090- Homunculus packets [albator], RoDEX packets }; diff --git a/src/char/mapif.c b/src/char/mapif.c index dc5735550..73b7fd46d 100644 --- a/src/char/mapif.c +++ b/src/char/mapif.c @@ -578,9 +578,9 @@ static 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; - WBUFL(buf, 19) = g->member[idx].last_login; - mapif->sendall(buf, 23); + WBUFL(buf, 17) = g->member[idx].class; + WBUFL(buf, 21) = g->member[idx].last_login; + mapif->sendall(buf, 25); return 0; } @@ -797,7 +797,7 @@ static int mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char } // Change member info -static int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class) +static int mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class) { inter_guild->update_member_info_short(guild_id, account_id, char_id, online, lv, class); return 0; @@ -1427,14 +1427,14 @@ static int mapif_pet_created(int fd, int account_id, struct s_pet *p) WFIFOW(fd, 0) = 0x3880; WFIFOL(fd, 2) = account_id; if (p != NULL){ - WFIFOW(fd, 6) = p->class_; - WFIFOL(fd, 8) = p->pet_id; + WFIFOL(fd, 6) = p->class_; + WFIFOL(fd, 10) = p->pet_id; ShowInfo("int_pet: created pet %d - %s\n", p->pet_id, p->name); } else { - WFIFOB(fd, 6) = 0; - WFIFOL(fd, 8) = 0; + WFIFOL(fd, 6) = 0; + WFIFOL(fd, 10) = 0; } - WFIFOSET(fd, 12); + WFIFOSET(fd, 14); return 0; } @@ -1521,15 +1521,15 @@ static int mapif_parse_CreatePet(int fd) account_id = RFIFOL(fd, 2); pet = inter_pet->create(account_id, RFIFOL(fd, 6), - RFIFOW(fd, 10), - RFIFOW(fd, 12), + RFIFOL(fd, 10), RFIFOL(fd, 14), RFIFOL(fd, 18), - RFIFOW(fd, 22), - RFIFOW(fd, 24), - RFIFOB(fd, 26), - RFIFOB(fd, 27), - RFIFOP(fd, 28)); + RFIFOL(fd, 22), + RFIFOW(fd, 26), + RFIFOW(fd, 28), + RFIFOB(fd, 30), + RFIFOB(fd, 31), + RFIFOP(fd, 32)); if (pet != NULL) mapif->pet_created(fd, account_id, pet); @@ -1789,7 +1789,7 @@ static void mapif_parse_rodex_checkname(int fd) int reqchar_id = RFIFOL(fd, 2); char name[NAME_LENGTH]; int target_char_id, target_level; - short target_class; + int target_class; safestrncpy(name, RFIFOP(fd, 6), NAME_LENGTH); @@ -1799,7 +1799,7 @@ static void mapif_parse_rodex_checkname(int fd) mapif->rodex_checkname(fd, reqchar_id, 0, 0, 0, name); } -static void mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name) +static void mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name) { nullpo_retv(name); Assert_retv(reqchar_id > 0); @@ -1809,10 +1809,10 @@ static void mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, sh WFIFOW(fd, 0) = 0x3898; WFIFOL(fd, 2) = reqchar_id; WFIFOL(fd, 6) = target_char_id; - WFIFOW(fd, 10) = target_class; - WFIFOL(fd, 12) = target_level; - safestrncpy(WFIFOP(fd, 16), name, NAME_LENGTH); - WFIFOSET(fd, 16 + NAME_LENGTH); + WFIFOL(fd, 10) = target_class; + WFIFOL(fd, 14) = target_level; + safestrncpy(WFIFOP(fd, 18), name, NAME_LENGTH); + WFIFOSET(fd, 18 + NAME_LENGTH); } static int mapif_load_guild_storage(int fd, int account_id, int guild_id, char flag) diff --git a/src/char/mapif.h b/src/char/mapif.h index bfdefe4ea..f57748ac6 100644 --- a/src/char/mapif.h +++ b/src/char/mapif.h @@ -84,7 +84,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, int16 class); + int (*parse_GuildChangeMemberInfoShort) (int fd, int guild_id, int account_id, int char_id, int online, int lv, int 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); @@ -167,7 +167,7 @@ struct mapif_interface { void (*parse_rodex_send) (int fd); void (*rodex_send) (int fd, int sender_id, int receiver_id, int receiver_accountid, bool result); void (*parse_rodex_checkname) (int fd); - void (*rodex_checkname) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name); + void (*rodex_checkname) (int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name); int (*load_guild_storage) (int fd, int account_id, int guild_id, char flag); int (*save_guild_storage_ack) (int fd, int account_id, int guild_id, int fail); int (*parse_LoadGuildStorage) (int fd); diff --git a/src/common/mmo.h b/src/common/mmo.h index c29da580c..3a0f73520 100644 --- a/src/common/mmo.h +++ b/src/common/mmo.h @@ -590,7 +590,7 @@ struct s_pet { int account_id; int char_id; int pet_id; - short class_; + int class_; short level; int egg_id;//pet egg id int equip;//pet equip name_id @@ -606,8 +606,8 @@ struct s_homunculus { //[orn] char name[NAME_LENGTH]; int hom_id; int char_id; - short class_; - short prev_class; + int class_; + int prev_class; int hp,max_hp,sp,max_sp; unsigned int intimacy; short hunger; @@ -638,7 +638,7 @@ struct s_homunculus { //[orn] struct s_mercenary { int mercenary_id; int char_id; - short class_; + int class_; int hp, sp; unsigned int kill_count; unsigned int life_time; @@ -647,7 +647,7 @@ struct s_mercenary { struct s_elemental { int elemental_id; int char_id; - short class_; + int class_; uint32 mode; int hp, sp, max_hp, max_sp, matk, atk, atk2; short hit, flee, amotion, def, mdef; @@ -690,7 +690,7 @@ struct mmo_charstatus { int zeny; int bank_vault; - int16 class; + int class; int status_point, skill_point; int hp,max_hp,sp,max_sp; unsigned int option; @@ -805,7 +805,7 @@ struct party_member { int account_id; int char_id; char name[NAME_LENGTH]; - int16 class; + int class; unsigned short map; unsigned short lv; unsigned leader : 1, @@ -825,7 +825,7 @@ struct map_session_data; struct guild_member { int account_id, char_id; short hair,hair_color,gender; - int16 class; + int class; short lv; uint64 exp; int exp_payper; diff --git a/src/map/atcommand.c b/src/map/atcommand.c index 0a1fd6da3..87be6ab1b 100644 --- a/src/map/atcommand.c +++ b/src/map/atcommand.c @@ -2718,7 +2718,7 @@ ACMD(makeegg) sd->catch_target_class = pet->db[pet_id].class_; intif->create_pet( sd->status.account_id, sd->status.char_id, - (short)pet->db[pet_id].class_, (short)mob->db(pet->db[pet_id].class_)->lv, + pet->db[pet_id].class_, mob->db(pet->db[pet_id].class_)->lv, pet->db[pet_id].EggID, 0, (short)pet->db[pet_id].intimate, 100, 0, 1, pet->db[pet_id].jname); } else { diff --git a/src/map/battle.c b/src/map/battle.c index f51240810..6fa46a7c7 100644 --- a/src/map/battle.c +++ b/src/map/battle.c @@ -1019,7 +1019,7 @@ static int64 battle_calc_cardfix(int attack_type, struct block_list *src, struct { struct map_session_data *sd, *tsd; int cardfix = 1000; - short t_class, s_class, s_race2, t_race2; + int t_class, s_class, s_race2, t_race2; struct status_data *sstatus, *tstatus; int i; @@ -5552,7 +5552,7 @@ static struct Damage battle_calc_weapon_attack(struct block_list *src, struct bl #endif if( flag.infdef ) { //Plants receive 1 damage when hit - short class_ = status->get_class(target); + int class_ = status->get_class(target); if( flag.hit || wd.damage > 0 ) wd.damage = wd.div_; // In some cases, right hand no need to have a weapon to increase damage if( flag.lh && (flag.hit || wd.damage2 > 0) ) diff --git a/src/map/clif.c b/src/map/clif.c index 024adffc5..86b130e88 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -14516,7 +14516,7 @@ static void clif_parse_pet_evolution(int fd, struct map_session_data *sd) intif->create_pet( sd->status.account_id, sd->status.char_id, - (short)pet->db[pet_id].class_, (short)mob->db(pet->db[pet_id].class_)->lv, + pet->db[pet_id].class_, mob->db(pet->db[pet_id].class_)->lv, pet->db[pet_id].EggID, 0, (short)pet->db[pet_id].intimate, 100, 0, 1, pet->db[pet_id].jname); clif->petEvolutionResult(fd, PET_EVOL_SUCCESS); @@ -21071,7 +21071,7 @@ static void clif_parse_rodex_checkname(int fd, struct map_session_data *sd) { const struct PACKET_CZ_CHECKNAME *rPacket = RFIFOP(fd, 0); int char_id = 0, base_level = 0; - short class = 0; + int class = 0; char name[NAME_LENGTH]; safestrncpy(name, rPacket->Name, NAME_LENGTH); @@ -21079,7 +21079,7 @@ static void clif_parse_rodex_checkname(int fd, struct map_session_data *sd) rodex->check_player(sd, name, &base_level, &char_id, &class); } -static void clif_rodex_checkname_result(struct map_session_data *sd, int char_id, short class_, int base_level, const char *name) +static void clif_rodex_checkname_result(struct map_session_data *sd, int char_id, int class_, int base_level, const char *name) { #if PACKETVER >= 20140521 struct PACKET_ZC_CHECKNAME *sPacket; diff --git a/src/map/clif.h b/src/map/clif.h index 36c360cbc..a7573b56e 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -1543,7 +1543,7 @@ struct clif_interface { void (*pRodexCancelWriteMail) (int fd, struct map_session_data *sd); void (*pRodexOpenMailbox) (int fd, struct map_session_data *sd); void (*pRodexCheckName) (int fd, struct map_session_data *sd); - void (*rodex_checkname_result) (struct map_session_data *sd, int char_id, short class_, int base_level, const char *name); + void (*rodex_checkname_result) (struct map_session_data *sd, int char_id, int class_, int base_level, const char *name); void (*pRodexDeleteMail) (int fd, struct map_session_data *sd); void (*rodex_delete_mail) (struct map_session_data *sd, int8 opentype, int64 mail_id); void (*pRodexRefreshMaillist) (int fd, struct map_session_data *sd); diff --git a/src/map/guild.c b/src/map/guild.c index 17bf7fa6b..0517887d3 100644 --- a/src/map/guild.c +++ b/src/map/guild.c @@ -1018,7 +1018,7 @@ static int guild_send_memberinfoshort(struct map_session_data *sd, int online) } // cleaned up [LuzZza] -static int guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login) +static int guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login) { int i, alv, c, idx = INDEX_NOT_FOUND, om = 0, oldonline = -1; struct guild *g = guild->search(guild_id); diff --git a/src/map/guild.h b/src/map/guild.h index 3df86a3ca..396cbda86 100644 --- a/src/map/guild.h +++ b/src/map/guild.h @@ -126,7 +126,7 @@ struct guild_interface { int (*check_alliance) (int guild_id1, int guild_id2, int flag); /* */ int (*send_memberinfoshort) (struct map_session_data *sd,int online); - int (*recv_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login); + int (*recv_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login); int (*change_memberposition) (int guild_id,int account_id,int char_id,short idx); int (*memberposition_changed) (struct guild *g,int idx,int pos); int (*change_position) (int guild_id,int idx,int mode,int exp_mode,const char *name); diff --git a/src/map/homunculus.c b/src/map/homunculus.c index 6df272243..aa3bb5360 100644 --- a/src/map/homunculus.c +++ b/src/map/homunculus.c @@ -411,7 +411,7 @@ static bool homunculus_levelup(struct homun_data *hd) return true; } -static int homunculus_change_class(struct homun_data *hd, short class_) +static int homunculus_change_class(struct homun_data *hd, int class_) { int i = homun->db_search(class_,HOMUNCULUS_CLASS); nullpo_retr(0, hd); diff --git a/src/map/homunculus.h b/src/map/homunculus.h index f0a156fd7..745c7cd84 100644 --- a/src/map/homunculus.h +++ b/src/map/homunculus.h @@ -174,7 +174,7 @@ struct homunculus_interface { int (*skill_tree_get_max) (int id, int b_class); void (*skillup) (struct homun_data *hd, uint16 skill_id); bool (*levelup) (struct homun_data *hd); - int (*change_class) (struct homun_data *hd, short class_); + int (*change_class) (struct homun_data *hd, int class_); bool (*evolve) (struct homun_data *hd); bool (*mutate) (struct homun_data *hd, int homun_id); int (*gainexp) (struct homun_data *hd, unsigned int exp); diff --git a/src/map/intif.c b/src/map/intif.c index ed4c0e2d2..18b41fe04 100644 --- a/src/map/intif.c +++ b/src/map/intif.c @@ -71,7 +71,7 @@ static int CheckForCharServer(void) } // pet -static int intif_create_pet(int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, +static int intif_create_pet(int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name) { if (intif->CheckForCharServer()) @@ -81,16 +81,16 @@ static int intif_create_pet(int account_id, int char_id, short pet_class, short WFIFOW(inter_fd, 0) = 0x3080; WFIFOL(inter_fd, 2) = account_id; WFIFOL(inter_fd, 6) = char_id; - WFIFOW(inter_fd, 10) = pet_class; - WFIFOW(inter_fd, 12) = pet_lv; - WFIFOL(inter_fd, 14) = pet_egg_id; - WFIFOL(inter_fd, 18) = pet_equip; - WFIFOW(inter_fd, 22) = intimate; - WFIFOW(inter_fd, 24) = hungry; - WFIFOB(inter_fd, 26) = rename_flag; - WFIFOB(inter_fd, 27) = incubate; - memcpy(WFIFOP(inter_fd, 28), pet_name, NAME_LENGTH); - WFIFOSET(inter_fd, 28 + NAME_LENGTH); + WFIFOL(inter_fd, 10) = pet_class; + WFIFOL(inter_fd, 14) = pet_lv; + WFIFOL(inter_fd, 18) = pet_egg_id; + WFIFOL(inter_fd, 22) = pet_equip; + WFIFOW(inter_fd, 26) = intimate; + WFIFOW(inter_fd, 28) = hungry; + WFIFOB(inter_fd, 30) = rename_flag; + WFIFOB(inter_fd, 31) = incubate; + memcpy(WFIFOP(inter_fd, 32), pet_name, NAME_LENGTH); + WFIFOSET(inter_fd, 32 + NAME_LENGTH); return 0; } @@ -903,7 +903,7 @@ static int intif_guild_leave(int guild_id, int account_id, int char_id, int flag } //Update request / Lv online status of the guild members -static int intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class) +static int intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class) { if (intif->CheckForCharServer()) return 0; @@ -913,9 +913,9 @@ static int intif_guild_memberinfoshort(int guild_id, int account_id, int char_id WFIFOL(inter_fd, 6) = account_id; WFIFOL(inter_fd,10) = char_id; WFIFOB(inter_fd,14) = online; - WFIFOW(inter_fd,15) = lv; - WFIFOW(inter_fd,17) = class; - WFIFOSET(inter_fd,19); + WFIFOL(inter_fd,15) = lv; + WFIFOL(inter_fd,19) = class; + WFIFOSET(inter_fd,23); return 0; } @@ -1507,7 +1507,7 @@ static void intif_parse_GuildMemberWithdraw(int fd) // ACK guild member basic info static void intif_parse_GuildMemberInfoShort(int fd) { - guild->recv_memberinfoshort(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOW(fd,17),RFIFOL(fd,19)); + guild->recv_memberinfoshort(RFIFOL(fd,2),RFIFOL(fd,6),RFIFOL(fd,10),RFIFOB(fd,14),RFIFOW(fd,15),RFIFOL(fd,17),RFIFOL(fd,19)); } // ACK guild break @@ -1640,7 +1640,7 @@ static void intif_parse_GuildMasterChanged(int fd) // Request pet creation static void intif_parse_CreatePet(int fd) { - pet->get_egg(RFIFOL(fd,2), RFIFOW(fd,6), RFIFOL(fd,8)); + pet->get_egg(RFIFOL(fd, 2), RFIFOL(fd, 6), RFIFOL(fd, 10)); } // ACK pet data @@ -2830,11 +2830,11 @@ static void intif_parse_RodexCheckName(int fd) struct map_session_data *sd = NULL; int reqchar_id = RFIFOL(fd, 2); int target_char_id = RFIFOL(fd, 6); - short target_class = RFIFOW(fd, 10); - int target_level = RFIFOL(fd, 12); + int target_class = RFIFOL(fd, 10); + int target_level = RFIFOL(fd, 14); char name[NAME_LENGTH]; - safestrncpy(name, RFIFOP(inter_fd, 16), NAME_LENGTH); + safestrncpy(name, RFIFOP(inter_fd, 18), NAME_LENGTH); if (reqchar_id <= 0) return; @@ -2995,13 +2995,13 @@ void intif_defaults(void) -1,-1,27,-1, -1,-1,37,-1, 7, 0, 0, 0, 0, 0, 0, 0, //0x3800-0x380f -1, 0, 0, 0, 0, 0, 0, 0, -1,11, 0, 0, 0, 0, 0, 0, //0x3810 Achievements [Smokexyz/Hercules] 39,-1,15,15, 14,19, 7,-1, 0, 0, 0, 0, 0, 0, 0, 0, //0x3820 - 10,-1,15, 0, 79,23, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830 + 10,-1,15, 0, 79,25, 7,-1, 0,-1,-1,-1, 14,67,186,-1, //0x3830 -1, 0, 0,14, 0, 0, 0, 0, -1,74,-1,11, 11,-1, 0, 0, //0x3840 -1,-1, 7, 7, 7,11, 8, 0, 10, 0, 0, 0, 0, 0, 0, 0, //0x3850 Auctions [Zephyrus] itembound[Akinari] Clan System[Murilo BiO] -1, 7, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3860 Quests [Kevin] [Inkfish] -1, 3, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, -1, 3, 3, 0, //0x3870 Mercenaries [Zephyrus] / Elemental [pakpil] - 12,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3880 - -1,-1, 7, 3, 0,-1, 7, 15,16 + NAME_LENGTH, 0, 0, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator] / RoDEX [KirieZ] + 14,-1, 7, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, //0x3880 + -1,-1, 7, 3, 0,-1, 7, 15,18 + NAME_LENGTH, 0, 0, 0, 0, 0, 0, 0, //0x3890 Homunculus [albator] / RoDEX [KirieZ] }; intif = &intif_s; diff --git a/src/map/intif.h b/src/map/intif.h index 21f7a494c..425ab1d18 100644 --- a/src/map/intif.h +++ b/src/map/intif.h @@ -58,7 +58,7 @@ struct intif_interface { int packet_len_table[INTIF_PACKET_LEN_TABLE_SIZE]; /* funcs */ int (*parse) (int fd); - int (*create_pet)(int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id, + int (*create_pet)(int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name); int (*broadcast) (const char *mes, int len, int type); int (*broadcast2) (const char *mes, int len, unsigned int fontColor, short fontType, short fontSize, short fontAlign, short fontY); @@ -84,7 +84,7 @@ struct intif_interface { int (*guild_request_info) (int guild_id); int (*guild_addmember) (int guild_id, struct guild_member *m); int (*guild_leave) (int guild_id, int account_id, int char_id, int flag, const char *mes); - int (*guild_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int16 class); + int (*guild_memberinfoshort) (int guild_id, int account_id, int char_id, int online, int lv, int class); int (*guild_break) (int guild_id); int (*guild_message) (int guild_id, int account_id, const char *mes, int len); int (*guild_change_gm) (int guild_id, const char *name, int len); diff --git a/src/map/map.h b/src/map/map.h index d31ff4839..ace2a35a1 100644 --- a/src/map/map.h +++ b/src/map/map.h @@ -518,7 +518,7 @@ struct block_list { // Mob List Held in memory for Dynamic Mobs [Wizputer] // Expanded to specify all mob-related spawn data by [Skotlex] struct spawn_data { - short class_; ///< Class, used because a mob can change it's class + int class_; ///< Class, used because a mob can change it's class unsigned short m, x, y; ///< Spawn information (map, point, spawn-area around point) signed short xs, ys; unsigned short num; ///< Number of mobs using this structure @@ -800,7 +800,7 @@ struct questinfo { unsigned short icon; unsigned char color; bool hasJob; - unsigned short job;/* perhaps a mapid mask would be most flexible? */ + unsigned int job;/* perhaps a mapid mask would be most flexible? */ bool sex_enabled; int sex; struct { diff --git a/src/map/mob.h b/src/map/mob.h index 4cb3877ed..cdfc07c7d 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -208,7 +208,7 @@ struct mob_data { struct spawn_data *spawn; //Spawn data. int spawn_timer; //Required for Convex Mirror struct item *lootitem; - short class_; + int class_; unsigned int tdmg; //Stores total damage given to the mob, for exp calculations. [Skotlex] int level; int target_id,attacked_id; diff --git a/src/map/npc.c b/src/map/npc.c index 7e1dab1b2..61341744d 100644 --- a/src/map/npc.c +++ b/src/map/npc.c @@ -2961,7 +2961,7 @@ static bool npc_viewisid(const char *viewid) * @param class_ The NPC view class. * @return A pointer to the created NPC data (ownership passed to the caller). */ -static struct npc_data *npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_) +static struct npc_data *npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_) { struct npc_data *nd; @@ -3918,7 +3918,7 @@ static void npc_setdisplayname(struct npc_data *nd, const char *newname) /// /// @param nd Target npc /// @param class_ New display class -static void npc_setclass(struct npc_data *nd, short class_) +static void npc_setclass(struct npc_data *nd, int class_) { nullpo_retv(nd); @@ -4199,7 +4199,7 @@ static const char *npc_parse_mob(const char *w1, const char *w2, const char *w3, mobspawn.num = (unsigned short)num; mobspawn.active = 0; - mobspawn.class_ = (short) class_; + mobspawn.class_ = class_; mobspawn.x = (unsigned short)x; mobspawn.y = (unsigned short)y; mobspawn.xs = (signed short)xs; diff --git a/src/map/npc.h b/src/map/npc.h index d455a395b..0eb8befd1 100644 --- a/src/map/npc.h +++ b/src/map/npc.h @@ -77,7 +77,7 @@ struct npc_data { struct view_data vd; unsigned int option; struct npc_data *master_nd; - short class_; + int class_; short speed; char name[NAME_LENGTH+1];// display name char exname[NAME_LENGTH+1];// unique npc name @@ -268,7 +268,7 @@ struct npc_interface { void (*parsename) (struct npc_data *nd, const char *name, const char *start, const char *buffer, const char *filepath); int (*parseview) (const char *w4, const char *start, const char *buffer, const char *filepath); bool (*viewisid) (const char *viewid); - struct npc_data *(*create_npc) (enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_); + struct npc_data *(*create_npc) (enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_); struct npc_data* (*add_warp) (char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y); const char *(*parse_warp) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); const char *(*parse_shop) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); @@ -288,7 +288,7 @@ struct npc_interface { void (*unsetcells) (struct npc_data *nd); void (*movenpc) (struct npc_data *nd, int16 x, int16 y); void (*setdisplayname) (struct npc_data *nd, const char *newname); - void (*setclass) (struct npc_data *nd, short class_); + void (*setclass) (struct npc_data *nd, int class_); int (*do_atcmd_event) (struct map_session_data *sd, const char *command, const char *message, const char *eventname); const char *(*parse_function) (const char *w1, const char *w2, const char *w3, const char *w4, const char *start, const char *buffer, const char *filepath, int *retval); void (*parse_mob2) (struct spawn_data *mobspawn); diff --git a/src/map/pc.c b/src/map/pc.c index 5410ae96a..ea18715bb 100644 --- a/src/map/pc.c +++ b/src/map/pc.c @@ -6147,7 +6147,7 @@ static int pc_checkequip(struct map_session_data *sd, int pos) * Convert's from the client's lame Job ID system * to the map server's 'makes sense' system. [Skotlex] *------------------------------------------*/ -static int pc_jobid2mapid(int16 class) +static int pc_jobid2mapid(int class) { switch (class) { //Novice And 1-1 Jobs @@ -6289,9 +6289,9 @@ static int pc_jobid2mapid(int16 class) } //Reverts the map-style class id to the client-style one. -static int pc_mapid2jobid(uint16 job, int sex) +static int pc_mapid2jobid(unsigned int class, int sex) { - switch (job) { + switch (class) { //Novice And 1-1 Jobs case MAPID_NOVICE: return JOB_NOVICE; case MAPID_SWORDMAN: return JOB_SWORDMAN; diff --git a/src/map/pc.h b/src/map/pc.h index 90e59edb2..b2069d4df 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -117,22 +117,22 @@ BEGIN_ZEROED_BLOCK; // all the variables within this block get zero'ed in each c int addrace2[RC2_MAX]; int addsize[3]; struct drain_data { - short rate; - short per; - short value; + int rate; + int per; + int value; unsigned type:1; } hp_drain[RC_MAX], sp_drain[RC_MAX]; struct { - short class_, rate; + int class_, rate; } add_dmg[MAX_PC_BONUS]; struct { - short flag, rate; + int flag, rate; unsigned char ele; } addele2[MAX_PC_BONUS]; END_ZEROED_BLOCK; }; struct s_autospell { - short id, lv, rate, flag; + int id, lv, rate, flag; int card_id; bool lock; // bAutoSpellOnSkill: blocks autospell from triggering again, while being executed }; @@ -147,7 +147,7 @@ struct s_addeffect { }; struct s_addeffectonskill { enum sc_type id; - short rate, skill; + int rate, skill; unsigned char target; }; struct s_add_drop { @@ -156,11 +156,11 @@ struct s_add_drop { int race, rate; }; struct s_autobonus { - short rate,atk_type; + int rate,atk_type; unsigned int duration; char *bonus_script, *other_script; int active; - unsigned short pos; + unsigned int pos; }; enum npc_timeout_type { NPCT_INPUT = 0, @@ -219,11 +219,11 @@ struct map_session_data { unsigned int changemap : 1; unsigned int callshop : 1; // flag to indicate that a script used callshop; on a shop short pmap; // Previous map on Map Change - unsigned short autoloot; + unsigned int autoloot; int autolootid[AUTOLOOTITEM_SIZE]; // [Zephyrus] - unsigned short autoloottype; + unsigned int autoloottype; unsigned int autolooting : 1; //performance-saver, autolooting state for @alootid - unsigned short autobonus; //flag to indicate if an autobonus is activated. [Inkfish] + unsigned int autobonus; //flag to indicate if an autobonus is activated. [Inkfish] unsigned int gmaster_flag : 1; unsigned int prevend : 1;//used to flag wheather you've spent 40sp to open the vending or not. unsigned int warping : 1;//states whether you're in the middle of a warp processing @@ -288,7 +288,7 @@ struct map_session_data { int followtimer; // [MouseJstr] int followtarget; time_t emotionlasttime; // to limit flood with emotion packets - short skillitem,skillitemlv; + int skillitem,skillitemlv; uint16 skill_id_old,skill_lv_old; uint16 skill_id_dance,skill_lv_dance; short cook_mastery; // range: [0,1999] [Inkfish] @@ -312,7 +312,7 @@ struct map_session_data { int16 weapontype; ///< Weapon type considering both hands (@see enum weapon_type). int16 weapontype1; ///< Weapon type in the right/primary hand (@see enum weapon_type). int16 weapontype2; ///< Weapon type in the left/secondary hand (@see enum weapon_type). - short disguise; // [Valaris] + int disguise; // [Valaris] struct weapon_data right_weapon, left_weapon; BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of status_calc_pc() @@ -337,9 +337,9 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st int expaddrace[RC_MAX]; int ignore_mdef[RC_MAX]; int ignore_def[RC_MAX]; - short sp_gain_race[RC_MAX]; - short sp_gain_race_attack[RC_MAX]; - short hp_gain_race_attack[RC_MAX]; + int sp_gain_race[RC_MAX]; + int sp_gain_race_attack[RC_MAX]; + int hp_gain_race_attack[RC_MAX]; #ifdef RENEWAL int race_tolerance[RC_MAX]; #endif @@ -347,16 +347,16 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st struct s_addeffect addeff[MAX_PC_BONUS], addeff2[MAX_PC_BONUS]; struct s_addeffectonskill addeff3[MAX_PC_BONUS]; struct { //skillatk raises bonus dmg% of skills, skillheal increases heal%, skillblown increases bonus blewcount for some skills. - unsigned short id; - short val; + unsigned int id; + int val; } skillatk[MAX_PC_BONUS], skillusesprate[MAX_PC_BONUS], skillusesp[MAX_PC_BONUS], skillheal[5], skillheal2[5], skillblown[MAX_PC_BONUS], skillcast[MAX_PC_BONUS], skillcooldown[MAX_PC_BONUS], skillfixcast[MAX_PC_BONUS], skillvarcast[MAX_PC_BONUS], skillfixcastrate[MAX_PC_BONUS]; struct { - short value; + int value; int rate; int tick; } hp_loss, sp_loss, hp_regen, sp_regen; struct { - short class_, rate; + int class_, rate; } add_def[MAX_PC_BONUS], add_mdef[MAX_PC_BONUS], add_mdmg[MAX_PC_BONUS]; struct s_add_drop add_drop[MAX_PC_BONUS]; struct { @@ -364,11 +364,11 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st int rate; } itemhealrate[MAX_PC_BONUS]; struct { - short flag, rate; + int flag, rate; unsigned char ele; } subele2[MAX_PC_BONUS]; struct { - short value; + int value; int rate, tick; } def_set_race[RC_MAX], mdef_set_race[RC_MAX]; struct { @@ -394,17 +394,17 @@ BEGIN_ZEROED_BLOCK; // this block will be globally zeroed at the beginning of st int itemhealrate2; // [Epoque] Increase heal rate of all healing items. int shieldmdef;//royal guard's unsigned int setitem_hash, setitem_hash2; //Split in 2 because shift operations only work on int ranges. [Skotlex] - short splash_range, splash_add_range; - short add_steal_rate; - short add_heal_rate, add_heal2_rate; - short sp_gain_value, hp_gain_value, magic_sp_gain_value, magic_hp_gain_value; - short hp_vanish_rate; - short hp_vanish_per, hp_vanish_trigger; - short sp_vanish_rate; - short sp_vanish_per, sp_vanish_trigger; - unsigned short unbreakable; // chance to prevent ANY equipment breaking [celest] - unsigned short unbreakable_equip; //100% break resistance on certain equipment - unsigned short unstripable_equip; + int splash_range, splash_add_range; + int add_steal_rate; + int add_heal_rate, add_heal2_rate; + int sp_gain_value, hp_gain_value, magic_sp_gain_value, magic_hp_gain_value; + int hp_vanish_rate; + int hp_vanish_per, hp_vanish_trigger; + int sp_vanish_rate; + int sp_vanish_per, sp_vanish_trigger; + unsigned int unbreakable; // chance to prevent ANY equipment breaking [celest] + unsigned int unbreakable_equip; //100% break resistance on certain equipment + unsigned int unstripable_equip; int fixcastrate,varcastrate; int add_fixcast,add_varcast; int ematk; // matk bonus from equipment @@ -419,22 +419,22 @@ END_ZEROED_BLOCK; int matk_rate; int critical_rate,hit_rate,flee_rate,flee2_rate,def_rate,def2_rate,mdef_rate,mdef2_rate; int itemid; - short itemindex; //Used item's index in sd->inventory [Skotlex] - short catch_target_class; // pet catching, stores a pet class to catch (short now) [zzo] - short spiritball, spiritball_old; + int itemindex; //Used item's index in sd->inventory [Skotlex] + int catch_target_class; + int spiritball, spiritball_old; int spirit_timer[MAX_SPIRITBALL]; - short charm_count; + int charm_count; int charm_type; int charm_timer[MAX_SPIRITCHARM]; unsigned char potion_success_counter; //Potion successes in row counter unsigned char mission_count; //Stores the bounty kill count for TK_MISSION - short mission_mobid; //Stores the target mob_id for TK_MISSION + int mission_mobid; //Stores the target mob_id for TK_MISSION int die_counter; //Total number of times you've died int devotion[MAX_PC_DEVOTION]; //Stores the account IDs of chars devoted to. int trade_partner; struct { struct { - short index, amount; + int index, amount; } item[10]; int zeny, weight; } deal; @@ -465,18 +465,18 @@ END_ZEROED_BLOCK; struct { int m; //-1 - none, other: map index corresponding to map name. - unsigned short index; //map index + unsigned int index; //map index } feel_map[MAX_PC_FEELHATE];// 0 - Sun; 1 - Moon; 2 - Stars - short hate_mob[MAX_PC_FEELHATE]; + int hate_mob[MAX_PC_FEELHATE]; int pvp_timer; - short pvp_point; - unsigned short pvp_rank, pvp_lastusers; - unsigned short pvp_won, pvp_lost; + int pvp_point; + unsigned int pvp_rank, pvp_lastusers; + unsigned int pvp_won, pvp_lost; char eventqueue[MAX_EVENTQUEUE][EVENT_NAME_LENGTH]; int eventtimer[MAX_EVENTTIMER]; - unsigned short eventcount; // [celest] + unsigned int eventcount; // [celest] int change_level_2nd; // job level when changing from 1st to 2nd class [jobchange_level in global_reg_value] int change_level_3rd; // job level when changing from 2nd to 3rd class [jobchange_level_3rd in global_reg_value] @@ -769,24 +769,24 @@ END_ZEROED_BLOCK; #define pc_can_give_bound_items(sd) ( pc_has_permission((sd),PC_PERM_TRADE_BOUND) ) struct skill_tree_requirement { - short id; + int id; unsigned short idx; unsigned char lv; }; struct skill_tree_entry { - short id; + int id; unsigned short idx; unsigned char max; unsigned char joblv; - short inherited; + int inherited; VECTOR_DECL(struct skill_tree_requirement) need; }; // Celest struct sg_data { - short anger_id; - short bless_id; - short comfort_id; + int anger_id; + int bless_id; + int comfort_id; char feel_var[NAME_LENGTH]; char hate_var[NAME_LENGTH]; bool (*day_func)(void); @@ -1068,8 +1068,8 @@ END_ZEROED_BLOCK; /* End */ void (*setstand) (struct map_session_data *sd); int (*candrop) (struct map_session_data *sd,struct item *item); - int (*jobid2mapid) (int16 class); // Skotlex - int (*mapid2jobid) (unsigned short class_, int sex); // Skotlex + int (*jobid2mapid) (int class); // Skotlex + int (*mapid2jobid) (unsigned int class_, int sex); // Skotlex const char * (*job_name) (int class); diff --git a/src/map/pet.c b/src/map/pet.c index dd9f1ebbf..c9603a76c 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -111,8 +111,8 @@ static int pet_create_egg(struct map_session_data *sd, int item_id) if (!pc->inventoryblank(sd)) return 0; // Inventory full sd->catch_target_class = pet->db[pet_id].class_; intif->create_pet(sd->status.account_id, sd->status.char_id, - (short)pet->db[pet_id].class_, - (short)mob->db(pet->db[pet_id].class_)->lv, + pet->db[pet_id].class_, + mob->db(pet->db[pet_id].class_)->lv, pet->db[pet_id].EggID, 0, (short)pet->db[pet_id].intimate, 100, 0, 1, pet->db[pet_id].jname); @@ -614,7 +614,7 @@ static int pet_catch_process2(struct map_session_data *sd, int target_id) * pet_id - Should contain pet id otherwise means failure * returns true on success **/ -static bool pet_get_egg(int account_id, short pet_class, int pet_id) +static bool pet_get_egg(int account_id, int pet_class, int pet_id) { struct map_session_data *sd; struct item tmp_item; diff --git a/src/map/pet.h b/src/map/pet.h index 049816804..2508a70a6 100644 --- a/src/map/pet.h +++ b/src/map/pet.h @@ -37,7 +37,7 @@ struct pet_evolve_data { }; struct s_pet_db { - short class_; + int class_; char name[NAME_LENGTH],jname[NAME_LENGTH]; int itemID; int EggID; @@ -160,7 +160,7 @@ struct pet_interface { int (*select_egg) (struct map_session_data *sd, int egg_index); int (*catch_process1) (struct map_session_data *sd, int target_class); int (*catch_process2) (struct map_session_data *sd, int target_id); - bool (*get_egg) (int account_id, short pet_class, int pet_id ); + bool (*get_egg) (int account_id, int pet_class, int pet_id ); int (*unequipitem) (struct map_session_data *sd, struct pet_data *pd); int (*food) (struct map_session_data *sd, struct pet_data *pd); int (*ai_sub_hard_lootsearch) (struct block_list *bl, va_list ap); diff --git a/src/map/rodex.c b/src/map/rodex.c index eea27b6d0..33070c5f8 100644 --- a/src/map/rodex.c +++ b/src/map/rodex.c @@ -204,7 +204,7 @@ static void rodex_remove_item(struct map_session_data *sd, int16 idx, int16 amou /// @param base_level : Reference to return the character base level, if he exists /// @param char_id : Reference to return the character id, if he exists /// @param class : Reference to return the character class id, if he exists -static void rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class) +static void rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class) { intif->rodex_checkname(sd, name); } diff --git a/src/map/rodex.h b/src/map/rodex.h index ddf7cb32b..56cc3a9d1 100644 --- a/src/map/rodex.h +++ b/src/map/rodex.h @@ -65,7 +65,7 @@ struct rodex_interface { void (*refresh) (struct map_session_data *sd, int8 open_type, int64 first_mail_id); void (*add_item) (struct map_session_data *sd, int16 idx, int16 amount); void (*remove_item) (struct map_session_data *sd, int16 idx, int16 amount); - void (*check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class); + void (*check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class); int (*send_mail) (struct map_session_data *sd, const char *receiver_name, const char *body, const char *title, int64 zeny); void (*send_mail_result) (struct map_session_data *ssd, struct map_session_data *rsd, bool result); struct rodex_message *(*get_mail) (struct map_session_data *sd, int64 mail_id); diff --git a/src/map/script.c b/src/map/script.c index 76d15d8f1..7578fcdcc 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -10733,7 +10733,7 @@ static BUILDIN(makepet) if (pet_id >= 0 && sd) { sd->catch_target_class = pet->db[pet_id].class_; intif->create_pet(sd->status.account_id, sd->status.char_id, - (short)pet->db[pet_id].class_, (short)mob->db(pet->db[pet_id].class_)->lv, + pet->db[pet_id].class_, mob->db(pet->db[pet_id].class_)->lv, pet->db[pet_id].EggID, 0, (short)pet->db[pet_id].intimate, 100, 0, 1, pet->db[pet_id].jname); } diff --git a/src/plugins/HPMHooking/HPMHooking.Defs.inc b/src/plugins/HPMHooking/HPMHooking.Defs.inc index 5f3a3a4be..7cc5ef2b1 100644 --- a/src/plugins/HPMHooking/HPMHooking.Defs.inc +++ b/src/plugins/HPMHooking/HPMHooking.Defs.inc @@ -552,8 +552,8 @@ typedef bool (*HPMHOOK_pre_chr_name_exists) (const char **name, const char **esc typedef bool (*HPMHOOK_post_chr_name_exists) (bool retVal___, const char *name, const char *esc_name); typedef int (*HPMHOOK_pre_chr_check_char_name) (const char **name, const char **esc_name); typedef int (*HPMHOOK_post_chr_check_char_name) (int retVal___, const char *name, const char *esc_name); -typedef int (*HPMHOOK_pre_chr_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, uint8 *sex); -typedef int (*HPMHOOK_post_chr_make_new_char_sql) (int retVal___, 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, uint8 sex); +typedef int (*HPMHOOK_pre_chr_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 *starting_job, uint8 *sex); +typedef int (*HPMHOOK_post_chr_make_new_char_sql) (int retVal___, 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 starting_job, uint8 sex); typedef int (*HPMHOOK_pre_chr_divorce_char_sql) (int *partner_id1, int *partner_id2); typedef int (*HPMHOOK_post_chr_divorce_char_sql) (int retVal___, int partner_id1, int partner_id2); typedef int (*HPMHOOK_pre_chr_count_users) (void); @@ -2562,8 +2562,8 @@ typedef void (*HPMHOOK_pre_clif_pRodexOpenMailbox) (int *fd, struct map_session_ typedef void (*HPMHOOK_post_clif_pRodexOpenMailbox) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_pRodexCheckName) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pRodexCheckName) (int fd, struct map_session_data *sd); -typedef void (*HPMHOOK_pre_clif_rodex_checkname_result) (struct map_session_data **sd, int *char_id, short *class_, int *base_level, const char **name); -typedef void (*HPMHOOK_post_clif_rodex_checkname_result) (struct map_session_data *sd, int char_id, short class_, int base_level, const char *name); +typedef void (*HPMHOOK_pre_clif_rodex_checkname_result) (struct map_session_data **sd, int *char_id, int *class_, int *base_level, const char **name); +typedef void (*HPMHOOK_post_clif_rodex_checkname_result) (struct map_session_data *sd, int char_id, int class_, int base_level, const char *name); typedef void (*HPMHOOK_pre_clif_pRodexDeleteMail) (int *fd, struct map_session_data **sd); typedef void (*HPMHOOK_post_clif_pRodexDeleteMail) (int fd, struct map_session_data *sd); typedef void (*HPMHOOK_pre_clif_rodex_delete_mail) (struct map_session_data **sd, int8 *opentype, int64 *mail_id); @@ -2932,8 +2932,8 @@ typedef int (*HPMHOOK_pre_guild_check_alliance) (int *guild_id1, int *guild_id2, typedef int (*HPMHOOK_post_guild_check_alliance) (int retVal___, int guild_id1, int guild_id2, int flag); typedef int (*HPMHOOK_pre_guild_send_memberinfoshort) (struct map_session_data **sd, int *online); typedef int (*HPMHOOK_post_guild_send_memberinfoshort) (int retVal___, struct map_session_data *sd, int online); -typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class, uint32 *last_login); -typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login); +typedef int (*HPMHOOK_pre_guild_recv_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class, uint32 *last_login); +typedef int (*HPMHOOK_post_guild_recv_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login); typedef int (*HPMHOOK_pre_guild_change_memberposition) (int *guild_id, int *account_id, int *char_id, short *idx); typedef int (*HPMHOOK_post_guild_change_memberposition) (int retVal___, int guild_id, int account_id, int char_id, short idx); typedef int (*HPMHOOK_pre_guild_memberposition_changed) (struct guild **g, int *idx, int *pos); @@ -3092,8 +3092,8 @@ typedef void (*HPMHOOK_pre_homun_skillup) (struct homun_data **hd, uint16 *skill typedef void (*HPMHOOK_post_homun_skillup) (struct homun_data *hd, uint16 skill_id); typedef bool (*HPMHOOK_pre_homun_levelup) (struct homun_data **hd); typedef bool (*HPMHOOK_post_homun_levelup) (bool retVal___, struct homun_data *hd); -typedef int (*HPMHOOK_pre_homun_change_class) (struct homun_data **hd, short *class_); -typedef int (*HPMHOOK_post_homun_change_class) (int retVal___, struct homun_data *hd, short class_); +typedef int (*HPMHOOK_pre_homun_change_class) (struct homun_data **hd, int *class_); +typedef int (*HPMHOOK_post_homun_change_class) (int retVal___, struct homun_data *hd, int class_); typedef bool (*HPMHOOK_pre_homun_evolve) (struct homun_data **hd); typedef bool (*HPMHOOK_post_homun_evolve) (bool retVal___, struct homun_data *hd); typedef bool (*HPMHOOK_pre_homun_mutate) (struct homun_data **hd, int *homun_id); @@ -3306,8 +3306,8 @@ typedef bool (*HPMHOOK_pre_inter_guild_add_member) (int *guild_id, const struct typedef bool (*HPMHOOK_post_inter_guild_add_member) (bool retVal___, int guild_id, const struct guild_member *member, int map_fd); typedef bool (*HPMHOOK_pre_inter_guild_leave) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes, int *map_fd); typedef bool (*HPMHOOK_post_inter_guild_leave) (bool retVal___, int guild_id, int account_id, int char_id, int flag, const char *mes, int map_fd); -typedef bool (*HPMHOOK_pre_inter_guild_update_member_info_short) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); -typedef bool (*HPMHOOK_post_inter_guild_update_member_info_short) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class); +typedef bool (*HPMHOOK_pre_inter_guild_update_member_info_short) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class); +typedef bool (*HPMHOOK_post_inter_guild_update_member_info_short) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class); typedef bool (*HPMHOOK_pre_inter_guild_update_member_info) (int *guild_id, int *account_id, int *char_id, int *type, const char **data, int *len); typedef bool (*HPMHOOK_post_inter_guild_update_member_info) (bool retVal___, int guild_id, int account_id, int char_id, int type, const char *data, int len); typedef bool (*HPMHOOK_pre_inter_guild_disband) (int *guild_id); @@ -3500,8 +3500,8 @@ typedef int (*HPMHOOK_pre_inter_pet_delete_) (int *pet_id); typedef int (*HPMHOOK_post_inter_pet_delete_) (int retVal___, int pet_id); typedef int (*HPMHOOK_pre_inter_pet_parse_frommap) (int *fd); typedef int (*HPMHOOK_post_inter_pet_parse_frommap) (int retVal___, int fd); -typedef struct s_pet* (*HPMHOOK_pre_inter_pet_create) (int *account_id, int *char_id, short *pet_class, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name); -typedef struct s_pet* (*HPMHOOK_post_inter_pet_create) (struct s_pet* retVal___, int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name); +typedef struct s_pet* (*HPMHOOK_pre_inter_pet_create) (int *account_id, int *char_id, int *pet_class, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name); +typedef struct s_pet* (*HPMHOOK_post_inter_pet_create) (struct s_pet* retVal___, int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name); typedef struct s_pet* (*HPMHOOK_pre_inter_pet_load) (int *account_id, int *char_id, int *pet_id); typedef struct s_pet* (*HPMHOOK_post_inter_pet_load) (struct s_pet* retVal___, int account_id, int char_id, int pet_id); #endif // CHAR_INT_PET_H @@ -3530,8 +3530,8 @@ typedef int (*HPMHOOK_pre_inter_rodex_fromsql) (int *char_id, int *account_id, i typedef int (*HPMHOOK_post_inter_rodex_fromsql) (int retVal___, int char_id, int account_id, int8 opentype, int64 mail_id, struct rodex_maillist *mails); typedef bool (*HPMHOOK_pre_inter_rodex_hasnew) (int *char_id, int *account_id); typedef bool (*HPMHOOK_post_inter_rodex_hasnew) (bool retVal___, int char_id, int account_id); -typedef bool (*HPMHOOK_pre_inter_rodex_checkname) (const char **name, int **target_char_id, short **target_class, int **target_level); -typedef bool (*HPMHOOK_post_inter_rodex_checkname) (bool retVal___, const char *name, int *target_char_id, short *target_class, int *target_level); +typedef bool (*HPMHOOK_pre_inter_rodex_checkname) (const char **name, int **target_char_id, int **target_class, int **target_level); +typedef bool (*HPMHOOK_post_inter_rodex_checkname) (bool retVal___, const char *name, int *target_char_id, int *target_class, int *target_level); typedef int64 (*HPMHOOK_pre_inter_rodex_savemessage) (struct rodex_message **msg); typedef int64 (*HPMHOOK_post_inter_rodex_savemessage) (int64 retVal___, struct rodex_message *msg); typedef bool (*HPMHOOK_pre_inter_rodex_updatemail) (int64 *mail_id, int8 *flag); @@ -3562,8 +3562,8 @@ typedef bool (*HPMHOOK_post_inter_storage_retrieve_bound_items) (bool retVal___, #ifdef MAP_INTIF_H /* intif */ typedef int (*HPMHOOK_pre_intif_parse) (int *fd); typedef int (*HPMHOOK_post_intif_parse) (int retVal___, int fd); -typedef int (*HPMHOOK_pre_intif_create_pet) (int *account_id, int *char_id, short *pet_type, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name); -typedef int (*HPMHOOK_post_intif_create_pet) (int retVal___, int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name); +typedef int (*HPMHOOK_pre_intif_create_pet) (int *account_id, int *char_id, int *pet_type, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name); +typedef int (*HPMHOOK_post_intif_create_pet) (int retVal___, int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name); typedef int (*HPMHOOK_pre_intif_broadcast) (const char **mes, int *len, int *type); typedef int (*HPMHOOK_post_intif_broadcast) (int retVal___, const char *mes, int len, int type); typedef int (*HPMHOOK_pre_intif_broadcast2) (const char **mes, int *len, unsigned int *fontColor, short *fontType, short *fontSize, short *fontAlign, short *fontY); @@ -3612,8 +3612,8 @@ typedef int (*HPMHOOK_pre_intif_guild_addmember) (int *guild_id, struct guild_me typedef int (*HPMHOOK_post_intif_guild_addmember) (int retVal___, int guild_id, struct guild_member *m); typedef int (*HPMHOOK_pre_intif_guild_leave) (int *guild_id, int *account_id, int *char_id, int *flag, const char **mes); typedef int (*HPMHOOK_post_intif_guild_leave) (int retVal___, int guild_id, int account_id, int char_id, int flag, const char *mes); -typedef int (*HPMHOOK_pre_intif_guild_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); -typedef int (*HPMHOOK_post_intif_guild_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class); +typedef int (*HPMHOOK_pre_intif_guild_memberinfoshort) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class); +typedef int (*HPMHOOK_post_intif_guild_memberinfoshort) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class); typedef int (*HPMHOOK_pre_intif_guild_break) (int *guild_id); typedef int (*HPMHOOK_post_intif_guild_break) (int retVal___, int guild_id); typedef int (*HPMHOOK_pre_intif_guild_message) (int *guild_id, int *account_id, const char **mes, int *len); @@ -4882,8 +4882,8 @@ typedef int (*HPMHOOK_pre_mapif_parse_GuildAddMember) (int *fd, int *guild_id, c typedef int (*HPMHOOK_post_mapif_parse_GuildAddMember) (int retVal___, int fd, int guild_id, const struct guild_member *m); typedef int (*HPMHOOK_pre_mapif_parse_GuildLeave) (int *fd, int *guild_id, int *account_id, int *char_id, int *flag, const char **mes); typedef int (*HPMHOOK_post_mapif_parse_GuildLeave) (int retVal___, int fd, int guild_id, int account_id, int char_id, int flag, const char *mes); -typedef int (*HPMHOOK_pre_mapif_parse_GuildChangeMemberInfoShort) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); -typedef int (*HPMHOOK_post_mapif_parse_GuildChangeMemberInfoShort) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class); +typedef int (*HPMHOOK_pre_mapif_parse_GuildChangeMemberInfoShort) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class); +typedef int (*HPMHOOK_post_mapif_parse_GuildChangeMemberInfoShort) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int class); typedef int (*HPMHOOK_pre_mapif_parse_BreakGuild) (int *fd, int *guild_id); typedef int (*HPMHOOK_post_mapif_parse_BreakGuild) (int retVal___, int fd, int guild_id); typedef int (*HPMHOOK_pre_mapif_parse_GuildMessage) (int *fd, int *guild_id, int *account_id, const char **mes, int *len); @@ -5048,8 +5048,8 @@ typedef void (*HPMHOOK_pre_mapif_rodex_send) (int *fd, int *sender_id, int *rece typedef void (*HPMHOOK_post_mapif_rodex_send) (int fd, int sender_id, int receiver_id, int receiver_accountid, bool result); typedef void (*HPMHOOK_pre_mapif_parse_rodex_checkname) (int *fd); typedef void (*HPMHOOK_post_mapif_parse_rodex_checkname) (int fd); -typedef void (*HPMHOOK_pre_mapif_rodex_checkname) (int *fd, int *reqchar_id, int *target_char_id, short *target_class, int *target_level, char **name); -typedef void (*HPMHOOK_post_mapif_rodex_checkname) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name); +typedef void (*HPMHOOK_pre_mapif_rodex_checkname) (int *fd, int *reqchar_id, int *target_char_id, int *target_class, int *target_level, char **name); +typedef void (*HPMHOOK_post_mapif_rodex_checkname) (int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name); typedef int (*HPMHOOK_pre_mapif_load_guild_storage) (int *fd, int *account_id, int *guild_id, char *flag); typedef int (*HPMHOOK_post_mapif_load_guild_storage) (int retVal___, int fd, int account_id, int guild_id, char flag); typedef int (*HPMHOOK_pre_mapif_save_guild_storage_ack) (int *fd, int *account_id, int *guild_id, int *fail); @@ -5616,8 +5616,8 @@ typedef int (*HPMHOOK_pre_npc_parseview) (const char **w4, const char **start, c typedef int (*HPMHOOK_post_npc_parseview) (int retVal___, const char *w4, const char *start, const char *buffer, const char *filepath); typedef bool (*HPMHOOK_pre_npc_viewisid) (const char **viewid); typedef bool (*HPMHOOK_post_npc_viewisid) (bool retVal___, const char *viewid); -typedef struct npc_data* (*HPMHOOK_pre_npc_create_npc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int16 *class_); -typedef struct npc_data* (*HPMHOOK_post_npc_create_npc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_); +typedef struct npc_data* (*HPMHOOK_pre_npc_create_npc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int *class_); +typedef struct npc_data* (*HPMHOOK_post_npc_create_npc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_); typedef struct npc_data* (*HPMHOOK_pre_npc_add_warp) (char **name, short *from_mapid, short *from_x, short *from_y, short *xs, short *ys, unsigned short *to_mapindex, short *to_x, short *to_y); typedef struct npc_data* (*HPMHOOK_post_npc_add_warp) (struct npc_data* retVal___, char *name, short from_mapid, short from_x, short from_y, short xs, short ys, unsigned short to_mapindex, short to_x, short to_y); typedef const char* (*HPMHOOK_pre_npc_parse_warp) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); @@ -5656,8 +5656,8 @@ typedef void (*HPMHOOK_pre_npc_movenpc) (struct npc_data **nd, int16 *x, int16 * typedef void (*HPMHOOK_post_npc_movenpc) (struct npc_data *nd, int16 x, int16 y); typedef void (*HPMHOOK_pre_npc_setdisplayname) (struct npc_data **nd, const char **newname); typedef void (*HPMHOOK_post_npc_setdisplayname) (struct npc_data *nd, const char *newname); -typedef void (*HPMHOOK_pre_npc_setclass) (struct npc_data **nd, short *class_); -typedef void (*HPMHOOK_post_npc_setclass) (struct npc_data *nd, short class_); +typedef void (*HPMHOOK_pre_npc_setclass) (struct npc_data **nd, int *class_); +typedef void (*HPMHOOK_post_npc_setclass) (struct npc_data *nd, int class_); typedef int (*HPMHOOK_pre_npc_do_atcmd_event) (struct map_session_data **sd, const char **command, const char **message, const char **eventname); typedef int (*HPMHOOK_post_npc_do_atcmd_event) (int retVal___, struct map_session_data *sd, const char *command, const char *message, const char *eventname); typedef const char* (*HPMHOOK_pre_npc_parse_function) (const char **w1, const char **w2, const char **w3, const char **w4, const char **start, const char **buffer, const char **filepath, int **retval); @@ -6174,10 +6174,10 @@ typedef void (*HPMHOOK_pre_pc_setstand) (struct map_session_data **sd); typedef void (*HPMHOOK_post_pc_setstand) (struct map_session_data *sd); typedef int (*HPMHOOK_pre_pc_candrop) (struct map_session_data **sd, struct item **item); typedef int (*HPMHOOK_post_pc_candrop) (int retVal___, struct map_session_data *sd, struct item *item); -typedef int (*HPMHOOK_pre_pc_jobid2mapid) (int16 *class); -typedef int (*HPMHOOK_post_pc_jobid2mapid) (int retVal___, int16 class); -typedef int (*HPMHOOK_pre_pc_mapid2jobid) (unsigned short *class_, int *sex); -typedef int (*HPMHOOK_post_pc_mapid2jobid) (int retVal___, unsigned short class_, int sex); +typedef int (*HPMHOOK_pre_pc_jobid2mapid) (int *class); +typedef int (*HPMHOOK_post_pc_jobid2mapid) (int retVal___, int class); +typedef int (*HPMHOOK_pre_pc_mapid2jobid) (unsigned int *class_, int *sex); +typedef int (*HPMHOOK_post_pc_mapid2jobid) (int retVal___, unsigned int class_, int sex); typedef const char* (*HPMHOOK_pre_pc_job_name) (int *class); typedef const char* (*HPMHOOK_post_pc_job_name) (const char* retVal___, int class); typedef void (*HPMHOOK_pre_pc_setinvincibletimer) (struct map_session_data **sd, int *val); @@ -6418,8 +6418,8 @@ typedef int (*HPMHOOK_pre_pet_catch_process1) (struct map_session_data **sd, int typedef int (*HPMHOOK_post_pet_catch_process1) (int retVal___, struct map_session_data *sd, int target_class); typedef int (*HPMHOOK_pre_pet_catch_process2) (struct map_session_data **sd, int *target_id); typedef int (*HPMHOOK_post_pet_catch_process2) (int retVal___, struct map_session_data *sd, int target_id); -typedef bool (*HPMHOOK_pre_pet_get_egg) (int *account_id, short *pet_class, int *pet_id); -typedef bool (*HPMHOOK_post_pet_get_egg) (bool retVal___, int account_id, short pet_class, int pet_id); +typedef bool (*HPMHOOK_pre_pet_get_egg) (int *account_id, int *pet_class, int *pet_id); +typedef bool (*HPMHOOK_post_pet_get_egg) (bool retVal___, int account_id, int pet_class, int pet_id); typedef int (*HPMHOOK_pre_pet_unequipitem) (struct map_session_data **sd, struct pet_data **pd); typedef int (*HPMHOOK_post_pet_unequipitem) (int retVal___, struct map_session_data *sd, struct pet_data *pd); typedef int (*HPMHOOK_pre_pet_food) (struct map_session_data **sd, struct pet_data **pd); @@ -6592,8 +6592,8 @@ typedef void (*HPMHOOK_pre_rodex_add_item) (struct map_session_data **sd, int16 typedef void (*HPMHOOK_post_rodex_add_item) (struct map_session_data *sd, int16 idx, int16 amount); typedef void (*HPMHOOK_pre_rodex_remove_item) (struct map_session_data **sd, int16 *idx, int16 *amount); typedef void (*HPMHOOK_post_rodex_remove_item) (struct map_session_data *sd, int16 idx, int16 amount); -typedef void (*HPMHOOK_pre_rodex_check_player) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, short **class); -typedef void (*HPMHOOK_post_rodex_check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class); +typedef void (*HPMHOOK_pre_rodex_check_player) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, int **class); +typedef void (*HPMHOOK_post_rodex_check_player) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class); typedef int (*HPMHOOK_pre_rodex_send_mail) (struct map_session_data **sd, const char **receiver_name, const char **body, const char **title, int64 *zeny); typedef int (*HPMHOOK_post_rodex_send_mail) (int retVal___, struct map_session_data *sd, const char *receiver_name, const char *body, const char *title, int64 zeny); typedef void (*HPMHOOK_pre_rodex_send_mail_result) (struct map_session_data **ssd, struct map_session_data **rsd, bool *result); diff --git a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc index be4620a1c..0bd61ba15 100644 --- a/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_char.Hooks.inc @@ -798,11 +798,11 @@ int HP_chr_check_char_name(const char *name, const char *esc_name) { } return retVal___; } -int HP_chr_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, uint8 sex) { +int HP_chr_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 starting_job, uint8 sex) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_chr_make_new_char_sql_pre > 0) { - int (*preHookFunc) (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, uint8 *sex); + int (*preHookFunc) (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 *starting_job, uint8 *sex); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_chr_make_new_char_sql_pre[hIndex].func; @@ -817,7 +817,7 @@ int HP_chr_make_new_char_sql(struct char_session_data *sd, const char *name_, in retVal___ = HPMHooks.source.chr.make_new_char_sql(sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style, starting_job, sex); } if (HPMHooks.count.HP_chr_make_new_char_sql_post > 0) { - int (*postHookFunc) (int retVal___, 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, uint8 sex); + int (*postHookFunc) (int retVal___, 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 starting_job, uint8 sex); for (hIndex = 0; hIndex < HPMHooks.count.HP_chr_make_new_char_sql_post; hIndex++) { postHookFunc = HPMHooks.list.HP_chr_make_new_char_sql_post[hIndex].func; retVal___ = postHookFunc(retVal___, sd, name_, str, agi, vit, int_, dex, luk, slot, hair_color, hair_style, starting_job, sex); @@ -7031,11 +7031,11 @@ bool HP_inter_guild_leave(int guild_id, int account_id, int char_id, int flag, c } return retVal___; } -bool HP_inter_guild_update_member_info_short(int guild_id, int account_id, int char_id, int online, int lv, int16 class) { +bool HP_inter_guild_update_member_info_short(int guild_id, int account_id, int char_id, int online, int lv, int class) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_inter_guild_update_member_info_short_pre > 0) { - bool (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); + bool (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_member_info_short_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_guild_update_member_info_short_pre[hIndex].func; @@ -7050,7 +7050,7 @@ bool HP_inter_guild_update_member_info_short(int guild_id, int account_id, int c retVal___ = HPMHooks.source.inter_guild.update_member_info_short(guild_id, account_id, char_id, online, lv, class); } if (HPMHooks.count.HP_inter_guild_update_member_info_short_post > 0) { - bool (*postHookFunc) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class); + bool (*postHookFunc) (bool retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class); for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_guild_update_member_info_short_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_guild_update_member_info_short_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class); @@ -9498,11 +9498,11 @@ int HP_inter_pet_parse_frommap(int fd) { } return retVal___; } -struct s_pet* HP_inter_pet_create(int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name) { +struct s_pet* HP_inter_pet_create(int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name) { int hIndex = 0; struct s_pet* retVal___ = NULL; if (HPMHooks.count.HP_inter_pet_create_pre > 0) { - struct s_pet* (*preHookFunc) (int *account_id, int *char_id, short *pet_class, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name); + struct s_pet* (*preHookFunc) (int *account_id, int *char_id, int *pet_class, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, const char **pet_name); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_create_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_pet_create_pre[hIndex].func; @@ -9517,7 +9517,7 @@ struct s_pet* HP_inter_pet_create(int account_id, int char_id, short pet_class, retVal___ = HPMHooks.source.inter_pet.create(account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); } if (HPMHooks.count.HP_inter_pet_create_post > 0) { - struct s_pet* (*postHookFunc) (struct s_pet* retVal___, int account_id, int char_id, short pet_class, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name); + struct s_pet* (*postHookFunc) (struct s_pet* retVal___, int account_id, int char_id, int pet_class, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, const char *pet_name); for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_pet_create_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_pet_create_post[hIndex].func; retVal___ = postHookFunc(retVal___, account_id, char_id, pet_class, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); @@ -9850,11 +9850,11 @@ bool HP_inter_rodex_hasnew(int char_id, int account_id) { } return retVal___; } -bool HP_inter_rodex_checkname(const char *name, int *target_char_id, short *target_class, int *target_level) { +bool HP_inter_rodex_checkname(const char *name, int *target_char_id, int *target_class, int *target_level) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_inter_rodex_checkname_pre > 0) { - bool (*preHookFunc) (const char **name, int **target_char_id, short **target_class, int **target_level); + bool (*preHookFunc) (const char **name, int **target_char_id, int **target_class, int **target_level); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_checkname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_inter_rodex_checkname_pre[hIndex].func; @@ -9869,7 +9869,7 @@ bool HP_inter_rodex_checkname(const char *name, int *target_char_id, short *targ retVal___ = HPMHooks.source.inter_rodex.checkname(name, target_char_id, target_class, target_level); } if (HPMHooks.count.HP_inter_rodex_checkname_post > 0) { - bool (*postHookFunc) (bool retVal___, const char *name, int *target_char_id, short *target_class, int *target_level); + bool (*postHookFunc) (bool retVal___, const char *name, int *target_char_id, int *target_class, int *target_level); for (hIndex = 0; hIndex < HPMHooks.count.HP_inter_rodex_checkname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_inter_rodex_checkname_post[hIndex].func; retVal___ = postHookFunc(retVal___, name, target_char_id, target_class, target_level); @@ -13822,11 +13822,11 @@ int HP_mapif_parse_GuildLeave(int fd, int guild_id, int account_id, int char_id, } return retVal___; } -int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class) { +int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_id, int char_id, int online, int lv, int class) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_pre > 0) { - int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); + int (*preHookFunc) (int *fd, int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_parse_GuildChangeMemberInfoShort_pre[hIndex].func; @@ -13841,7 +13841,7 @@ int HP_mapif_parse_GuildChangeMemberInfoShort(int fd, int guild_id, int account_ retVal___ = HPMHooks.source.mapif.parse_GuildChangeMemberInfoShort(fd, guild_id, account_id, char_id, online, lv, class); } if (HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post > 0) { - int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int16 class); + int (*postHookFunc) (int retVal___, int fd, int guild_id, int account_id, int char_id, int online, int lv, int class); for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_parse_GuildChangeMemberInfoShort_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_parse_GuildChangeMemberInfoShort_post[hIndex].func; retVal___ = postHookFunc(retVal___, fd, guild_id, account_id, char_id, online, lv, class); @@ -16021,10 +16021,10 @@ void HP_mapif_parse_rodex_checkname(int fd) { } return; } -void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name) { +void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name) { int hIndex = 0; if (HPMHooks.count.HP_mapif_rodex_checkname_pre > 0) { - void (*preHookFunc) (int *fd, int *reqchar_id, int *target_char_id, short *target_class, int *target_level, char **name); + void (*preHookFunc) (int *fd, int *reqchar_id, int *target_char_id, int *target_class, int *target_level, char **name); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_checkname_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_mapif_rodex_checkname_pre[hIndex].func; @@ -16039,7 +16039,7 @@ void HP_mapif_rodex_checkname(int fd, int reqchar_id, int target_char_id, short HPMHooks.source.mapif.rodex_checkname(fd, reqchar_id, target_char_id, target_class, target_level, name); } if (HPMHooks.count.HP_mapif_rodex_checkname_post > 0) { - void (*postHookFunc) (int fd, int reqchar_id, int target_char_id, short target_class, int target_level, char *name); + void (*postHookFunc) (int fd, int reqchar_id, int target_char_id, int target_class, int target_level, char *name); for (hIndex = 0; hIndex < HPMHooks.count.HP_mapif_rodex_checkname_post; hIndex++) { postHookFunc = HPMHooks.list.HP_mapif_rodex_checkname_post[hIndex].func; postHookFunc(fd, reqchar_id, target_char_id, target_class, target_level, name); diff --git a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc index 52ec843d2..8242b9797 100644 --- a/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc +++ b/src/plugins/HPMHooking/HPMHooking_map.Hooks.inc @@ -28048,10 +28048,10 @@ void HP_clif_pRodexCheckName(int fd, struct map_session_data *sd) { } return; } -void HP_clif_rodex_checkname_result(struct map_session_data *sd, int char_id, short class_, int base_level, const char *name) { +void HP_clif_rodex_checkname_result(struct map_session_data *sd, int char_id, int class_, int base_level, const char *name) { int hIndex = 0; if (HPMHooks.count.HP_clif_rodex_checkname_result_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, int *char_id, short *class_, int *base_level, const char **name); + void (*preHookFunc) (struct map_session_data **sd, int *char_id, int *class_, int *base_level, const char **name); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_checkname_result_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_clif_rodex_checkname_result_pre[hIndex].func; @@ -28066,7 +28066,7 @@ void HP_clif_rodex_checkname_result(struct map_session_data *sd, int char_id, sh HPMHooks.source.clif.rodex_checkname_result(sd, char_id, class_, base_level, name); } if (HPMHooks.count.HP_clif_rodex_checkname_result_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, int char_id, short class_, int base_level, const char *name); + void (*postHookFunc) (struct map_session_data *sd, int char_id, int class_, int base_level, const char *name); for (hIndex = 0; hIndex < HPMHooks.count.HP_clif_rodex_checkname_result_post; hIndex++) { postHookFunc = HPMHooks.list.HP_clif_rodex_checkname_result_post[hIndex].func; postHookFunc(sd, char_id, class_, base_level, name); @@ -32638,11 +32638,11 @@ int HP_guild_send_memberinfoshort(struct map_session_data *sd, int online) { } return retVal___; } -int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login) { +int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_guild_recv_memberinfoshort_pre > 0) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class, uint32 *last_login); + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class, uint32 *last_login); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_pre[hIndex].func; @@ -32657,7 +32657,7 @@ int HP_guild_recv_memberinfoshort(int guild_id, int account_id, int char_id, int retVal___ = HPMHooks.source.guild.recv_memberinfoshort(guild_id, account_id, char_id, online, lv, class, last_login); } if (HPMHooks.count.HP_guild_recv_memberinfoshort_post > 0) { - int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class, uint32 last_login); + int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class, uint32 last_login); for (hIndex = 0; hIndex < HPMHooks.count.HP_guild_recv_memberinfoshort_post; hIndex++) { postHookFunc = HPMHooks.list.HP_guild_recv_memberinfoshort_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class, last_login); @@ -34785,11 +34785,11 @@ bool HP_homun_levelup(struct homun_data *hd) { } return retVal___; } -int HP_homun_change_class(struct homun_data *hd, short class_) { +int HP_homun_change_class(struct homun_data *hd, int class_) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_homun_change_class_pre > 0) { - int (*preHookFunc) (struct homun_data **hd, short *class_); + int (*preHookFunc) (struct homun_data **hd, int *class_); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_class_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_homun_change_class_pre[hIndex].func; @@ -34804,7 +34804,7 @@ int HP_homun_change_class(struct homun_data *hd, short class_) { retVal___ = HPMHooks.source.homun.change_class(hd, class_); } if (HPMHooks.count.HP_homun_change_class_post > 0) { - int (*postHookFunc) (int retVal___, struct homun_data *hd, short class_); + int (*postHookFunc) (int retVal___, struct homun_data *hd, int class_); for (hIndex = 0; hIndex < HPMHooks.count.HP_homun_change_class_post; hIndex++) { postHookFunc = HPMHooks.list.HP_homun_change_class_post[hIndex].func; retVal___ = postHookFunc(retVal___, hd, class_); @@ -36182,11 +36182,11 @@ int HP_intif_parse(int fd) { } return retVal___; } -int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name) { +int HP_intif_create_pet(int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_intif_create_pet_pre > 0) { - int (*preHookFunc) (int *account_id, int *char_id, short *pet_type, short *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name); + int (*preHookFunc) (int *account_id, int *char_id, int *pet_type, int *pet_lv, int *pet_egg_id, int *pet_equip, short *intimate, short *hungry, char *rename_flag, char *incubate, char **pet_name); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_intif_create_pet_pre[hIndex].func; @@ -36201,7 +36201,7 @@ int HP_intif_create_pet(int account_id, int char_id, short pet_type, short pet_l retVal___ = HPMHooks.source.intif.create_pet(account_id, char_id, pet_type, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); } if (HPMHooks.count.HP_intif_create_pet_post > 0) { - int (*postHookFunc) (int retVal___, int account_id, int char_id, short pet_type, short pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name); + int (*postHookFunc) (int retVal___, int account_id, int char_id, int pet_type, int pet_lv, int pet_egg_id, int pet_equip, short intimate, short hungry, char rename_flag, char incubate, char *pet_name); for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_create_pet_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_create_pet_post[hIndex].func; retVal___ = postHookFunc(retVal___, account_id, char_id, pet_type, pet_lv, pet_egg_id, pet_equip, intimate, hungry, rename_flag, incubate, pet_name); @@ -36855,11 +36855,11 @@ int HP_intif_guild_leave(int guild_id, int account_id, int char_id, int flag, co } return retVal___; } -int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int16 class) { +int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, int online, int lv, int class) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_intif_guild_memberinfoshort_pre > 0) { - int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int16 *class); + int (*preHookFunc) (int *guild_id, int *account_id, int *char_id, int *online, int *lv, int *class); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_intif_guild_memberinfoshort_pre[hIndex].func; @@ -36874,7 +36874,7 @@ int HP_intif_guild_memberinfoshort(int guild_id, int account_id, int char_id, in retVal___ = HPMHooks.source.intif.guild_memberinfoshort(guild_id, account_id, char_id, online, lv, class); } if (HPMHooks.count.HP_intif_guild_memberinfoshort_post > 0) { - int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int16 class); + int (*postHookFunc) (int retVal___, int guild_id, int account_id, int char_id, int online, int lv, int class); for (hIndex = 0; hIndex < HPMHooks.count.HP_intif_guild_memberinfoshort_post; hIndex++) { postHookFunc = HPMHooks.list.HP_intif_guild_memberinfoshort_post[hIndex].func; retVal___ = postHookFunc(retVal___, guild_id, account_id, char_id, online, lv, class); @@ -55605,11 +55605,11 @@ bool HP_npc_viewisid(const char *viewid) { } return retVal___; } -struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_) { +struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_) { int hIndex = 0; struct npc_data* retVal___ = NULL; if (HPMHooks.count.HP_npc_create_npc_pre > 0) { - struct npc_data* (*preHookFunc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int16 *class_); + struct npc_data* (*preHookFunc) (enum npc_subtype *subtype, int *m, int *x, int *y, uint8 *dir, int *class_); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_create_npc_pre[hIndex].func; @@ -55624,7 +55624,7 @@ struct npc_data* HP_npc_create_npc(enum npc_subtype subtype, int m, int x, int y retVal___ = HPMHooks.source.npc.create_npc(subtype, m, x, y, dir, class_); } if (HPMHooks.count.HP_npc_create_npc_post > 0) { - struct npc_data* (*postHookFunc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int16 class_); + struct npc_data* (*postHookFunc) (struct npc_data* retVal___, enum npc_subtype subtype, int m, int x, int y, uint8 dir, int class_); for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_create_npc_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_create_npc_post[hIndex].func; retVal___ = postHookFunc(retVal___, subtype, m, x, y, dir, class_); @@ -56145,10 +56145,10 @@ void HP_npc_setdisplayname(struct npc_data *nd, const char *newname) { } return; } -void HP_npc_setclass(struct npc_data *nd, short class_) { +void HP_npc_setclass(struct npc_data *nd, int class_) { int hIndex = 0; if (HPMHooks.count.HP_npc_setclass_pre > 0) { - void (*preHookFunc) (struct npc_data **nd, short *class_); + void (*preHookFunc) (struct npc_data **nd, int *class_); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_npc_setclass_pre[hIndex].func; @@ -56163,7 +56163,7 @@ void HP_npc_setclass(struct npc_data *nd, short class_) { HPMHooks.source.npc.setclass(nd, class_); } if (HPMHooks.count.HP_npc_setclass_post > 0) { - void (*postHookFunc) (struct npc_data *nd, short class_); + void (*postHookFunc) (struct npc_data *nd, int class_); for (hIndex = 0; hIndex < HPMHooks.count.HP_npc_setclass_post; hIndex++) { postHookFunc = HPMHooks.list.HP_npc_setclass_post[hIndex].func; postHookFunc(nd, class_); @@ -62955,11 +62955,11 @@ int HP_pc_candrop(struct map_session_data *sd, struct item *item) { } return retVal___; } -int HP_pc_jobid2mapid(int16 class) { +int HP_pc_jobid2mapid(int class) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_pc_jobid2mapid_pre > 0) { - int (*preHookFunc) (int16 *class); + int (*preHookFunc) (int *class); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_jobid2mapid_pre[hIndex].func; @@ -62974,7 +62974,7 @@ int HP_pc_jobid2mapid(int16 class) { retVal___ = HPMHooks.source.pc.jobid2mapid(class); } if (HPMHooks.count.HP_pc_jobid2mapid_post > 0) { - int (*postHookFunc) (int retVal___, int16 class); + int (*postHookFunc) (int retVal___, int class); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_jobid2mapid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_jobid2mapid_post[hIndex].func; retVal___ = postHookFunc(retVal___, class); @@ -62982,11 +62982,11 @@ int HP_pc_jobid2mapid(int16 class) { } return retVal___; } -int HP_pc_mapid2jobid(unsigned short class_, int sex) { +int HP_pc_mapid2jobid(unsigned int class_, int sex) { int hIndex = 0; int retVal___ = 0; if (HPMHooks.count.HP_pc_mapid2jobid_pre > 0) { - int (*preHookFunc) (unsigned short *class_, int *sex); + int (*preHookFunc) (unsigned int *class_, int *sex); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pc_mapid2jobid_pre[hIndex].func; @@ -63001,7 +63001,7 @@ int HP_pc_mapid2jobid(unsigned short class_, int sex) { retVal___ = HPMHooks.source.pc.mapid2jobid(class_, sex); } if (HPMHooks.count.HP_pc_mapid2jobid_post > 0) { - int (*postHookFunc) (int retVal___, unsigned short class_, int sex); + int (*postHookFunc) (int retVal___, unsigned int class_, int sex); for (hIndex = 0; hIndex < HPMHooks.count.HP_pc_mapid2jobid_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pc_mapid2jobid_post[hIndex].func; retVal___ = postHookFunc(retVal___, class_, sex); @@ -66193,11 +66193,11 @@ int HP_pet_catch_process2(struct map_session_data *sd, int target_id) { } return retVal___; } -bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) { +bool HP_pet_get_egg(int account_id, int pet_class, int pet_id) { int hIndex = 0; bool retVal___ = false; if (HPMHooks.count.HP_pet_get_egg_pre > 0) { - bool (*preHookFunc) (int *account_id, short *pet_class, int *pet_id); + bool (*preHookFunc) (int *account_id, int *pet_class, int *pet_id); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_pet_get_egg_pre[hIndex].func; @@ -66212,7 +66212,7 @@ bool HP_pet_get_egg(int account_id, short pet_class, int pet_id) { retVal___ = HPMHooks.source.pet.get_egg(account_id, pet_class, pet_id); } if (HPMHooks.count.HP_pet_get_egg_post > 0) { - bool (*postHookFunc) (bool retVal___, int account_id, short pet_class, int pet_id); + bool (*postHookFunc) (bool retVal___, int account_id, int pet_class, int pet_id); for (hIndex = 0; hIndex < HPMHooks.count.HP_pet_get_egg_post; hIndex++) { postHookFunc = HPMHooks.list.HP_pet_get_egg_post[hIndex].func; retVal___ = postHookFunc(retVal___, account_id, pet_class, pet_id); @@ -68003,10 +68003,10 @@ void HP_rodex_remove_item(struct map_session_data *sd, int16 idx, int16 amount) } return; } -void HP_rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class) { +void HP_rodex_check_player(struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class) { int hIndex = 0; if (HPMHooks.count.HP_rodex_check_player_pre > 0) { - void (*preHookFunc) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, short **class); + void (*preHookFunc) (struct map_session_data **sd, const char **name, int **base_level, int **char_id, int **class); *HPMforce_return = false; for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_check_player_pre; hIndex++) { preHookFunc = HPMHooks.list.HP_rodex_check_player_pre[hIndex].func; @@ -68021,7 +68021,7 @@ void HP_rodex_check_player(struct map_session_data *sd, const char *name, int *b HPMHooks.source.rodex.check_player(sd, name, base_level, char_id, class); } if (HPMHooks.count.HP_rodex_check_player_post > 0) { - void (*postHookFunc) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, short *class); + void (*postHookFunc) (struct map_session_data *sd, const char *name, int *base_level, int *char_id, int *class); for (hIndex = 0; hIndex < HPMHooks.count.HP_rodex_check_player_post; hIndex++) { postHookFunc = HPMHooks.list.HP_rodex_check_player_post[hIndex].func; postHookFunc(sd, name, base_level, char_id, class); |