summaryrefslogtreecommitdiff
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
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>
-rw-r--r--db/pre-re/item_db.txt1
-rw-r--r--db/pre-re/item_delay.txt34
-rw-r--r--db/re/item_delay.txt (renamed from db/item_delay.txt)0
-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
7 files changed, 60 insertions, 3 deletions
diff --git a/db/pre-re/item_db.txt b/db/pre-re/item_db.txt
index a293a951c..09e70de5d 100644
--- a/db/pre-re/item_db.txt
+++ b/db/pre-re/item_db.txt
@@ -5128,7 +5128,6 @@
12580,Vending_Search_Scroll,Universal Catalog Silver,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ searchstores 10,0; },{},{}
12581,Vending_Search_Scroll2,Universal Catalog Gold,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ searchstores 10,1; },{},{}
12591,Uni_Catalog_Bz,Universal Catalog Bronze,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{ searchstores 10,1; },{},{}
-12622,Boarding_Halter,Halter Lead,11,20,,0,,,,,0xFFFFFFFF,63,2,,,,,,{ setmounting(); },{},{}
12701,Old_Blue_Box_F,Old Blue Box,2,0,,10,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
12702,Old_Bleu_Box,Old Navy Box,2,0,,200,,,,,0xFFFFFFFF,7,2,,,,,,{ getrandgroupitem 12702,1; getrandgroupitem 12702,1; },{},{}
12703,Holy_Egg_2,Holy Egg,11,0,,50,,,,,0xFFFFFFFF,7,2,,,,,,{},{},{}
diff --git a/db/pre-re/item_delay.txt b/db/pre-re/item_delay.txt
new file mode 100644
index 000000000..3e24f9d31
--- /dev/null
+++ b/db/pre-re/item_delay.txt
@@ -0,0 +1,34 @@
+// Item Delay Database
+// There is a max concurrent number of entries modifiable in src/map/itemdb.h as MAX_ITEMDELAYS
+//
+// Structure:
+// Item ID,Delay in Milliseconds
+
+//12202,60000 //Str_Dish10_
+//12203,60000 //Agi_Dish10_
+//12204,60000 //Int_Dish10_
+//12205,60000 //Dex_Dish10_
+//12206,60000 //Luk_Dish10_
+//12207,60000 //Vit_Dish10_
+12208,60000 //Battle_Manual
+12210,60000 //Bubble_Gum
+14538,300000 //Glass_Of_Illusion
+14586,180000 //Spark_Candy
+607,5000 // Yggdrasil_Berry
+608,3000 // Yggdrasil_Seed
+
+// Bifrost Items
+11522,1000 // Red_Raffle_Sap
+11523,2000 // Yellow_Raffle_Sap
+11524,3000 // White_Raffle_Sap
+11525,5000 // Mora_Hip_Tea
+
+//12580,0 // Vending_Search_Scroll
+//12581,0 // Vending_Search_Scroll2
+//12591,0 // Vending_Search_Scroll3
+
+12725,120000 // Runstone_Nosiege,Nauthiz Rune
+12726,30000 // Runstone_Rhydo,Raido Rune
+12727,60000 // Runstone_Verkana,Berkana Rune
+12732,1000 // Runstone_Pertz,Wyrd Rune
+22540,60000 // Runstone_Luxanima,Lux Anima Rune
diff --git a/db/item_delay.txt b/db/re/item_delay.txt
index 8905edb11..8905edb11 100644
--- a/db/item_delay.txt
+++ b/db/re/item_delay.txt
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);