diff options
Diffstat (limited to 'src/map')
-rw-r--r-- | src/map/atcommand.c | 2 | ||||
-rw-r--r-- | src/map/battle.c | 4 | ||||
-rw-r--r-- | src/map/clif.c | 6 | ||||
-rw-r--r-- | src/map/clif.h | 2 | ||||
-rw-r--r-- | src/map/guild.c | 2 | ||||
-rw-r--r-- | src/map/guild.h | 2 | ||||
-rw-r--r-- | src/map/homunculus.c | 2 | ||||
-rw-r--r-- | src/map/homunculus.h | 2 | ||||
-rw-r--r-- | src/map/intif.c | 4 | ||||
-rw-r--r-- | src/map/intif.h | 4 | ||||
-rw-r--r-- | src/map/map.h | 2 | ||||
-rw-r--r-- | src/map/mob.h | 2 | ||||
-rw-r--r-- | src/map/npc.c | 6 | ||||
-rw-r--r-- | src/map/npc.h | 6 | ||||
-rw-r--r-- | src/map/pc.c | 6 | ||||
-rw-r--r-- | src/map/pc.h | 4 | ||||
-rw-r--r-- | src/map/pet.c | 6 | ||||
-rw-r--r-- | src/map/pet.h | 4 | ||||
-rw-r--r-- | src/map/rodex.c | 2 | ||||
-rw-r--r-- | src/map/rodex.h | 2 | ||||
-rw-r--r-- | src/map/script.c | 2 |
21 files changed, 36 insertions, 36 deletions
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..a526e5ec0 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()) @@ -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; 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..d96733f90 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 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 a2971b4f8..b2069d4df 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -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); } |