summaryrefslogtreecommitdiff
path: root/src/map
diff options
context:
space:
mode:
Diffstat (limited to 'src/map')
-rw-r--r--src/map/mob.c4
-rw-r--r--src/map/script.c6
2 files changed, 8 insertions, 2 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]
diff --git a/src/map/script.c b/src/map/script.c
index 0fc4a5a65..007c6e0e1 100644
--- a/src/map/script.c
+++ b/src/map/script.c
@@ -16845,8 +16845,12 @@ BUILDIN(unittalk) {
bl = map->id2bl(unit_id);
if( bl != NULL ) {
struct StringBuf sbuf;
+ char blname[NAME_LENGTH];
StrBuf->Init(&sbuf);
- StrBuf->Printf(&sbuf, "%s : %s", clif->get_bl_name(bl), message);
+ safestrncpy(blname, clif->get_bl_name(bl), sizeof(blname));
+ if(bl->type == BL_NPC)
+ strtok(blname, "#");
+ StrBuf->Printf(&sbuf, "%s : %s", blname, message);
clif->disp_overhead(bl, StrBuf->Value(&sbuf));
StrBuf->Destroy(&sbuf);
}