diff options
author | Haru <haru@dotalux.com> | 2016-03-25 19:31:06 +0100 |
---|---|---|
committer | Haru <haru@dotalux.com> | 2016-03-25 19:31:06 +0100 |
commit | 11610a6011a9b543160e8d926b0f065d45fd9919 (patch) | |
tree | f2607b562fd1d4f1b376c1463b7e7379bccb5af5 | |
parent | 4035a4eddbb1ad2240453820f270bbaf5f074308 (diff) | |
download | hercules-11610a6011a9b543160e8d926b0f065d45fd9919.tar.gz hercules-11610a6011a9b543160e8d926b0f065d45fd9919.tar.bz2 hercules-11610a6011a9b543160e8d926b0f065d45fd9919.tar.xz hercules-11610a6011a9b543160e8d926b0f065d45fd9919.zip |
Fixed a call to clif->item_drop_announce with a NULL sd.
Closes #1220
Signed-off-by: Haru <haru@dotalux.com>
-rw-r--r-- | src/map/mob.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/src/map/mob.c b/src/map/mob.c index 8d38fead7..53ad87912 100644 --- a/src/map/mob.c +++ b/src/map/mob.c @@ -2402,7 +2402,9 @@ int mob_dead(struct mob_data *md, struct block_list *src, int type) { * so while we discuss, for a small period of time, the list is hardcoded (yes officially only those 2 use it, * thus why we're unsure on how to best place the setting) */ /* temp, will not be hardcoded for long thudu. */ - if (it->nameid == ITEMID_GOLD_KEY77 || it->nameid == ITEMID_SILVER_KEY77) /* for when not hardcoded: add a check on mvp bonus drop as well */ + // TODO: This should be a field in the item db. + if (mvp_sd != NULL + && (it->nameid == ITEMID_GOLD_KEY77 || it->nameid == ITEMID_SILVER_KEY77)) /* for when not hardcoded: add a check on mvp bonus drop as well */ clif->item_drop_announce(mvp_sd, it->nameid, md->name); // Announce first, or else ditem will be freed. [Lance] |