summaryrefslogtreecommitdiff
path: root/sql-files
diff options
context:
space:
mode:
Diffstat (limited to 'sql-files')
-rw-r--r--sql-files/main.sql22
-rw-r--r--sql-files/mob_db_re.sql4
-rw-r--r--sql-files/upgrades/2020-05-10--23-11.sql43
-rw-r--r--sql-files/upgrades/index.txt1
4 files changed, 63 insertions, 7 deletions
diff --git a/sql-files/main.sql b/sql-files/main.sql
index d5b7735fc..7aebd73fd 100644
--- a/sql-files/main.sql
+++ b/sql-files/main.sql
@@ -655,14 +655,25 @@ CREATE TABLE IF NOT EXISTS `login` (
INSERT IGNORE INTO `login` (`account_id`, `userid`, `user_pass`, `sex`, `email`) VALUES ('1', 's1', 'p1', 'S','athena@athena.com');
--
--- Table structure for table `mapreg`
+-- Table structure for table `map_reg_num_db`
--
-CREATE TABLE IF NOT EXISTS `mapreg` (
- `varname` VARCHAR(32) BINARY NOT NULL,
+CREATE TABLE IF NOT EXISTS `map_reg_num_db` (
+ `key` VARCHAR(32) BINARY NOT NULL DEFAULT '',
+ `index` INT UNSIGNED NOT NULL DEFAULT '0',
+ `value` INT NOT NULL DEFAULT '0',
+ PRIMARY KEY (`key`, `index`)
+) ENGINE=MyISAM;
+
+--
+-- Table structure for table `map_reg_str_db`
+--
+
+CREATE TABLE IF NOT EXISTS `map_reg_str_db` (
+ `key` VARCHAR(32) BINARY NOT NULL DEFAULT '',
`index` INT UNSIGNED NOT NULL DEFAULT '0',
- `value` VARCHAR(255) NOT NULL,
- PRIMARY KEY (`varname`,`index`)
+ `value` VARCHAR(255) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`key`, `index`)
) ENGINE=MyISAM;
--
@@ -939,6 +950,7 @@ INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1579817630); -- 2020-01-2
INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1584838560); -- 2020-03-22--01-56.sql
INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1584842940); -- 2020-03-22--03-09.sql
INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1588301040); -- 2020-05-01--04-44.sql
+INSERT IGNORE INTO `sql_updates` (`timestamp`) VALUES (1589145060); -- 2020-05-10--23-11.sql
--
-- Table structure for table `storage`
diff --git a/sql-files/mob_db_re.sql b/sql-files/mob_db_re.sql
index 4864affb2..ff2bd6304 100644
--- a/sql-files/mob_db_re.sql
+++ b/sql-files/mob_db_re.sql
@@ -178,7 +178,7 @@ REPLACE INTO `mob_db` VALUES (1094,'AMBERNITE','Ambernite','Ambernite',19,340,1,
REPLACE INTO `mob_db` VALUES (1095,'ANDRE','Andre','Andre',33,724,1,216,243,1,51,21,55,16,11,20,40,10,24,10,10,12,0,4,22,4481,300,1288,288,384,0,0,0,0,0,0,0,955,9000,910,1000,938,500,993,50,1001,4,1002,350,757,28,0,0,0,0,4043,1);
REPLACE INTO `mob_db` VALUES (1096,'ANGELING','Angeling','Angeling',77,19800,1,3366,2693,1,391,145,72,238,58,50,33,105,80,200,10,12,1,8,86,14261,200,1072,672,672,0,0,0,0,0,0,0,2254,100,2324,60,610,500,2282,1,509,2000,512,28,714,40,0,0,0,0,4054,1);
REPLACE INTO `mob_db` VALUES (1097,'ANT_EGG','Ant Egg','Ant Egg',28,530,1,180,203,0,1,1,68,45,5,1,65,5,10,30,10,12,0,0,60,0,1000,1001,199,1,0,0,0,0,0,0,0,1010,320,935,2000,909,2000,938,650,713,2000,1002,200,0,0,0,0,0,0,4013,1);
-REPLACE INTO `mob_db` VALUES (1098,'ANUBIS','Anubis','Anubis',105,38826,1,6026,2725,1,984,415,103,48,88,67,40,128,107,55,10,12,2,7,49,13973,150,1250,720,576,0,0,0,0,0,0,0,12735,10,1625,10,15042,100,984,105,1045,4365,2617,1,1614,3,0,0,0,0,4138,1);
+REPLACE INTO `mob_db` VALUES (1098,'ANUBIS','Anubis','Anubis',105,38826,1,6026,2725,1,984,415,103,48,88,67,40,128,107,55,10,12,2,7,49,13973,150,1250,720,576,0,0,0,0,0,0,0,12735,10,1625,10,15042,50,984,105,1045,4365,2617,1,1614,3,0,0,0,0,4138,1);
REPLACE INTO `mob_db` VALUES (1099,'ARGIOPE','Argiope','Argiope',75,3105,1,890,912,1,321,50,88,32,60,23,40,30,24,30,10,12,2,4,25,14229,300,1792,792,336,0,0,0,0,0,0,0,1042,5335,912,1200,757,175,2406,5,511,1500,719,10,0,0,0,0,0,0,4114,1);
REPLACE INTO `mob_db` VALUES (1100,'ARGOS','Argos','Argos',47,1005,1,360,405,1,96,33,58,8,38,17,25,5,26,15,10,12,2,4,25,12693,300,1468,468,768,0,0,0,0,0,0,0,1025,9000,911,1200,1042,500,757,61,511,670,508,250,10017,15,0,0,0,0,4075,1);
REPLACE INTO `mob_db` VALUES (1101,'BAPHOMET_','Baphomet Jr.','Baphomet Jr.',57,2035,1,510,548,1,195,33,70,25,52,60,36,17,57,25,10,12,0,6,27,14229,100,868,480,120,0,0,0,0,0,0,0,923,500,984,63,1464,2,607,50,610,100,508,1300,2405,50,0,0,0,0,4129,1);
@@ -1634,7 +1634,7 @@ REPLACE INTO `mob_db` VALUES (2769,'C1_MAGMARING','Swift Magmaring','Swift Magma
REPLACE INTO `mob_db` VALUES (2770,'C2_LUNATIC','Solid Lunatic','Solid Lunatic',3,550,1,90,195,1,23,5,18,0,10,3,3,0,8,5,10,12,0,2,60,129,200,1456,456,336,0,0,0,0,0,0,0,705,6500,949,1000,512,10000,601,5000,515,10000,2262,1100,622,20,0,0,0,0,4006,1);
REPLACE INTO `mob_db` VALUES (2771,'C3_LUNATIC','Lunatic Ringleader','Lunatic Ringleader',3,275,1,90,195,1,23,5,18,0,10,3,3,0,8,5,10,12,0,2,60,129,200,1456,456,336,0,0,0,0,0,0,0,705,6500,949,1000,2262,4,512,2000,601,600,515,1100,622,20,0,0,0,0,4006,1);
REPLACE INTO `mob_db` VALUES (2772,'C4_LUDE','Furious Lude','Furious Lude',101,57870,1,5075,11400,2,468,135,90,53,97,49,55,82,83,55,10,12,0,1,29,14469,150,960,960,480,0,0,0,0,0,0,0,7225,3200,7220,5723,1059,1000,2282,10,757,10,12001,100,6246,300,0,0,0,0,4193,1);
-REPLACE INTO `mob_db` VALUES (2773,'C5_LUCIOLA_VESPA','Elusive Luciola Vespa','Elusive Luciola Vespa',109,62330,1,7365,16245,1,761,283,59,55,88,89,55,32,143,59,10,12,1,4,24,30613,110,1000,864,432,0,0,0,0,0,0,0,2744,2,6224,1,15043,9000,518,300,992,160,526,200,943,3000,0,0,0,0,4445,1);
+REPLACE INTO `mob_db` VALUES (2773,'C5_LUCIOLA_VESPA','Elusive Luciola Vespa','Elusive Luciola Vespa',109,62330,1,7365,16245,1,761,283,59,55,88,89,55,32,143,59,10,12,1,4,24,30613,110,1000,864,432,0,0,0,0,0,0,0,2744,2,6224,1,15043,25,518,300,992,160,526,200,943,3000,0,0,0,0,4445,1);
REPLACE INTO `mob_db` VALUES (2774,'C1_LOLI_RURI','Swift Loli Ruri','Swift Loli Ruri',109,76400,1,8370,18825,2,1297,539,53,44,111,50,47,79,95,79,10,12,2,6,87,14725,125,1632,1632,576,0,0,0,0,0,0,0,7206,800,7219,3000,7214,5044,985,100,7019,1,2718,5,15038,100,0,0,0,0,4191,1);
REPLACE INTO `mob_db` VALUES (2775,'C2_LIVE_PEACH_TREE','Solid Enchanted Peach T','Solid Enchanted Peach T',92,87770,1,4495,12930,7,504,169,109,40,76,52,55,40,92,50,10,12,1,3,42,8325,410,672,672,480,0,0,0,0,0,0,0,7164,4365,7939,100,526,1000,604,400,532,100,603,5,0,0,0,0,0,0,4217,1);
REPLACE INTO `mob_db` VALUES (2776,'C3_LITTLE_PORING','Baby Poring Ringleader','Baby Poring Ringleader',1,200,1,90,150,1,14,3,2,5,6,1,1,0,6,5,10,12,0,3,21,131,400,1872,672,480,0,0,0,0,0,0,0,909,9000,1202,100,938,1000,512,5000,507,1000,512,500,507,1000,0,0,0,0,4545,100);
diff --git a/sql-files/upgrades/2020-05-10--23-11.sql b/sql-files/upgrades/2020-05-10--23-11.sql
new file mode 100644
index 000000000..9f2755e76
--- /dev/null
+++ b/sql-files/upgrades/2020-05-10--23-11.sql
@@ -0,0 +1,43 @@
+#1589145060
+
+-- This file is part of Hercules.
+-- http://herc.ws - http://github.com/HerculesWS/Hercules
+--
+-- Copyright (C) 2019-2020 Hercules Dev Team
+--
+-- Hercules is free software: you can redistribute it and/or modify
+-- it under the terms of the GNU General Public License as published by
+-- the Free Software Foundation, either version 3 of the License, or
+-- (at your option) any later version.
+--
+-- This program is distributed in the hope that it will be useful,
+-- but WITHOUT ANY WARRANTY; without even the implied warranty of
+-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+-- GNU General Public License for more details.
+--
+-- You should have received a copy of the GNU General Public License
+-- along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+-- Add separate tables for global integer and string variables.
+CREATE TABLE IF NOT EXISTS `map_reg_num_db` (
+ `key` VARCHAR(32) BINARY NOT NULL DEFAULT '',
+ `index` INT UNSIGNED NOT NULL DEFAULT '0',
+ `value` INT NOT NULL DEFAULT '0',
+ PRIMARY KEY (`key`, `index`)
+) ENGINE=MyISAM;
+CREATE TABLE IF NOT EXISTS `map_reg_str_db` (
+ `key` VARCHAR(32) BINARY NOT NULL DEFAULT '',
+ `index` INT UNSIGNED NOT NULL DEFAULT '0',
+ `value` VARCHAR(255) NOT NULL DEFAULT '0',
+ PRIMARY KEY (`key`, `index`)
+) ENGINE=MyISAM;
+
+-- Copy data from mapreg table to new map_reg_*_db tables.
+INSERT INTO `map_reg_num_db` (`key`, `index`, `value`) SELECT `varname`, `index`, CAST(`value` AS SIGNED) FROM `mapreg` WHERE NOT RIGHT(`varname`, 1)='$';
+INSERT INTO `map_reg_str_db` (`key`, `index`, `value`) SELECT `varname`, `index`, `value` FROM `mapreg` WHERE RIGHT(`varname`, 1)='$';
+
+-- Remove mapreg table.
+DROP TABLE IF EXISTS `mapreg`;
+
+-- Add update timestamp.
+INSERT INTO `sql_updates` (`timestamp`) VALUES (1589145060);
diff --git a/sql-files/upgrades/index.txt b/sql-files/upgrades/index.txt
index 64a7793f8..fb889c280 100644
--- a/sql-files/upgrades/index.txt
+++ b/sql-files/upgrades/index.txt
@@ -63,3 +63,4 @@
2020-03-22--01-56.sql
2020-03-22--03-09.sql
2020-05-01--04-44.sql
+2020-05-10--23-11.sql