summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Changelog-Trunk.txt2
-rw-r--r--sql-files/item_db.sql4
-rwxr-xr-xtools/item_db.pl8
3 files changed, 11 insertions, 3 deletions
diff --git a/Changelog-Trunk.txt b/Changelog-Trunk.txt
index 0b259838a..0a6732ea3 100644
--- a/Changelog-Trunk.txt
+++ b/Changelog-Trunk.txt
@@ -3,6 +3,8 @@ Date Added
AS OF SVN REV. 5091, WE ARE NOW USING TRUNK. ALL UNTESTED BUGFIXES/FEATURES GO INTO TRUNK.
IF YOU HAVE A WORKING AND TESTED BUGFIX PUT IT INTO STABLE AS WELL AS TRUNK.
+2006/09/11
+ * Added D-Kalck's fix of the TXT -> SQL converter [Playtester]
2006/09/10
* Thanks to KarLaeda, added missing function in @showmobs [Lupus]
- Script function 'query_sql': In the TXT version it doesn't fill the array
diff --git a/sql-files/item_db.sql b/sql-files/item_db.sql
index 3d1cf925e..f783be245 100644
--- a/sql-files/item_db.sql
+++ b/sql-files/item_db.sql
@@ -2219,8 +2219,8 @@ REPLACE INTO `item_db` VALUES (7413,'Moon_Cake8','Yuebing',3,NULL,10,10,NULL,NUL
REPLACE INTO `item_db` VALUES (7414,'Moon_Cake9','Yuebing',3,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `item_db` VALUES (7415,'Stone_Of_Summons','Summoning Stone',3,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `item_db` VALUES (7416,'Letter_Of_Recommendation','Letter of Recommentation',3,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `item_db` VALUES (7417,'Mission_ScrollA','Written Request 01',3,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
-REPLACE INTO `item_db` VALUES (7418,'Mission_ScrollB','Written Request 02',3,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7417,'Mission_ScrollA','Written Request (A)',3,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
+REPLACE INTO `item_db` VALUES (7418,'Mission_ScrollB','Written Request (B)',3,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `item_db` VALUES (7419,'Embryo_Create_Book','Embryo Creation Guide',3,NULL,10,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `item_db` VALUES (7420,'Skull_','Skull',3,NULL,0,10,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
REPLACE INTO `item_db` VALUES (7421,'Red_Key','Red Key',3,NULL,10,0,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL,NULL);
diff --git a/tools/item_db.pl b/tools/item_db.pl
index f176a949f..7edf3f0a0 100755
--- a/tools/item_db.pl
+++ b/tools/item_db.pl
@@ -2,6 +2,8 @@
$db = "item_db";
$nb_columns = 22;
@str_col = (1,2,19,20,21);
+$line_format = "([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),([^\,]*),(\{.*\}),(\{.*\}),(\{.*\})";
+#$line_format = ;
$create_table = "#
# Table structure for table `item_db`
#
@@ -43,7 +45,11 @@ while ($ligne=<STDIN>)
{
printf("# %s\n", $ligne);
} else {
- @champ = split (",(?![^{]*[})])",$ligne);
+ if ($ligne =~ $line_format) {
+ @champ = ($1,$2,$3,$4,$5,$6,$7,$8,$9,$10,$11,$12,$13,$14,$15,$16,$17,$18,$19,$20,$21,$22);
+ } else {
+ @champ = ();
+ }
if ($#champ != $nb_columns - 1)
{
printf ("# WARNING BAD LINE : %d (%s)\n", $#champ, $ligne);