summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorAndrei Karas <akaras@inbox.ru>2019-06-17 18:18:39 +0300
committerAndrei Karas <akaras@inbox.ru>2019-06-26 06:47:09 +0300
commit784c976e355ba1667623dd6128e88bfe5887d764 (patch)
treea4e9c51a4586dd0144826baddd7ce5ba9ee367d2 /src
parent14214f52cbc64f38853ad2e7c48538eabf6e070e (diff)
downloadhercules-784c976e355ba1667623dd6128e88bfe5887d764.tar.gz
hercules-784c976e355ba1667623dd6128e88bfe5887d764.tar.bz2
hercules-784c976e355ba1667623dd6128e88bfe5887d764.tar.xz
hercules-784c976e355ba1667623dd6128e88bfe5887d764.zip
Fix custom mob names in packet ZC_ACK_REQNAME_TITLE (Fixes #2495)
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/map/clif.c b/src/map/clif.c
index 6e4969865..7c9a68b2b 100644
--- a/src/map/clif.c
+++ b/src/map/clif.c
@@ -9480,7 +9480,8 @@ static void clif_mobname_normal_ack(int fd, struct block_list *bl)
struct PACKET_ZC_ACK_REQNAME_TITLE packet = { 0 };
packet.packet_id = HEADER_ZC_ACK_REQNAME_TITLE;
packet.gid = bl->id;
- memcpy(packet.name, BL_UCCAST(BL_MOB, bl)->db->name, NAME_LENGTH);
+ const struct mob_data *md = BL_UCCAST(BL_MOB, bl);
+ memcpy(packet.name, md->name, NAME_LENGTH);
#if PACKETVER_MAIN_NUM >= 20180207 || PACKETVER_RE_NUM >= 20171129 || PACKETVER_ZERO_NUM >= 20171130
struct unit_data *ud = unit->bl2ud(bl);
if (ud != NULL) {