Skip to content

Commit

Permalink
Spell: Move SpellTotems DBC into database
Browse files Browse the repository at this point in the history
  • Loading branch information
Niam5 committed May 25, 2024
1 parent cd2780a commit 68e9302
Show file tree
Hide file tree
Showing 9 changed files with 2,729 additions and 43 deletions.
13 changes: 13 additions & 0 deletions sql/base/dbc/cmangos_fixes/SpellTotems.sql
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
ALTER TABLE spell_template ADD `TotemCategory1` INT UNSIGNED NOT NULL DEFAULT '0' AFTER SpellTotemsId;
ALTER TABLE spell_template ADD `TotemCategory2` INT UNSIGNED NOT NULL DEFAULT '0' AFTER TotemCategory1;
ALTER TABLE spell_template ADD `Totem1` INT UNSIGNED NOT NULL DEFAULT '0' AFTER TotemCategory2;
ALTER TABLE spell_template ADD `Totem2` INT UNSIGNED NOT NULL DEFAULT '0' AFTER Totem1;

UPDATE spell_template INNER JOIN spell_totems ON (spell_template.SpellTotemsId = spell_totems.Id) SET spell_template.TotemCategory1 = spell_totems.TotemCategory1;
UPDATE spell_template INNER JOIN spell_totems ON (spell_template.SpellTotemsId = spell_totems.Id) SET spell_template.TotemCategory2 = spell_totems.TotemCategory2;
UPDATE spell_template INNER JOIN spell_totems ON (spell_template.SpellTotemsId = spell_totems.Id) SET spell_template.Totem1 = spell_totems.Totem1;
UPDATE spell_template INNER JOIN spell_totems ON (spell_template.SpellTotemsId = spell_totems.Id) SET spell_template.Totem2 = spell_totems.Totem2;

ALTER TABLE spell_template DROP COLUMN SpellTotemsId;

DROP TABLE spell_totems;
Loading

0 comments on commit 68e9302

Please sign in to comment.