diff options
author | Haru <haru@dotalux.com> | 2015-12-28 00:16:39 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-01-06 15:14:50 +0100 |
commit | f878d5e2156dc88fb73d27473acfe01d72427bbd (patch) | |
tree | 7bcb5cd894ffd776545f4fe480276476c7688252 /src/map/quest.c | |
parent | b3c722ecf777aeeea6317755a6adfc0216b7a2bd (diff) | |
download | hercules-f878d5e2156dc88fb73d27473acfe01d72427bbd.tar.gz hercules-f878d5e2156dc88fb73d27473acfe01d72427bbd.tar.bz2 hercules-f878d5e2156dc88fb73d27473acfe01d72427bbd.tar.xz hercules-f878d5e2156dc88fb73d27473acfe01d72427bbd.zip |
Replaced some explicit casts with BL_UCAST/BL_UCCAST
- Replaced casts in foreach callbacks.
- Added assertions and nullpo checks where applicable.
Signed-off-by: Haru <haru@dotalux.com>
Diffstat (limited to 'src/map/quest.c')
-rw-r--r-- | src/map/quest.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/map/quest.c b/src/map/quest.c index bec358187..0dbea56f8 100644 --- a/src/map/quest.c +++ b/src/map/quest.c @@ -252,15 +252,15 @@ int quest_delete(struct map_session_data *sd, int quest_id) * int Party ID * int Mob ID */ -int quest_update_objective_sub(struct block_list *bl, va_list ap) { - struct map_session_data *sd; - int mob_id, party_id; +int quest_update_objective_sub(struct block_list *bl, va_list ap) +{ + struct map_session_data *sd = NULL; + int party_id = va_arg(ap, int); + int mob_id = va_arg(ap, int); nullpo_ret(bl); - nullpo_ret(sd = (struct map_session_data *)bl); - - party_id = va_arg(ap,int); - mob_id = va_arg(ap,int); + Assert_ret(bl->type == BL_PC); + sd = BL_UCAST(BL_PC, bl); if( !sd->avail_quests ) return 0; |