Fixed a lot of wrong SC group IDs for item delay database.

It also is able to parse the value for the script engine constants now.

Fixed #846.
This commit is contained in:
Lemongrass3110 2015-12-18 20:43:07 +01:00
parent 22a1cc0174
commit 9aa832570e
3 changed files with 78 additions and 68 deletions

View File

@ -10,39 +10,39 @@
// <SC_GroupID>
// SC (status change) group for the item.
// Example for SC_REUSE_LIMIT_MTF
// 12658,10000,620 // Transformation Scroll(Deviruchi)
// 12659,10000,620 // Transformation Scroll(Raydric)
// 12658,10000,SC_REUSE_LIMIT_MTF // Transformation Scroll(Deviruchi)
// 12659,10000,SC_REUSE_LIMIT_MTF // Transformation Scroll(Raydric)
// -> 12658 has reuse delay for 10 seconds, and also,
// 12659 cannot be used when this delay is active.
// Since this is optional, default is -1 will ignores the
// delay group and the delay will be stored in character's
// data that has limit set in src/map/itemdb.h as MAX_ITEMDELAYS.
// SC_REUSE_LIMIT_A 609
14538,300000,608 //Glass_Of_Illusion
// SC_REUSE_LIMIT_A
14538,300000,SC_REUSE_LIMIT_A //Glass_Of_Illusion
// SC_REUSE_LIMIT_B 610
14586,180000,609 //Spark_Candy
// SC_REUSE_LIMIT_B
14586,180000,SC_REUSE_LIMIT_B //Spark_Candy
// SC_REUSE_LIMIT_C 611
12208,60000,610 //Battle_Manual
// SC_REUSE_LIMIT_C
12208,60000,SC_REUSE_LIMIT_C //Battle_Manual
// SC_REUSE_LIMIT_D 612
12210,60000,611 //Bubble_Gum
// SC_REUSE_LIMIT_D
12210,60000,SC_REUSE_LIMIT_D //Bubble_Gum
// SC_REUSE_LIMIT_E 613
11522,1000,612 //Red_Raffle_Sap
11523,2000,612 //Yellow_Raffle_Sap
11524,3000,612 //White_Raffle_Sap
// SC_REUSE_LIMIT_E
11522,1000,SC_REUSE_LIMIT_E //Red_Raffle_Sap
11523,2000,SC_REUSE_LIMIT_E //Yellow_Raffle_Sap
11524,3000,SC_REUSE_LIMIT_E //White_Raffle_Sap
// SC_REUSE_LIMIT_F 614
607,5000,613 //Yggdrasil_Berry
// SC_REUSE_LIMIT_F
607,5000,SC_REUSE_LIMIT_F //Yggdrasil_Berry
// SC_REUSE_LIMIT_G 615
608,3000,614 //Yggdrasil_Seed
// SC_REUSE_LIMIT_G
608,3000,SC_REUSE_LIMIT_G //Yggdrasil_Seed
// SC_REUSE_LIMIT_H 616
11525,5000,615 //Mora_Hip_Tea
// SC_REUSE_LIMIT_H
11525,5000,SC_REUSE_LIMIT_H //Mora_Hip_Tea
// Misc
//12202,60000 //Str_Dish10_

View File

@ -10,73 +10,73 @@
// <SC_GroupID>
// SC (status change) group for the item.
// Example for SC_REUSE_LIMIT_MTF
// 12658,10000,620 // Transformation Scroll(Deviruchi)
// 12659,10000,620 // Transformation Scroll(Raydric)
// 12658,10000,SC_REUSE_LIMIT_MTF // Transformation Scroll(Deviruchi)
// 12659,10000,SC_REUSE_LIMIT_MTF // Transformation Scroll(Raydric)
// -> 12658 has reuse delay for 10 seconds, and also,
// 12659 cannot be used when this delay is active.
// Since this is optional, default is -1 will ignores the
// delay group and the delay will be stored in character's
// data that has limit set in src/map/itemdb.h as MAX_ITEMDELAYS.
// SC_REUSE_REFRESH 317
12725,120000,317 //Runstone_Nosiege
// SC_REUSE_REFRESH
12725,120000,SC_REUSE_REFRESH //Runstone_Nosiege
// SC_REUSE_LIMIT_A 609
14538,300000,608 //Glass_Of_Illusion
// SC_REUSE_LIMIT_A
14538,300000,SC_REUSE_LIMIT_A //Glass_Of_Illusion
// SC_REUSE_LIMIT_B 610
12596,180000,609 //Magic_Candy
14586,180000,609 //Spark_Candy
// SC_REUSE_LIMIT_B
12596,180000,SC_REUSE_LIMIT_B //Magic_Candy
14586,180000,SC_REUSE_LIMIT_B //Spark_Candy
// SC_REUSE_LIMIT_C 611
12208,60000,610 //Battle_Manual
// SC_REUSE_LIMIT_C
12208,60000,SC_REUSE_LIMIT_C //Battle_Manual
// SC_REUSE_LIMIT_D 612
12210,60000,611 //Bubble_Gum
// SC_REUSE_LIMIT_D
12210,60000,SC_REUSE_LIMIT_D //Bubble_Gum
// SC_REUSE_LIMIT_E 613
11522,1000,612 //Red_Raffle_Sap
11523,2000,612 //Yellow_Raffle_Sap
11524,3000,612 //White_Raffle_Sap
// SC_REUSE_LIMIT_E
11522,1000,SC_REUSE_LIMIT_E //Red_Raffle_Sap
11523,2000,SC_REUSE_LIMIT_E //Yellow_Raffle_Sap
11524,3000,SC_REUSE_LIMIT_E //White_Raffle_Sap
// SC_REUSE_LIMIT_F 614
607,5000,613 //Yggdrasil_Berry
// SC_REUSE_LIMIT_F
607,5000,SC_REUSE_LIMIT_F //Yggdrasil_Berry
// SC_REUSE_LIMIT_G 615
608,3000,614 //Yggdrasil_Seed
22559,3000,614 //Mock_Strawberry
// SC_REUSE_LIMIT_G
608,3000,SC_REUSE_LIMIT_G //Yggdrasil_Seed
22559,3000,SC_REUSE_LIMIT_G //Mock_Strawberry
// SC_REUSE_LIMIT_H 616
11525,5000,615 //Mora_Hip_Tea
// SC_REUSE_LIMIT_H
11525,5000,SC_REUSE_LIMIT_H //Mora_Hip_Tea
// SC_REUSE_LIMIT_ASPD_POTION 617
//12684,0,616 //ASPD_Potion //! CHECKME: Need confirmation!
// SC_REUSE_LIMIT_ASPD_POTION
//12684,0,SC_REUSE_LIMIT_ASPD_POTION //ASPD_Potion //! CHECKME: Need confirmation!
// SC_REUSE_LIMIT_MTF 618
12658,10000,620 //Transformation Scroll(Deviruchi)
12659,10000,620 //Transformation Scroll(Raydric)
12660,10000,620 //Transformation Scroll(Mavka)
12661,10000,620 //Transformation Scroll(Marduk)
12662,10000,620 //Transformation Scroll(Banshee)
12663,10000,620 //Transformation Scroll(Poring)
12664,10000,620 //Transformation Scroll(Golem)
// SC_REUSE_LIMIT_MTF
12658,10000,SC_REUSE_LIMIT_MTF //Transformation Scroll(Deviruchi)
12659,10000,SC_REUSE_LIMIT_MTF //Transformation Scroll(Raydric)
12660,10000,SC_REUSE_LIMIT_MTF //Transformation Scroll(Mavka)
12661,10000,SC_REUSE_LIMIT_MTF //Transformation Scroll(Marduk)
12662,10000,SC_REUSE_LIMIT_MTF //Transformation Scroll(Banshee)
12663,10000,SC_REUSE_LIMIT_MTF //Transformation Scroll(Poring)
12664,10000,SC_REUSE_LIMIT_MTF //Transformation Scroll(Golem)
// SC_ALL_RIDING_REUSE_LIMIT 619
12622,3000,621 //Boarding_Halter
// SC_ALL_RIDING_REUSE_LIMIT
12622,3000,SC_ALL_RIDING_REUSE_LIMIT //Boarding_Halter
// SC_SEARCH_STORE_INFO 620
12580,0,624 //Vending_Search_Scroll
12581,0,624 //Vending_Search_Scroll2
12591,0,624 //Uni_Catalog_Bz
// SC_SEARCH_STORE_INFO
12580,0,SC_SEARCH_STORE_INFO //Vending_Search_Scroll
12581,0,SC_SEARCH_STORE_INFO //Vending_Search_Scroll2
12591,0,SC_SEARCH_STORE_INFO //Uni_Catalog_Bz
// SC_REUSE_MILLENNIUMSHIELD 621
12727,60000,625 //Runstone_Verkana
// SC_REUSE_MILLENNIUMSHIELD
12727,60000,SC_REUSE_MILLENNIUMSHIELD //Runstone_Verkana
// SC_REUSE_CRUSHSTRIKE 622
12726,30000,626 //Runstone_Rhydo
// SC_REUSE_CRUSHSTRIKE
12726,30000,SC_REUSE_CRUSHSTRIKE //Runstone_Rhydo
// SC_REUSE_STORMBLAST 623
12732,1000,627 //Runstone_Pertz
// SC_REUSE_STORMBLAST
12732,1000,SC_REUSE_STORMBLAST //Runstone_Pertz
// Misc
//12202,60000 //Str_Dish10_

View File

@ -757,7 +757,7 @@ static bool itemdb_read_itemtrade(char* str[], int columns, int current) {
}
/** Reads item delay amounts [Paradox924X]
* Structure: <nameid>,<delay>
* Structure: <nameid>,<delay>{,<delay sc group>}
*/
static bool itemdb_read_itemdelay(char* str[], int columns, int current) {
unsigned short nameid;
@ -784,8 +784,18 @@ static bool itemdb_read_itemdelay(char* str[], int columns, int current) {
if (columns == 2)
id->delay_sc = SC_NONE;
else
else if( ISDIGIT(str[2][0]) )
id->delay_sc = atoi(str[2]);
else{ // Try read sc group id from const db
int constant;
if( !script_get_constant(trim(str[2]), &constant) ){
ShowWarning("itemdb_read_itemdelay: Invalid sc group \"%s\" for item id %hu.\n", str[2], nameid);
return false;
}
id->delay_sc = (short)constant;
}
return true;
}