From 63b62712347f5995a2ff01e67b0b4f86838857d5 Mon Sep 17 00:00:00 2001 From: skyleo Date: Mon, 19 Nov 2018 10:20:06 +0100 Subject: Change short group to bool is_group in s_add_drop current checks for empty entries assumed that if id and group is 0 that it is empty, while in fact ITMCHAIN_ORE has group 0 as value, for easier checks and more aesthetic code short group has been replaced, id's are now always written into short id and bool is_group decides if it's an item or a group. --- src/map/pc.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/map/pc.h') diff --git a/src/map/pc.h b/src/map/pc.h index 8302279b1..e20c3e58a 100644 --- a/src/map/pc.h +++ b/src/map/pc.h @@ -151,8 +151,8 @@ struct s_addeffectonskill { unsigned char target; }; struct s_add_drop { + bool is_group; int id; - short group; int race, rate; }; struct s_autobonus { @@ -1124,7 +1124,7 @@ END_ZEROED_BLOCK; /* End */ int (*bonus_autospell_onskill) (struct s_autospell *spell, int max, short src_skill, short id, short lv, short rate, int card_id); 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); + int (*bonus_item_drop) (struct s_add_drop *drop, const short max, int id, bool is_group, int race, int rate); 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); -- cgit v1.2.3-60-g2f50