diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/map/clif.c | 23 | ||||
-rw-r--r-- | src/map/clif.h | 1 | ||||
-rw-r--r-- | src/map/itemdb.c | 2 | ||||
-rw-r--r-- | src/map/script.c | 2 |
4 files changed, 26 insertions, 2 deletions
diff --git a/src/map/clif.c b/src/map/clif.c index 81dbc28ec..060509807 100644 --- a/src/map/clif.c +++ b/src/map/clif.c @@ -17541,6 +17541,28 @@ void clif_partytickack(struct map_session_data* sd, bool flag) { WFIFOSET(sd->fd, packet_len(0x2c9)); } +void clif_ShowScript(struct block_list* bl, const char* message) { + char buf[256]; + int len; + nullpo_retv(bl); + + if(!message) + return; + + len = strlen(message)+1; + + if( len > sizeof(buf)-8 ) { + ShowWarning("clif_ShowScript: Truncating too long message '%s' (len=%d).\n", message, len); + len = sizeof(buf)-8; + } + + WBUFW(buf,0)=0x8b3; + WBUFW(buf,2)=len+8; + WBUFL(buf,4)=bl->id; + safestrncpy((char *) WBUFP(buf,8),message,len); + clif->send((unsigned char *) buf,WBUFW(buf,2),bl,ALL_CLIENT); +} + void clif_status_change_end(struct block_list *bl, int tid, enum send_target target, int type) { struct packet_status_change_end p; @@ -18395,6 +18417,7 @@ void clif_defaults(void) { clif->wisexin = clif_wisexin; clif->wisall = clif_wisall; clif->PMIgnoreList = clif_PMIgnoreList; + clif->ShowScript = clif_ShowScript; /* trade handling */ clif->traderequest = clif_traderequest; clif->tradestart = clif_tradestart; diff --git a/src/map/clif.h b/src/map/clif.h index 2baca2aaf..6d0fc0fc1 100644 --- a/src/map/clif.h +++ b/src/map/clif.h @@ -759,6 +759,7 @@ struct clif_interface { void (*wisexin) (struct map_session_data *sd,int type,int flag); void (*wisall) (struct map_session_data *sd,int type,int flag); void (*PMIgnoreList) (struct map_session_data* sd); + void (*ShowScript) (struct block_list* bl, const char* message); /* trade handling */ void (*traderequest) (struct map_session_data* sd, const char* name); void (*tradestart) (struct map_session_data* sd, uint8 type); diff --git a/src/map/itemdb.c b/src/map/itemdb.c index 09eec557d..5c698b3c9 100644 --- a/src/map/itemdb.c +++ b/src/map/itemdb.c @@ -1946,7 +1946,7 @@ void itemdb_read(void) { sv->readdb(map->db_path, "item_avail.txt", ',', 2, 2, -1, itemdb->read_itemavail); sv->readdb(map->db_path, DBPATH"item_trade.txt", ',', 3, 3, -1, itemdb->read_itemtrade); - sv->readdb(map->db_path, "item_delay.txt", ',', 2, 2, -1, itemdb->read_itemdelay); + sv->readdb(map->db_path, DBPATH"item_delay.txt", ',', 2, 2, -1, itemdb->read_itemdelay); sv->readdb(map->db_path, "item_stack.txt", ',', 3, 3, -1, itemdb->read_stack); sv->readdb(map->db_path, DBPATH"item_buyingstore.txt", ',', 1, 1, -1, itemdb->read_buyingstore); sv->readdb(map->db_path, "item_nouse.txt", ',', 3, 3, -1, itemdb->read_nouse); diff --git a/src/map/script.c b/src/map/script.c index 612ca8688..4f7823e95 100644 --- a/src/map/script.c +++ b/src/map/script.c @@ -17005,7 +17005,7 @@ BUILDIN(montransform) { } sprintf(msg, msg_txt(1485), monster->name); // Traaaansformation-!! %s form!! - clif->disp_overhead(&sd->bl, msg); + clif->ShowScript(&sd->bl, msg); status_change_end(bl, SC_MONSTER_TRANSFORM, INVALID_TIMER); // Clear previous sc_start2(bl, SC_MONSTER_TRANSFORM, 100, mob_id, type, tick); sc_start4(bl, type, 100, val1, val2, val3, val4, tick); |