diff options
author | Asheraf <acheraf1998@gmail.com> | 2018-04-04 21:02:47 +0100 |
---|---|---|
committer | Asheraf <acheraf1998@gmail.com> | 2018-04-04 21:05:58 +0100 |
commit | 4faf1f94fc7d38d0004b9694341c1c63c5785894 (patch) | |
tree | a54752de55f3a803a1f3d66fd9bf7d1b19f8f17e /src/map/clif.c | |
parent | 9ecc1bde4ea83f14be6b72f68a134dca4cb34478 (diff) | |
download | hercules-4faf1f94fc7d38d0004b9694341c1c63c5785894.tar.gz hercules-4faf1f94fc7d38d0004b9694341c1c63c5785894.tar.bz2 hercules-4faf1f94fc7d38d0004b9694341c1c63c5785894.tar.xz hercules-4faf1f94fc7d38d0004b9694341c1c63c5785894.zip |
Add support for packet ZC_MSG_COLOR
Diffstat (limited to 'src/map/clif.c')
-rw-r--r-- | src/map/clif.c | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index dcb1919fb..942600a26 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -9262,6 +9262,26 @@ void clif_msgtable_str(struct map_session_data *sd, uint16 msg_id, const char *v } /** +* Displays a format string from msgstringtable.txt with a color (ZC_MSG_COLOR). +* +* @param sd The target character. +* @param msg_id msgstringtable message index, 0-based (@see enum clif_messages) +* @param color The color to use +*/ +void clif_msgtable_color(struct map_session_data *sd, uint16 msg_id, uint32 color) +{ + struct PACKET_ZC_MSG_COLOR p; + + nullpo_retv(sd); + + p.PacketType = 0x9cd; + p.MessageId = msg_id; + p.MessageColor = RGB2BGR(color); + + clif->send(&p, sizeof(p), &sd->bl, SELF); +} + +/** * Validates and processes a global/guild/party message packet. * * @param[in] sd The source character. @@ -20954,6 +20974,7 @@ void clif_defaults(void) { clif->msgtable = clif_msgtable; clif->msgtable_num = clif_msgtable_num; clif->msgtable_str = clif_msgtable_str; + clif->msgtable_color = clif_msgtable_color; clif->message = clif_displaymessage; clif->messageln = clif_displaymessage2; clif->messages = clif_displaymessage_sprintf; |