diff --git a/sql/320/1_creature_template.sql b/sql/320/01_creature_template.sql similarity index 100% rename from sql/320/1_creature_template.sql rename to sql/320/01_creature_template.sql diff --git a/sql/320/2_gameobject_template.sql b/sql/320/02_gameobject_template.sql similarity index 100% rename from sql/320/2_gameobject_template.sql rename to sql/320/02_gameobject_template.sql diff --git a/sql/320/3_item_template.sql b/sql/320/03_item_template.sql similarity index 100% rename from sql/320/3_item_template.sql rename to sql/320/03_item_template.sql diff --git a/sql/320/4_groups.sql b/sql/320/04_groups.sql similarity index 100% rename from sql/320/4_groups.sql rename to sql/320/04_groups.sql diff --git a/sql/320/5_battleground_template.sql b/sql/320/05_battleground_template.sql similarity index 100% rename from sql/320/5_battleground_template.sql rename to sql/320/05_battleground_template.sql diff --git a/sql/320/5_bugreport.sql b/sql/320/06_bugreport.sql similarity index 100% rename from sql/320/5_bugreport.sql rename to sql/320/06_bugreport.sql diff --git a/sql/320/6_spell_elixir.sql b/sql/320/07_spell_elixir.sql similarity index 100% rename from sql/320/6_spell_elixir.sql rename to sql/320/07_spell_elixir.sql diff --git a/sql/320/7_item_template.sql b/sql/320/08_item_template.sql similarity index 100% rename from sql/320/7_item_template.sql rename to sql/320/08_item_template.sql diff --git a/sql/320/8_spell_chain.sql b/sql/320/09_spell_chain.sql similarity index 100% rename from sql/320/8_spell_chain.sql rename to sql/320/09_spell_chain.sql diff --git a/sql/320/9_spell_proc_event.sql b/sql/320/10_spell_proc_event.sql similarity index 100% rename from sql/320/9_spell_proc_event.sql rename to sql/320/10_spell_proc_event.sql diff --git a/sql/320/11_characters.sql b/sql/320/11_characters.sql new file mode 100644 index 000000000..d4230084d --- /dev/null +++ b/sql/320/11_characters.sql @@ -0,0 +1,15 @@ +UPDATE characters SET data = REPLACE(data,' ',' '); +UPDATE characters SET data = CONCAT(TRIM(data),' '); + +UPDATE `characters` SET `data` = CONCAT( + SUBSTRING_INDEX(`data`, ' ', 1167 + 1), ' ', + '0 0 ', + SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 1246 + 1), ' ', -1246 + 1168 - 1), ' ', + '0 0 0 ', + SUBSTRING_INDEX(SUBSTRING_INDEX(`data`, ' ', 1294 + 1), ' ', -1294 + 1247 - 1), ' ', + '0 ' + ) +WHERE length(SUBSTRING_INDEX(data, ' ', 1294)) < length(data) and length(SUBSTRING_INDEX(data, ' ', 1294+1)) >= length(data); + +UPDATE characters SET data = REPLACE(data,' ',' '); +UPDATE characters SET data = CONCAT(TRIM(data),' ');