summaryrefslogtreecommitdiff
path: root/src/sql/sqlite
diff options
context:
space:
mode:
authorErik Schilling <ablu.erikschilling@googlemail.com>2013-08-07 22:08:29 +0200
committerErik Schilling <ablu.erikschilling@googlemail.com>2013-08-26 22:56:47 +0200
commitba573fcc38580a01985172b9bc864c97ce855af3 (patch)
treeebcdbcf9a86cd35d5a8ab3bb004faa5c490c16d4 /src/sql/sqlite
parent7dc001eb32ae5345905e108741984258ee2f1813 (diff)
downloadmanaserv-ba573fcc38580a01985172b9bc864c97ce855af3.tar.gz
manaserv-ba573fcc38580a01985172b9bc864c97ce855af3.tar.bz2
manaserv-ba573fcc38580a01985172b9bc864c97ce855af3.tar.xz
manaserv-ba573fcc38580a01985172b9bc864c97ce855af3.zip
Made cooldowns of abilities scriptable
- Removed hardcoded using of attributes - Simply introduced lua functions to set global and ability cooldowns - Requires database update - Bumps the protocol
Diffstat (limited to 'src/sql/sqlite')
-rw-r--r--src/sql/sqlite/createTables.sql3
-rw-r--r--src/sql/sqlite/updates/update_23_to_24.sql34
2 files changed, 35 insertions, 2 deletions
diff --git a/src/sql/sqlite/createTables.sql b/src/sql/sqlite/createTables.sql
index 72a70090..9d7d1c2c 100644
--- a/src/sql/sqlite/createTables.sql
+++ b/src/sql/sqlite/createTables.sql
@@ -110,7 +110,6 @@ CREATE TABLE mana_char_abilities
(
char_id INTEGER NOT NULL,
ability_id INTEGER NOT NULL,
- ability_current_points INTEGER NOT NULL,
PRIMARY KEY (char_id, ability_id),
FOREIGN KEY (char_id) REFERENCES mana_characters(id)
);
@@ -409,7 +408,7 @@ AS
INSERT INTO mana_world_states VALUES('accountserver_startup',-1,'0', strftime('%s','now'));
INSERT INTO mana_world_states VALUES('accountserver_version',-1,'0', strftime('%s','now'));
-INSERT INTO mana_world_states VALUES('database_version', -1,'23', strftime('%s','now'));
+INSERT INTO mana_world_states VALUES('database_version', -1,'24', strftime('%s','now'));
-- all known transaction codes
diff --git a/src/sql/sqlite/updates/update_23_to_24.sql b/src/sql/sqlite/updates/update_23_to_24.sql
new file mode 100644
index 00000000..83b129eb
--- /dev/null
+++ b/src/sql/sqlite/updates/update_23_to_24.sql
@@ -0,0 +1,34 @@
+BEGIN;
+
+CREATE TABLE mana_char_abilities_backup
+(
+ char_id INTEGER NOT NULL,
+ ability_id INTEGER NOT NULL,
+ PRIMARY KEY (char_id, ability_id),
+ FOREIGN KEY (char_id) REFERENCES mana_characters(id)
+);
+
+INSERT INTO mana_char_abilities_backup SELECT char_id, ability_id FROM mana_char_abilities;
+
+DROP TABLE mana_char_abilities;
+
+CREATE TABLE mana_char_abilities
+(
+ char_id INTEGER NOT NULL,
+ ability_id INTEGER NOT NULL,
+ PRIMARY KEY (char_id, ability_id),
+ FOREIGN KEY (char_id) REFERENCES mana_characters(id)
+);
+
+INSERT INTO mana_char_abilities SELECT char_id, ability_id FROM mana_char_abilities_backup;
+
+DROP TABLE mana_char_abilities_backup;
+
+-- Update the database version, and set date of update
+UPDATE mana_world_states
+ SET value = '24',
+ moddate = strftime('%s','now')
+ WHERE state_name = 'database_version';
+
+END;
+