diff options
Diffstat (limited to 'src/map/pc.h')
-rw-r--r-- | src/map/pc.h | 32 |
1 files changed, 20 insertions, 12 deletions
diff --git a/src/map/pc.h b/src/map/pc.h index c94ec6099..50cb1b68e 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -308,7 +308,10 @@ struct map_session_data { short nameid; int64 tick; } item_delay[MAX_ITEMDELAYS]; // [Paradox924X] - short weapontype1,weapontype2; + bool has_shield; ///< Whether the character is wearing a shield. + 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] struct weapon_data right_weapon, left_weapon; @@ -685,8 +688,13 @@ END_ZEROED_BLOCK; #define pc_stop_attack(sd) (unit->stop_attack(&(sd)->bl)) //Weapon check considering dual wielding. -#define pc_check_weapontype(sd, type) ((type)&((sd)->status.weapon < MAX_SINGLE_WEAPON_TYPE? \ - 1<<(sd)->status.weapon:(1<<(sd)->weapontype1)|(1<<(sd)->weapontype2)|(1<<(sd)->status.weapon))) +#define pc_check_weapontype(sd, type) ( \ + (type) & ( \ + (sd)->weapontype < MAX_SINGLE_WEAPON_TYPE ? \ + 1 << (sd)->weapontype : \ + (1 << (sd)->weapontype1) | (1 << (sd)->weapontype2) \ + ) \ + ) // clientside display macros (values to the left/right of the "+") #ifdef RENEWAL @@ -821,7 +829,7 @@ struct pc_interface { /* */ BEGIN_ZEROED_BLOCK; /* Everything within this block will be memset to 0 when status_defaults() is executed */ - unsigned int exp_table[CLASS_COUNT][2][MAX_LEVEL]; + uint64 exp_table[CLASS_COUNT][2][MAX_LEVEL]; int max_level[CLASS_COUNT][2]; unsigned int statp[MAX_LEVEL+1]; unsigned int level_penalty[3][RC_MAX][MAX_LEVEL*2+1]; @@ -941,11 +949,11 @@ END_ZEROED_BLOCK; /* End */ int (*maxjoblv) (const struct map_session_data *sd); int (*checkbaselevelup) (struct map_session_data *sd); int (*checkjoblevelup) (struct map_session_data *sd); - bool (*gainexp) (struct map_session_data *sd, struct block_list *src, unsigned int base_exp, unsigned int job_exp, bool is_quest); - unsigned int (*nextbaseexp) (const struct map_session_data *sd); - unsigned int (*thisbaseexp) (const struct map_session_data *sd); - unsigned int (*nextjobexp) (const struct map_session_data *sd); - unsigned int (*thisjobexp) (const struct map_session_data *sd); + bool (*gainexp) (struct map_session_data *sd, struct block_list *src, uint64 base_exp, uint64 job_exp, bool is_quest); + uint64 (*nextbaseexp) (const struct map_session_data *sd); + uint64 (*thisbaseexp) (const struct map_session_data *sd); + uint64 (*nextjobexp) (const struct map_session_data *sd); + uint64 (*thisjobexp) (const struct map_session_data *sd); int (*gets_status_point) (int level); int (*need_status_point) (struct map_session_data *sd,int type,int val); int (*maxparameterincrease) (struct map_session_data* sd, int type); @@ -986,8 +994,8 @@ END_ZEROED_BLOCK; /* End */ int (*changelook) (struct map_session_data *sd,int type,int val); int (*equiplookall) (struct map_session_data *sd); - int (*readparam) (const struct map_session_data *sd, int type); - int (*setparam) (struct map_session_data *sd,int type,int val); + int64 (*readparam) (const struct map_session_data *sd, int type); + int (*setparam) (struct map_session_data *sd, int type, int64 val); int (*readreg) (struct map_session_data *sd, int64 reg); void (*setreg) (struct map_session_data *sd, int64 reg,int val); char * (*readregstr) (struct map_session_data *sd, int64 reg); @@ -1071,7 +1079,7 @@ END_ZEROED_BLOCK; /* End */ int (*bonus_addeff) (struct s_addeffect* effect, int max, enum sc_type id, int16 rate, int16 arrow_rate, uint8 flag, uint16 duration); int (*bonus_addeff_onskill) (struct s_addeffectonskill* effect, int max, enum sc_type id, short rate, short skill_id, unsigned char target); int (*bonus_item_drop) (struct s_add_drop *drop, const short max, short id, short group, int race, int rate); - void (*calcexp) (struct map_session_data *sd, unsigned int *base_exp, unsigned int *job_exp, struct block_list *src); + void (*calcexp) (struct map_session_data *sd, uint64 *base_exp, uint64 *job_exp, struct block_list *src); int (*respawn_timer) (int tid, int64 tick, int id, intptr_t data); int (*jobchange_killclone) (struct block_list *bl, va_list ap); int (*getstat) (struct map_session_data* sd, int type); |