diff options
Diffstat (limited to 'src/map/pet.c')
-rw-r--r-- | src/map/pet.c | 17 |
1 files changed, 9 insertions, 8 deletions
diff --git a/src/map/pet.c b/src/map/pet.c index 18a5ba915..8726b611b 100644 --- a/src/map/pet.c +++ b/src/map/pet.c @@ -964,15 +964,16 @@ int pet_ai_hard(int tid, int64 tick, int id, intptr_t data) { return 0; } -int pet_ai_sub_hard_lootsearch(struct block_list *bl,va_list ap) +int pet_ai_sub_hard_lootsearch(struct block_list *bl, va_list ap) { - struct pet_data* pd; - struct flooritem_data *fitem = (struct flooritem_data *)bl; - struct block_list **target; - int sd_charid =0; - - pd=va_arg(ap,struct pet_data *); - target=va_arg(ap,struct block_list**); + struct pet_data *pd = va_arg(ap,struct pet_data *); + struct block_list **target = va_arg(ap,struct block_list**); + struct flooritem_data *fitem = NULL; + int sd_charid = 0; + + nullpo_ret(bl); + Assert_ret(bl->type == BL_ITEM); + fitem = BL_UCAST(BL_ITEM, bl); sd_charid = fitem->first_get_charid; |