From 6eb4cc408fdc793b319b5cf869f5b49b1daeaf88 Mon Sep 17 00:00:00 2001 From: Lemongrass3110 Date: Mon, 27 Mar 2017 00:31:02 +0200 Subject: [PATCH] Fixes #2004 Thanks to @daisyanne1380 Make sure to make a backup of your tables' content before running the upgrade script - in case of any conversion problems that might occur. --- sql-files/item_db2.sql | 2 +- sql-files/item_db2_re.sql | 6 +++--- sql-files/mob_db2.sql | 4 ++-- sql-files/mob_db2_re.sql | 2 +- sql-files/upgrades/upgrade_20170327.sql | 12 ++++++++++++ 5 files changed, 19 insertions(+), 7 deletions(-) create mode 100644 sql-files/upgrades/upgrade_20170327.sql diff --git a/sql-files/item_db2.sql b/sql-files/item_db2.sql index 7bb37b7e22..0fc50686f4 100644 --- a/sql-files/item_db2.sql +++ b/sql-files/item_db2.sql @@ -33,7 +33,7 @@ CREATE TABLE `item_db2` ( # Items Additional Database # # Structure of Database: -#REPLACE INTO `item_db2` VALUES ( ID,'Name','Name',Type,Price,Sell,Weight,ATK,DEF,Range,Slot,Job,Class,Gender,Loc,wLV,eLV,Refineable,View,'Script','OnEquip_Script','OnUnequip_Script'); +#REPLACE INTO `item_db2` VALUES ( ID,'AegisName','Name',Type,Buy,Sell,Weight,ATK,DEF,Range,Slots,Job,Class,Gender,Loc,wLV,eLV,Refineable,View,'Script','OnEquip_Script','OnUnequip_Script'); # # THQ Quest Items #============================================================= diff --git a/sql-files/item_db2_re.sql b/sql-files/item_db2_re.sql index ad65339059..c93ece62ba 100644 --- a/sql-files/item_db2_re.sql +++ b/sql-files/item_db2_re.sql @@ -11,7 +11,7 @@ CREATE TABLE `item_db2_re` ( `price_buy` mediumint(8) unsigned DEFAULT NULL, `price_sell` mediumint(8) unsigned DEFAULT NULL, `weight` smallint(5) unsigned NOT NULL DEFAULT '0', - `attack` smallint(5) unsigned DEFAULT NULL, + `atk:matk` varchar(11) DEFAULT NULL, `defence` smallint(5) unsigned DEFAULT NULL, `range` tinyint(2) unsigned DEFAULT NULL, `slots` tinyint(2) unsigned DEFAULT NULL, @@ -20,7 +20,7 @@ CREATE TABLE `item_db2_re` ( `equip_genders` tinyint(1) unsigned DEFAULT NULL, `equip_locations` mediumint(7) unsigned DEFAULT NULL, `weapon_level` tinyint(1) unsigned DEFAULT NULL, - `equip_level` tinyint(3) unsigned DEFAULT NULL, + `equip_level` varchar(10) DEFAULT NULL, `refineable` tinyint(1) unsigned DEFAULT NULL, `view` smallint(5) unsigned DEFAULT NULL, `script` text, @@ -33,7 +33,7 @@ CREATE TABLE `item_db2_re` ( # Items Additional Database # # Structure of Database: -#REPLACE INTO `item_db2_re` VALUES ( ID,'Name','Name',Type,Price,Sell,Weight,ATK,DEF,Range,Slot,Job,Class,Gender,Loc,wLV,eLV,Refineable,View,'Script','OnEquip_Script','OnUnequip_Script'); +#REPLACE INTO `item_db2_re` VALUES ( ID,'AegisName','Name',Type,Buy,Sell,Weight,'ATK[:MATK]',DEF,Range,Slots,Job,Class,Gender,Loc,wLV,'eLV[:maxLevel]',Refineable,View,'Script','OnEquip_Script','OnUnequip_Script'); # # THQ Quest Items #============================================================= diff --git a/sql-files/mob_db2.sql b/sql-files/mob_db2.sql index be036b7cfa..7b498dc517 100644 --- a/sql-files/mob_db2.sql +++ b/sql-files/mob_db2.sql @@ -29,7 +29,7 @@ CREATE TABLE `mob_db2` ( `Scale` tinyint(4) unsigned NOT NULL default '0', `Race` tinyint(4) unsigned NOT NULL default '0', `Element` tinyint(4) unsigned NOT NULL default '0', - `Mode` smallint(6) unsigned NOT NULL default '0', + `Mode` int(11) unsigned NOT NULL default '0', `Speed` smallint(6) unsigned NOT NULL default '0', `aDelay` smallint(6) unsigned NOT NULL default '0', `aMotion` smallint(6) unsigned NOT NULL default '0', @@ -64,7 +64,7 @@ CREATE TABLE `mob_db2` ( PRIMARY KEY (`ID`) ) ENGINE=MyISAM; -# Monsters Additional Database +# Monster Additional Database # # Structure of Database : #REPLACE INTO `mob_db2` VALUES ( ID,'Sprite_Name','kROName','iROName',LV,HP,SP,EXP,JEXP,Range1,ATK1,ATK2,DEF,MDEF,STR,AGI,VIT,INT,DEX,LUK,Range2,Range3,Scale,Race,Element,Mode,Speed,aDelay,aMotion,dMotion,MEXP,MVP1id,MVP1per,MVP2id,MVP2per,MVP3id,MVP3per,Drop1id,Drop1per,Drop2id,Drop2per,Drop3id,Drop3per,Drop4id,Drop4per,Drop5id,Drop5per,Drop6id,Drop6per,Drop7id,Drop7per,Drop8id,Drop8per,Drop9id,Drop9per,DropCardid,DropCardper); diff --git a/sql-files/mob_db2_re.sql b/sql-files/mob_db2_re.sql index 93b4ee2639..a5fe826a10 100644 --- a/sql-files/mob_db2_re.sql +++ b/sql-files/mob_db2_re.sql @@ -29,7 +29,7 @@ CREATE TABLE `mob_db2_re` ( `Scale` tinyint(4) unsigned NOT NULL default '0', `Race` tinyint(4) unsigned NOT NULL default '0', `Element` tinyint(4) unsigned NOT NULL default '0', - `Mode` smallint(6) unsigned NOT NULL default '0', + `Mode` int(11) unsigned NOT NULL default '0', `Speed` smallint(6) unsigned NOT NULL default '0', `aDelay` smallint(6) unsigned NOT NULL default '0', `aMotion` smallint(6) unsigned NOT NULL default '0', diff --git a/sql-files/upgrades/upgrade_20170327.sql b/sql-files/upgrades/upgrade_20170327.sql new file mode 100644 index 0000000000..7fdff2f1eb --- /dev/null +++ b/sql-files/upgrades/upgrade_20170327.sql @@ -0,0 +1,12 @@ +alter table `item_db2_re` + change `attack` `atk:matk` varchar(11) DEFAULT NULL, + modify `equip_level` varchar(10) DEFAULT NULL +; + +alter table `mob_db2` + modify `Mode` int(11) unsigned NOT NULL default '0' +; + +alter table `mob_db2_re` + modify `Mode` int(11) unsigned NOT NULL default '0' +;