diff options
-rw-r--r-- | src/map/mob.c | 6 | ||||
-rw-r--r-- | src/map/mob.h | 13 |
2 files changed, 12 insertions, 7 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index a72e3bc42..8dac1ea43 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2667,11 +2667,7 @@ static int mob_dead(struct mob_data *md, struct block_list *src, int type) if (!(map->list[m].flag.nomvploot || type&1)) { /* pose them randomly in the list -- so on 100% drop servers it wont always drop the same item */ - struct { - int nameid; - int p; - struct optdrop_group *options; - } mdrop[MAX_MVP_DROP] = { { 0 } }; + struct mob_drop mdrop[MAX_MVP_DROP] = { { 0 } }; for (i = 0; i < MAX_MVP_DROP; i++) { int rpos; diff --git a/src/map/mob.h b/src/map/mob.h index f7dc82f3b..b63efd272 100644 --- a/src/map/mob.h +++ b/src/map/mob.h @@ -182,6 +182,15 @@ struct optdrop_group { struct optdrop_group_optslot optslot[MAX_ITEM_OPTIONS]; //< Details of the options that will go in each slot }; +/** + * Stores data related to a monster drop (normal or mvp drop) + */ +struct mob_drop { + int nameid; //< Item ID + int p; //< Drop chance + struct optdrop_group *options; //< Option Drop Group associated with this drop (NULL if none) +}; + struct mob_db { int mob_id; char sprite[NAME_LENGTH],name[NAME_LENGTH],jname[NAME_LENGTH]; @@ -190,8 +199,8 @@ struct mob_db { short range2,range3; short race2; // celest unsigned short lv; - struct { int nameid, p; struct optdrop_group *options; } dropitem[MAX_MOB_DROP]; - struct { int nameid,p; struct optdrop_group *options; } mvpitem[MAX_MVP_DROP]; + struct mob_drop dropitem[MAX_MOB_DROP]; + struct mob_drop mvpitem[MAX_MVP_DROP]; struct status_data status; struct view_data vd; unsigned int option; |