Browse Source

Follow up to 15fdc12
* Adjusted the item database parser cast type.
* Adjusted the SQL tables to reflect the increased limit.

aleos89 9 năm trước cách đây
mục cha
commit
a14e21f4dd

+ 1 - 1
sql-files/item_db.sql

@@ -15,7 +15,7 @@ CREATE TABLE `item_db` (
   `defence` smallint(5) unsigned DEFAULT NULL,
   `range` tinyint(2) unsigned DEFAULT NULL,
   `slots` tinyint(2) unsigned DEFAULT NULL,
-  `equip_jobs` int(10) unsigned DEFAULT NULL,
+  `equip_jobs` bigint(20) unsigned DEFAULT NULL,
   `equip_upper` tinyint(2) unsigned DEFAULT NULL,
   `equip_genders` tinyint(1) unsigned DEFAULT NULL,
   `equip_locations` mediumint(7) unsigned DEFAULT NULL,

+ 1 - 1
sql-files/item_db2.sql

@@ -15,7 +15,7 @@ CREATE TABLE `item_db2` (
   `defence` smallint(5) unsigned DEFAULT NULL,
   `range` tinyint(2) unsigned DEFAULT NULL,
   `slots` tinyint(2) unsigned DEFAULT NULL,
-  `equip_jobs` int(10) unsigned DEFAULT NULL,
+  `equip_jobs` bigint(20) unsigned DEFAULT NULL,
   `equip_upper` tinyint(2) unsigned DEFAULT NULL,
   `equip_genders` tinyint(1) unsigned DEFAULT NULL,
   `equip_locations` mediumint(7) unsigned DEFAULT NULL,

+ 1 - 1
sql-files/item_db2_re.sql

@@ -15,7 +15,7 @@ CREATE TABLE `item_db2_re` (
   `defence` smallint(5) unsigned DEFAULT NULL,
   `range` tinyint(2) unsigned DEFAULT NULL,
   `slots` tinyint(2) unsigned DEFAULT NULL,
-  `equip_jobs` int(10) unsigned DEFAULT NULL,
+  `equip_jobs` bigint(20) unsigned DEFAULT NULL,
   `equip_upper` tinyint(2) unsigned DEFAULT NULL,
   `equip_genders` tinyint(1) unsigned DEFAULT NULL,
   `equip_locations` mediumint(7) unsigned DEFAULT NULL,

+ 1 - 1
sql-files/item_db_re.sql

@@ -15,7 +15,7 @@ CREATE TABLE `item_db_re` (
   `defence` smallint(5) unsigned DEFAULT NULL,
   `range` tinyint(2) unsigned DEFAULT NULL,
   `slots` tinyint(2) unsigned DEFAULT NULL,
-  `equip_jobs` int(10) unsigned DEFAULT NULL,
+  `equip_jobs` bigint(20) unsigned DEFAULT NULL,
   `equip_upper` tinyint(2) unsigned DEFAULT NULL,
   `equip_genders` tinyint(1) unsigned DEFAULT NULL,
   `equip_locations` mediumint(7) unsigned DEFAULT NULL,

+ 7 - 0
sql-files/upgrades/upgrade_20160614.sql

@@ -0,0 +1,7 @@
+ALTER TABLE `item_db` MODIFY COLUMN `equip_jobs` bigint(20) unsigned DEFAULT NULL;
+
+ALTER TABLE `item_db_re` MODIFY COLUMN `equip_jobs` bigint(20) unsigned DEFAULT NULL;
+
+ALTER TABLE `item_db2` MODIFY COLUMN `equip_jobs` bigint(20) unsigned DEFAULT NULL;
+
+ALTER TABLE `item_db2_re` MODIFY COLUMN `equip_jobs` bigint(20) unsigned DEFAULT NULL;

+ 1 - 1
src/map/itemdb.c

@@ -1280,7 +1280,7 @@ static bool itemdb_parse_dbrow(char** str, const char* source, int line, int scr
 		id->slot = MAX_SLOTS;
 	}
 
-	itemdb_jobid2mapid(id->class_base, (unsigned int)strtoul(str[11],NULL,0));
+	itemdb_jobid2mapid(id->class_base, (uint64)strtoul(str[11],NULL,0));
 	id->class_upper = atoi(str[12]);
 	id->sex	= atoi(str[13]);
 	id->equip = atoi(str[14]);