From 44ee071d7ece5a2023f79307f36e8a244c9e7b3a Mon Sep 17 00:00:00 2001 From: Erik Schilling Date: Sun, 17 Feb 2013 12:24:45 +0100 Subject: Removed skills This removes support for skills. The plan is to allow to implement the skills as they were implemented before via attributes. This adds a lot more flexibility to the server creators while also removing the confusion about skills and attributes. So this change does: - Remove the skillmanager with all its calls, the skill xml file, etc - Move exp giving to the script engine: --> Allows to implement the old behaviour (and more) in the scripts - Remove the exp tag from the monster definition: + Since the server itself does not require it anymore it feels wrong to require it for EVERY monster. TODO: Add a system to add properties to the monsters/items.xml which allow defining things like the exp and allows to read the value from the script engine. + Small drawback, but it should not be hard to implement this property system. - Drop the level networking and calculation. + level calculation will happen via the attribute system later but i would prefer to do this in a seperate patch since this patch already got longer than expected especially since this requires to make setting correction points and available status points scriptable. + The level would be simply set as a attribute, the int number of it will be the level, the remaining digits will be the % number till the next levelup. - NOT remove any existing skill tables in the database update scripts. + There is no way to move them into the attribute table in a unified way (there are too many different way they could have been used). So server admins have to care about moving theirs skills to attributes themselves. + Keeping the old tables does not hurt for existing databases. So removing does not give any advantage/is required anyway. The now obsolote info about the EXP transaction is not removed for updated databases either. (The update script basically only bumps the version number without doing anything else. - bump the network protocol version --> old clients won't be able to connect. - bump the database version --> serveradmins need to update their db. --- src/sql/sqlite/updates/update_22_to_23.sql | 58 ++++++++++++++++++++++++++++++ 1 file changed, 58 insertions(+) create mode 100644 src/sql/sqlite/updates/update_22_to_23.sql (limited to 'src/sql/sqlite/updates') diff --git a/src/sql/sqlite/updates/update_22_to_23.sql b/src/sql/sqlite/updates/update_22_to_23.sql new file mode 100644 index 00000000..7172b56f --- /dev/null +++ b/src/sql/sqlite/updates/update_22_to_23.sql @@ -0,0 +1,58 @@ +BEGIN; + +-- There is no way to convert all your skills to attributes. You will have to +-- do this manually. + +CREATE TABLE mana_characters_backup +( + id INTEGER PRIMARY KEY, + user_id INTEGER NOT NULL, + name TEXT NOT NULL UNIQUE, + gender INTEGER NOT NULL, + hair_style INTEGER NOT NULL, + hair_color INTEGER NOT NULL, + char_pts INTEGER NOT NULL, + correct_pts INTEGER NOT NULL, + x INTEGER NOT NULL, + y INTEGER NOT NULL, + map_id INTEGER NOT NULL, + slot INTEGER NOT NULL, + -- + FOREIGN KEY (user_id) REFERENCES mana_accounts(id) +); + +INSERT INTO mana_characters_backup SELECT + id, user_id, name, gender, hair_style, hair_color, char_pts, correct_pts, + x, y, map_id, slot FROM mana_characters; + +DROP TABLE mana_characters; + +CREATE TABLE mana_characters +( + id INTEGER PRIMARY KEY, + user_id INTEGER NOT NULL, + name TEXT NOT NULL UNIQUE, + gender INTEGER NOT NULL, + hair_style INTEGER NOT NULL, + hair_color INTEGER NOT NULL, + char_pts INTEGER NOT NULL, + correct_pts INTEGER NOT NULL, + x INTEGER NOT NULL, + y INTEGER NOT NULL, + map_id INTEGER NOT NULL, + slot INTEGER NOT NULL, + -- + FOREIGN KEY (user_id) REFERENCES mana_accounts(id) +); + +INSERT INTO mana_characters SELECT * FROM mana_characters_backup; +DROP TABLE mana_characters_backup; + +-- Update the database version, and set date of update +UPDATE mana_world_states + SET value = '23', + moddate = strftime('%s','now') + WHERE state_name = 'database_version'; + +END; + -- cgit v1.2.3-70-g09d2