summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authormalufett <malufett.eat.my.binaries@gmail.com>2013-10-16 21:01:07 +0800
committermalufett <malufett.eat.my.binaries@gmail.com>2013-10-16 21:01:07 +0800
commitf943c061b5c29bf906830c8ff9e9114f00a88951 (patch)
tree3fb19a8e76d132e7d811da1b13b4b09a85f48f7d /src
parentd31790a2e2305fac4acb48a42a7ab2ef69830428 (diff)
downloadhercules-f943c061b5c29bf906830c8ff9e9114f00a88951.tar.gz
hercules-f943c061b5c29bf906830c8ff9e9114f00a88951.tar.bz2
hercules-f943c061b5c29bf906830c8ff9e9114f00a88951.tar.xz
hercules-f943c061b5c29bf906830c8ff9e9114f00a88951.zip
Fixed Bug#7770
-split 'item_delay.txt'. Follow up @ 9692bc034537693d331148ae8bd15153265c6cf0 -implement PACKET_ZC_SHOWSCRIPT. Special thanks to Kyeme and super awesome Yommy. Signed-off-by: malufett <malufett.eat.my.binaries@gmail.com>
Diffstat (limited to 'src')
-rw-r--r--src/map/clif.c23
-rw-r--r--src/map/clif.h1
-rw-r--r--src/map/itemdb.c2
-rw-r--r--src/map/script.c2
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);