mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2025-11-29 17:38:24 +08:00
restructured repository based on following standards:
https://github.com/HW-Core/directory-structure
This commit is contained in:
9
data/sql/structure/CHARACTERS_BREW_OF_THE_MONTH.sql
Normal file
9
data/sql/structure/CHARACTERS_BREW_OF_THE_MONTH.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
-- ----------------------------
|
||||
-- Table structure for character_brew_of_the_month
|
||||
-- ----------------------------
|
||||
DROP TABLE IF EXISTS `character_brew_of_the_month`;
|
||||
CREATE TABLE `character_brew_of_the_month` (
|
||||
`guid` int(10) unsigned NOT NULL,
|
||||
`lastEventId` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`guid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
9
data/sql/structure/CHARACTERS_CHANNELS.sql
Normal file
9
data/sql/structure/CHARACTERS_CHANNELS.sql
Normal file
@@ -0,0 +1,9 @@
|
||||
CREATE TABLE `channels` (
|
||||
`channelId` int(10) unsigned NOT NULL AUTO_INCREMENT,
|
||||
`name` varchar(128) NOT NULL,
|
||||
`team` int(10) unsigned NOT NULL,
|
||||
`announce` tinyint(3) unsigned NOT NULL DEFAULT '1',
|
||||
`password` varchar(32) DEFAULT NULL,
|
||||
`lastUsed` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`channelId`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Channel System';
|
||||
6
data/sql/structure/CHARACTERS_CHANNELS_BANS.sql
Normal file
6
data/sql/structure/CHARACTERS_CHANNELS_BANS.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
CREATE TABLE `channels_bans` (
|
||||
`channelId` int(10) unsigned NOT NULL,
|
||||
`playerGUID` int(10) unsigned NOT NULL,
|
||||
`banTime` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`channelId`,`playerGUID`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
19
data/sql/structure/CHARACTERS_CHANNELS_RIGHTS.sql
Normal file
19
data/sql/structure/CHARACTERS_CHANNELS_RIGHTS.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
CREATE TABLE `channels_rights` (
|
||||
`name` varchar(128) NOT NULL,
|
||||
`flags` int(10) unsigned NOT NULL,
|
||||
`speakdelay` int(10) unsigned NOT NULL,
|
||||
`joinmessage` varchar(255) NOT NULL DEFAULT '',
|
||||
`delaymessage` varchar(255) NOT NULL DEFAULT '',
|
||||
`moderators` text,
|
||||
PRIMARY KEY (`name`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
INSERT INTO `channels_rights` VALUES ('2v2', 509, 0, '', '', NULL);
|
||||
INSERT INTO `channels_rights` VALUES ('3v3', 509, 0, '', '', NULL);
|
||||
INSERT INTO `channels_rights` VALUES ('5v5', 509, 0, '', '', NULL);
|
||||
INSERT INTO `channels_rights` VALUES ('bg', 509, 0, '', '', NULL);
|
||||
INSERT INTO `channels_rights` VALUES ('guar', 209, 60, 'Kanal |cFFFF0000GUAR|r sluzy wylacznie do szukania/reklamowania gildii i szukania/reklamowania teamow arenowych. Rozmowy na inny temat, wulgaryzmy, trollowanie, chamstwo i lamanie regulaminu w jakikolwiek inny sposob beda skutkowaly blokada kanalu.', '', '');
|
||||
INSERT INTO `channels_rights` VALUES ('handel', 209, 60, 'Kanal |cFFFF0000HANDEL|r sluzy wylacznie do handlu. Rozmowy na inny temat, wulgaryzmy, trollowanie, chamstwo i lamanie regulaminu w jakikolwiek inny sposob beda skutkowaly blokada kanalu.', '', '');
|
||||
INSERT INTO `channels_rights` VALUES ('lfg', 209, 60, 'Kanal |cFFFF0000LFG|r sluzy wylacznie do szukania grupy (nie gildii, nie teamu arenowego!). Rozmowy na inny temat, wulgaryzmy, trollowanie, chamstwo i lamanie regulaminu w jakikolwiek inny sposob beda skutkowaly blokada kanalu.', 'Consider using Raid Browser: /rb (AddOn on forums)', '');
|
||||
INSERT INTO `channels_rights` VALUES ('pl', 217, 5, 'Kanal |cFFFF0000PL|r zostal zablokowany. Informacje na temat nowych kanalow globalnych znajdziesz w regulaminie serwera.', '', NULL);
|
||||
INSERT INTO `channels_rights` VALUES ('world', 209, 5, 'Kanal |cFFFF0000WORLD|r sluzy wylacznie do luznych rozmow. Handel, szukanie grupy, szukanie partnerow, reklamowanie gildii i inne podobne = blokada kanalu. Wulgaryzmy, trollowanie, chamstwo i lamanie regulaminu takze beda skutkowaly blokada kanalu.', '', '');
|
||||
2
data/sql/structure/CHARACTERS_CHARACTER_ARENA_STATS.sql
Normal file
2
data/sql/structure/CHARACTERS_CHARACTER_ARENA_STATS.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE character_arena_stats ADD COLUMN maxMMR SMALLINT(5) NOT NULL;
|
||||
UPDATE character_arena_stats SET maxMMR = matchMakerRating;
|
||||
11
data/sql/structure/CHARACTERS_CHARACTER_ENTRY_POINT.sql
Normal file
11
data/sql/structure/CHARACTERS_CHARACTER_ENTRY_POINT.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
CREATE TABLE IF NOT EXISTS `character_entry_point` (
|
||||
`guid` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Global Unique Identifier',
|
||||
`joinX` float NOT NULL DEFAULT '0',
|
||||
`joinY` float NOT NULL DEFAULT '0',
|
||||
`joinZ` float NOT NULL DEFAULT '0',
|
||||
`joinO` float NOT NULL DEFAULT '0',
|
||||
`joinMapId` int(10) unsigned NOT NULL DEFAULT '0' COMMENT 'Map Identifier',
|
||||
`taxiPath` text,
|
||||
`mountSpell` int(10) unsigned NOT NULL DEFAULT '0',
|
||||
PRIMARY KEY (`guid`)
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8 COMMENT='Player System';
|
||||
2
data/sql/structure/CHARACTERS_CHARACTER_PET.sql
Normal file
2
data/sql/structure/CHARACTERS_CHARACTER_PET.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `character_pet` CHANGE `CreatedBySpell` `CreatedBySpell` int(10) unsigned NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `character_pet` CHANGE `level` `level` tinyint(3) unsigned NOT NULL DEFAULT '0';
|
||||
@@ -0,0 +1 @@
|
||||
ALTER TABLE character_spell_cooldown ADD COLUMN `needSend` tinyint(3) unsigned NOT NULL DEFAULT '1';
|
||||
2
data/sql/structure/CHARACTERS_INSTANCE_ID.sql
Normal file
2
data/sql/structure/CHARACTERS_INSTANCE_ID.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
DROP TABLE IF EXISTS group_instance;
|
||||
ALTER TABLE character_instance ADD COLUMN extended tinyint(3) unsigned NOT NULL DEFAULT 0;
|
||||
11
data/sql/structure/CHARACTERS_ITEM_LOOT_STORAGE.sql
Normal file
11
data/sql/structure/CHARACTERS_ITEM_LOOT_STORAGE.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
|
||||
DROP TABLE IF EXISTS item_loot_items; -- TC SHIT
|
||||
DROP TABLE IF EXISTS item_loot_money; -- TC SHIT
|
||||
CREATE TABLE `item_loot_storage` (
|
||||
`containerGUID` int(10) unsigned NOT NULL,
|
||||
`itemid` int(10) unsigned NOT NULL,
|
||||
`count` int(10) unsigned NOT NULL,
|
||||
`randomPropertyId` int(10) NOT NULL,
|
||||
`randomSuffix` int(10) unsigned NOT NULL
|
||||
) ENGINE=InnoDB DEFAULT CHARSET=utf8;
|
||||
|
||||
17
data/sql/structure/CHARACTERS_LOG_ARENA_FIGHTS.sql
Normal file
17
data/sql/structure/CHARACTERS_LOG_ARENA_FIGHTS.sql
Normal file
@@ -0,0 +1,17 @@
|
||||
CREATE TABLE `log_arena_fights` (
|
||||
`fight_id` int(10) unsigned NOT NULL,
|
||||
`time` datetime NOT NULL,
|
||||
`type` tinyint(3) unsigned NOT NULL,
|
||||
`duration` int(10) unsigned NOT NULL,
|
||||
`winner` int(10) unsigned NOT NULL,
|
||||
`loser` int(10) unsigned NOT NULL,
|
||||
`winner_tr` smallint(5) unsigned NOT NULL,
|
||||
`winner_mmr` smallint(5) unsigned NOT NULL,
|
||||
`winner_tr_change` smallint(6) NOT NULL,
|
||||
`loser_tr` smallint(5) unsigned NOT NULL,
|
||||
`loser_mmr` smallint(5) unsigned NOT NULL,
|
||||
`loser_tr_change` smallint(6) NOT NULL,
|
||||
`currOnline` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`fight_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
14
data/sql/structure/CHARACTERS_LOG_ARENA_MEMBERSTATS.sql
Normal file
14
data/sql/structure/CHARACTERS_LOG_ARENA_MEMBERSTATS.sql
Normal file
@@ -0,0 +1,14 @@
|
||||
CREATE TABLE `log_arena_memberstats` (
|
||||
`fight_id` int(10) unsigned NOT NULL,
|
||||
`member_id` tinyint(3) unsigned NOT NULL,
|
||||
`name` char(20) NOT NULL,
|
||||
`guid` int(10) unsigned NOT NULL,
|
||||
`team` int(10) unsigned NOT NULL,
|
||||
`account` int(10) unsigned NOT NULL,
|
||||
`ip` char(15) NOT NULL,
|
||||
`damage` int(10) unsigned NOT NULL,
|
||||
`heal` int(10) unsigned NOT NULL,
|
||||
`kblows` int(10) unsigned NOT NULL,
|
||||
PRIMARY KEY (`fight_id`,`member_id`)
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
|
||||
8
data/sql/structure/CHARACTERS_LOG_ENCOUNTER.sql
Normal file
8
data/sql/structure/CHARACTERS_LOG_ENCOUNTER.sql
Normal file
@@ -0,0 +1,8 @@
|
||||
CREATE TABLE `log_encounter` (
|
||||
`time` datetime NOT NULL,
|
||||
`map` smallint(5) unsigned NOT NULL,
|
||||
`difficulty` tinyint(3) unsigned NOT NULL,
|
||||
`creditType` tinyint(3) unsigned NOT NULL,
|
||||
`creditEntry` int(10) unsigned NOT NULL,
|
||||
`playersInfo` text NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=utf8;
|
||||
11
data/sql/structure/CHARACTERS_LOG_MONEY.sql
Normal file
11
data/sql/structure/CHARACTERS_LOG_MONEY.sql
Normal file
@@ -0,0 +1,11 @@
|
||||
CREATE TABLE `log_money` (
|
||||
`sender_acc` int(11) unsigned NOT NULL,
|
||||
`sender_guid` int(11) unsigned NOT NULL,
|
||||
`sender_name` char(32) CHARACTER SET utf8 NOT NULL,
|
||||
`sender_ip` char(32) CHARACTER SET utf8 NOT NULL,
|
||||
`receiver_acc` int(11) unsigned NOT NULL,
|
||||
`receiver_name` char(32) CHARACTER SET utf8 NOT NULL,
|
||||
`money` bigint(20) unsigned NOT NULL,
|
||||
`topic` char(255) CHARACTER SET utf8 NOT NULL,
|
||||
`date` datetime NOT NULL
|
||||
) ENGINE=MyISAM DEFAULT CHARSET=latin1;
|
||||
10
data/sql/structure/CHARACTERS_SPELLS_RUN_ONCE.sql
Normal file
10
data/sql/structure/CHARACTERS_SPELLS_RUN_ONCE.sql
Normal file
@@ -0,0 +1,10 @@
|
||||
ALTER TABLE character_spell DROP COLUMN `active`;
|
||||
ALTER TABLE character_spell DROP COLUMN `disabled`;
|
||||
ALTER TABLE character_spell ADD `specMask` tinyint(3) unsigned NOT NULL DEFAULT 255;
|
||||
|
||||
TRUNCATE TABLE character_talent;
|
||||
TRUNCATE TABLE character_aura;
|
||||
ALTER TABLE character_talent CHANGE `spec` `specMask` tinyint(3) unsigned NOT NULL DEFAULT 0;
|
||||
|
||||
UPDATE characters SET speccount=1 WHERE speccount=0;
|
||||
|
||||
1
data/sql/structure/WORLD_SKILL_EXTRA_ITEM_TEMPLATE.sql
Normal file
1
data/sql/structure/WORLD_SKILL_EXTRA_ITEM_TEMPLATE.sql
Normal file
@@ -0,0 +1 @@
|
||||
ALTER TABLE `skill_extra_item_template` CHANGE `additionalMaxNum` `newMaxOrEntry` mediumint(8) NOT NULL DEFAULT '0';
|
||||
2
data/sql/structure/WORLD_SMART_SCRIPTS.sql
Normal file
2
data/sql/structure/WORLD_SMART_SCRIPTS.sql
Normal file
@@ -0,0 +1,2 @@
|
||||
ALTER TABLE `smart_scripts` CHANGE `event_flags` `event_flags` smallint(5) unsigned NOT NULL DEFAULT '0';
|
||||
ALTER TABLE `smart_scripts` CHANGE `event_phase_mask` `event_phase_mask` smallint(5) unsigned NOT NULL DEFAULT '0';
|
||||
11224
data/sql/structure/convert_tc_spells/1_CREATE_CLEANUP_TABLES.sql
Normal file
11224
data/sql/structure/convert_tc_spells/1_CREATE_CLEANUP_TABLES.sql
Normal file
File diff suppressed because it is too large
Load Diff
@@ -0,0 +1,144 @@
|
||||
ALTER TABLE character_spell DROP COLUMN `active`;
|
||||
ALTER TABLE character_spell DROP COLUMN `disabled`;
|
||||
ALTER TABLE character_spell ADD `specMask` tinyint(3) unsigned NOT NULL DEFAULT 255;
|
||||
|
||||
TRUNCATE TABLE character_talent;
|
||||
TRUNCATE TABLE character_aura;
|
||||
ALTER TABLE character_talent CHANGE `spec` `specMask` tinyint(3) unsigned NOT NULL DEFAULT 0;
|
||||
|
||||
UPDATE characters SET speccount=1 WHERE speccount=0;
|
||||
|
||||
|
||||
DELETE s FROM character_spell s JOIN __del_ability_spell t ON s.spell=t.spell; -- Remove all spells from spellability.dbc
|
||||
DELETE s FROM character_spell s JOIN __del_override_spell t ON s.spell=t.spell; -- Remove all spells from overridespell.dbc
|
||||
DELETE s FROM character_spell s JOIN __del_shapeshift_spell t ON s.spell=t.spell; -- Remove all spells from shapeshift.dbc
|
||||
DELETE s FROM character_spell s JOIN __del_spell_learn_spell t ON s.spell=t.spell; -- Remove all spells from old spell_learn_spell table
|
||||
DELETE s FROM character_spell s JOIN __del_talent_rest_ranks t ON s.spell=t.spell; -- Remove all talents which should not be in character_spell table
|
||||
DELETE s FROM character_spell s JOIN __playercreateinfo_spell t ON s.spell=t.spell JOIN characters c ON s.guid = c.guid WHERE (t.racemask=0 OR (1<<(c.race-1))&t.racemask) AND (t.classmask=0 OR (1<<(c.class-1))&t.classmask); -- Remove all spells from playercreateinfo_spell
|
||||
DELETE s FROM character_spell s JOIN __profession_autolearn t ON s.spell=t.spell; -- Remove all spells that are automatically learned from certain skill level
|
||||
DELETE s FROM character_spell s JOIN characters c ON s.guid = c.guid WHERE s.spell = 674 AND c.class = 7; -- Remove Dual Wield From shamans
|
||||
DELETE s FROM character_spell s JOIN __del_talent_pyroblast t1 ON s.spell=t1.spell LEFT JOIN __del_talent_pyroblast2 t2 ON t1.spell=t2.spell WHERE t2.spell IS NULL;
|
||||
|
||||
|
||||
-- restore lower ranks not saved (dependant was not saved)
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell_id, 255 FROM character_spell s JOIN __spell_ranks t ON s.spell = t.spell_id JOIN __spell_ranks t2 ON t.first_spell_id=t2.first_spell_id AND (t.rank-1)=t2.rank WHERE t.rank=16);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell_id, 255 FROM character_spell s JOIN __spell_ranks t ON s.spell = t.spell_id JOIN __spell_ranks t2 ON t.first_spell_id=t2.first_spell_id AND (t.rank-1)=t2.rank WHERE t.rank=15);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell_id, 255 FROM character_spell s JOIN __spell_ranks t ON s.spell = t.spell_id JOIN __spell_ranks t2 ON t.first_spell_id=t2.first_spell_id AND (t.rank-1)=t2.rank WHERE t.rank=14);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell_id, 255 FROM character_spell s JOIN __spell_ranks t ON s.spell = t.spell_id JOIN __spell_ranks t2 ON t.first_spell_id=t2.first_spell_id AND (t.rank-1)=t2.rank WHERE t.rank=13);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell_id, 255 FROM character_spell s JOIN __spell_ranks t ON s.spell = t.spell_id JOIN __spell_ranks t2 ON t.first_spell_id=t2.first_spell_id AND (t.rank-1)=t2.rank WHERE t.rank=12);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell_id, 255 FROM character_spell s JOIN __spell_ranks t ON s.spell = t.spell_id JOIN __spell_ranks t2 ON t.first_spell_id=t2.first_spell_id AND (t.rank-1)=t2.rank WHERE t.rank=11);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell_id, 255 FROM character_spell s JOIN __spell_ranks t ON s.spell = t.spell_id JOIN __spell_ranks t2 ON t.first_spell_id=t2.first_spell_id AND (t.rank-1)=t2.rank WHERE t.rank=10);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell_id, 255 FROM character_spell s JOIN __spell_ranks t ON s.spell = t.spell_id JOIN __spell_ranks t2 ON t.first_spell_id=t2.first_spell_id AND (t.rank-1)=t2.rank WHERE t.rank=9);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell_id, 255 FROM character_spell s JOIN __spell_ranks t ON s.spell = t.spell_id JOIN __spell_ranks t2 ON t.first_spell_id=t2.first_spell_id AND (t.rank-1)=t2.rank WHERE t.rank=8);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell_id, 255 FROM character_spell s JOIN __spell_ranks t ON s.spell = t.spell_id JOIN __spell_ranks t2 ON t.first_spell_id=t2.first_spell_id AND (t.rank-1)=t2.rank WHERE t.rank=7);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell_id, 255 FROM character_spell s JOIN __spell_ranks t ON s.spell = t.spell_id JOIN __spell_ranks t2 ON t.first_spell_id=t2.first_spell_id AND (t.rank-1)=t2.rank WHERE t.rank=6);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell_id, 255 FROM character_spell s JOIN __spell_ranks t ON s.spell = t.spell_id JOIN __spell_ranks t2 ON t.first_spell_id=t2.first_spell_id AND (t.rank-1)=t2.rank WHERE t.rank=5);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell_id, 255 FROM character_spell s JOIN __spell_ranks t ON s.spell = t.spell_id JOIN __spell_ranks t2 ON t.first_spell_id=t2.first_spell_id AND (t.rank-1)=t2.rank WHERE t.rank=4);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell_id, 255 FROM character_spell s JOIN __spell_ranks t ON s.spell = t.spell_id JOIN __spell_ranks t2 ON t.first_spell_id=t2.first_spell_id AND (t.rank-1)=t2.rank WHERE t.rank=3);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell_id, 255 FROM character_spell s JOIN __spell_ranks t ON s.spell = t.spell_id JOIN __spell_ranks t2 ON t.first_spell_id=t2.first_spell_id AND (t.rank-1)=t2.rank WHERE t.rank=2);
|
||||
|
||||
|
||||
UPDATE character_spell SET specMask=255; -- Set specMask of all spells to 255
|
||||
UPDATE character_spell s JOIN __del_talent_pyroblast t ON s.spell=t.spell SET specMask=0; -- Set specMask to 0 for spells added to spellbook
|
||||
|
||||
|
||||
-- Add missing profession spells
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell, 255 FROM character_spell s JOIN __profession_skill t ON s.spell = t.spell JOIN __profession_skill t2 ON t.skill=t2.skill AND (t.rank-1)=t2.rank WHERE t.rank=6);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell, 255 FROM character_spell s JOIN __profession_skill t ON s.spell = t.spell JOIN __profession_skill t2 ON t.skill=t2.skill AND (t.rank-1)=t2.rank WHERE t.rank=5);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell, 255 FROM character_spell s JOIN __profession_skill t ON s.spell = t.spell JOIN __profession_skill t2 ON t.skill=t2.skill AND (t.rank-1)=t2.rank WHERE t.rank=4);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell, 255 FROM character_spell s JOIN __profession_skill t ON s.spell = t.spell JOIN __profession_skill t2 ON t.skill=t2.skill AND (t.rank-1)=t2.rank WHERE t.rank=3);
|
||||
INSERT IGNORE INTO character_spell (SELECT s.guid, t2.spell, 255 FROM character_spell s JOIN __profession_skill t ON s.spell = t.spell JOIN __profession_skill t2 ON t.skill=t2.skill AND (t.rank-1)=t2.rank WHERE t.rank=2);
|
||||
|
||||
|
||||
-- Insert skill if missing (core would do this, but we need it for the queries below)
|
||||
INSERT IGNORE INTO character_skills (SELECT s.guid, t.skill, 1, t.maxvalue FROM __profession_skill t JOIN character_spell s ON t.spell = s.spell WHERE t.rank=6);
|
||||
INSERT IGNORE INTO character_skills (SELECT s.guid, t.skill, 1, t.maxvalue FROM __profession_skill t JOIN character_spell s ON t.spell = s.spell WHERE t.rank=5);
|
||||
INSERT IGNORE INTO character_skills (SELECT s.guid, t.skill, 1, t.maxvalue FROM __profession_skill t JOIN character_spell s ON t.spell = s.spell WHERE t.rank=4);
|
||||
INSERT IGNORE INTO character_skills (SELECT s.guid, t.skill, 1, t.maxvalue FROM __profession_skill t JOIN character_spell s ON t.spell = s.spell WHERE t.rank=3);
|
||||
INSERT IGNORE INTO character_skills (SELECT s.guid, t.skill, 1, t.maxvalue FROM __profession_skill t JOIN character_spell s ON t.spell = s.spell WHERE t.rank=2);
|
||||
INSERT IGNORE INTO character_skills (SELECT s.guid, t.skill, 1, t.maxvalue FROM __profession_skill t JOIN character_spell s ON t.spell = s.spell WHERE t.rank=1);
|
||||
|
||||
|
||||
-- Update max allowed skill based on spells
|
||||
UPDATE character_skills cs JOIN __profession_skill t ON cs.skill = t.skill LEFT JOIN character_spell s ON cs.guid = s.guid AND t.spell = s.spell SET cs.max=(t.maxvalue-75) WHERE t.rank=6 AND s.guid IS NULL AND cs.max > (t.maxvalue-75);
|
||||
UPDATE character_skills cs JOIN __profession_skill t ON cs.skill = t.skill LEFT JOIN character_spell s ON cs.guid = s.guid AND t.spell = s.spell SET cs.max=(t.maxvalue-75) WHERE t.rank=5 AND s.guid IS NULL AND cs.max > (t.maxvalue-75);
|
||||
UPDATE character_skills cs JOIN __profession_skill t ON cs.skill = t.skill LEFT JOIN character_spell s ON cs.guid = s.guid AND t.spell = s.spell SET cs.max=(t.maxvalue-75) WHERE t.rank=4 AND s.guid IS NULL AND cs.max > (t.maxvalue-75);
|
||||
UPDATE character_skills cs JOIN __profession_skill t ON cs.skill = t.skill LEFT JOIN character_spell s ON cs.guid = s.guid AND t.spell = s.spell SET cs.max=(t.maxvalue-75) WHERE t.rank=3 AND s.guid IS NULL AND cs.max > (t.maxvalue-75);
|
||||
UPDATE character_skills cs JOIN __profession_skill t ON cs.skill = t.skill LEFT JOIN character_spell s ON cs.guid = s.guid AND t.spell = s.spell SET cs.max=(t.maxvalue-75) WHERE t.rank=2 AND s.guid IS NULL AND cs.max > (t.maxvalue-75);
|
||||
UPDATE character_skills cs JOIN __profession_skill t ON cs.skill = t.skill LEFT JOIN character_spell s ON cs.guid = s.guid AND t.spell = s.spell SET cs.max=(t.maxvalue-75) WHERE t.rank=1 AND s.guid IS NULL AND cs.max > (t.maxvalue-75);
|
||||
DELETE FROM character_skills WHERE max=0;
|
||||
UPDATE character_skills SET value=max WHERE value>max;
|
||||
|
||||
|
||||
-- Remove primary professions when having more than 2!
|
||||
-- first delete skill
|
||||
SET @cnt := 0;
|
||||
SET @prevguid := 0;
|
||||
DELETE s FROM character_skills s JOIN ((SELECT guid, skill FROM ((SELECT IF(@prevguid <> cs.guid, @cnt := 1, @cnt := @cnt+1) AS cnt, (@prevguid := guid) AS guid, cs.skill AS skill FROM character_skills cs JOIN __profession_skill t ON cs.skill = t.skill AND t.rank=6 ORDER BY cs.guid, cs.skill) x) WHERE cnt>2) x2) ON s.guid = x2.guid AND s.skill = x2.skill;
|
||||
-- now delete main profession spells if skill is missing
|
||||
DELETE s FROM character_spell s JOIN __profession_skill t ON s.spell = t.spell LEFT JOIN character_skills cs ON s.guid = cs.guid AND t.skill = cs.skill WHERE cs.guid IS NULL;
|
||||
|
||||
|
||||
-- PROFESSION SPECIALTY DATA!
|
||||
-- TRUNCATE TABLE __profession_spell_req_spell;
|
||||
-- Alchemy (rank 1 - 2259): 28672 (transmute), 28677 (elixir), 28675 (potion)
|
||||
-- Blacksmithing (rank 1 - 2018): 9788 (armorsmith), 9787 (weaponsmith) -- Weaponsmith: 17040 (hammer), 17041 (axe), 17039 (sword)
|
||||
-- Leatherworking (rank 1 - 2108): 10656 (dragon), 10658 (elemental), 10660 (tribal)
|
||||
-- Tailoring (rank 1 - 3908): 26798 (mooncloth), 26801 (shadoweave), 26797 (spellfire)
|
||||
-- Engineering (rank 1 - 4036): 20222 (goblin), 20219 (gnomish)
|
||||
-- INSERT INTO __profession_spell_req_spell VALUES(28672, 2259), (28677, 2259), (28675, 2259);
|
||||
-- INSERT INTO __profession_spell_req_spell VALUES(9788, 2018), (9787, 2018), (17040, 9787), (17041, 9787), (17039, 9787);
|
||||
-- INSERT INTO __profession_spell_req_spell VALUES(10656, 2108), (10658, 2108), (10660, 2108);
|
||||
-- INSERT INTO __profession_spell_req_spell VALUES(26798, 3908), (26801, 3908), (26797, 3908);
|
||||
-- INSERT INTO __profession_spell_req_spell VALUES(20222, 4036), (20219, 4036);
|
||||
-- THERE ARE ALSO SPECIALTY RECIPES IN THIS TABLE!
|
||||
-- INSERT INTO __profession_spell_req_spell VALUES(36125, 9787), (36128, 9787), (36126, 9787); -- Weaponsmith
|
||||
-- INSERT INTO __profession_spell_req_spell VALUES(36122, 9788), (36129, 9788), (36130, 9788), (34533, 9788), (34529, 9788), (34534, 9788), (36257, 9788), (36256, 9788), (34530, 9788), (36124, 9788); -- Armorsmith
|
||||
-- INSERT INTO __profession_spell_req_spell VALUES(36262, 17040), (34546, 17040), (34545, 17040), (36136, 17040), (34547, 17040), (34567, 17040), (36263, 17040), (36137, 17040); -- Hammersmith
|
||||
-- INSERT INTO __profession_spell_req_spell VALUES(36260, 17041), (34562, 17041), (34541, 17041), (36134, 17041), (36135, 17041), (36261, 17041), (34543, 17041), (34544, 17041); -- Axesmith
|
||||
-- INSERT INTO __profession_spell_req_spell VALUES(36258, 17039), (34537, 17039), (34535, 17039), (36131, 17039), (36133, 17039), (34538, 17039), (34540, 17039), (36259, 17039); -- Swordsmith
|
||||
-- INSERT INTO __profession_spell_req_spell VALUES(36076, 10656), (36079, 10656), (35576, 10656), (35577, 10656), (35575, 10656), (35582, 10656), (35584, 10656), (35580, 10656); -- Dragon
|
||||
-- INSERT INTO __profession_spell_req_spell VALUES(36074, 10658), (36077, 10658), (35590, 10658), (35591, 10658), (35589, 10658); -- Elemental
|
||||
-- INSERT INTO __profession_spell_req_spell VALUES(35585, 10660), (35587, 10660), (35588, 10660), (36075, 10660), (36078, 10660); -- Tribal
|
||||
-- INSERT INTO __profession_spell_req_spell VALUES(26752, 26797), (26753, 26797), (26754, 26797); -- Spellfire
|
||||
-- INSERT INTO __profession_spell_req_spell VALUES(26760, 26798), (26761, 26798), (26762, 26798); -- Mooncloth
|
||||
-- INSERT INTO __profession_spell_req_spell VALUES(26756, 26801), (26757, 26801), (26758, 26801); -- Shadoweave
|
||||
|
||||
|
||||
-- Remove double specialties (always leaves last from the list above)
|
||||
-- Alchemy
|
||||
DELETE s FROM character_spell s JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=28677 WHERE s.spell=28672;
|
||||
DELETE s FROM character_spell s JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=28675 WHERE s.spell=28672;
|
||||
DELETE s FROM character_spell s JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=28675 WHERE s.spell=28677;
|
||||
-- Blacksmithing
|
||||
DELETE s FROM character_spell s JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=9787 WHERE s.spell=9788;
|
||||
DELETE s FROM character_spell s JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=17041 WHERE s.spell=17040;
|
||||
DELETE s FROM character_spell s JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=17039 WHERE s.spell=17040;
|
||||
DELETE s FROM character_spell s JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=17039 WHERE s.spell=17041;
|
||||
-- Leatherworking
|
||||
DELETE s FROM character_spell s JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=10658 WHERE s.spell=10656;
|
||||
DELETE s FROM character_spell s JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=10660 WHERE s.spell=10656;
|
||||
DELETE s FROM character_spell s JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=10660 WHERE s.spell=10658;
|
||||
-- Tailoring
|
||||
DELETE s FROM character_spell s JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=26801 WHERE s.spell=26798;
|
||||
DELETE s FROM character_spell s JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=26797 WHERE s.spell=26798;
|
||||
DELETE s FROM character_spell s JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=26797 WHERE s.spell=26801;
|
||||
-- Engineering
|
||||
DELETE s FROM character_spell s JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=20219 WHERE s.spell=20222;
|
||||
|
||||
|
||||
-- Remove spells missing their required spell
|
||||
-- Run 3 times: first - normal specialty is removed, second - recipes from specialty and specialty of specialty (blacksmithing only), third - recipes of specialty of specialty
|
||||
DELETE s FROM character_spell s JOIN __profession_spell_req_spell t ON s.spell = t.spell LEFT JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=t.reqspell WHERE s2.guid IS NULL;
|
||||
DELETE s FROM character_spell s JOIN __profession_spell_req_spell t ON s.spell = t.spell LEFT JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=t.reqspell WHERE s2.guid IS NULL;
|
||||
DELETE s FROM character_spell s JOIN __profession_spell_req_spell t ON s.spell = t.spell LEFT JOIN character_spell s2 ON s.guid = s2.guid AND s2.spell=t.reqspell WHERE s2.guid IS NULL;
|
||||
|
||||
|
||||
-- Remove spells missing their required skill (the same spells are removed when setting skill to 0)
|
||||
DELETE s FROM character_spell s JOIN __profession_spell_req_skill t ON s.spell = t.spell LEFT JOIN character_skills cs ON s.guid = cs.guid AND t.reqskill = cs.skill WHERE cs.guid IS NULL;
|
||||
|
||||
|
||||
-- GBoS fix
|
||||
update character_spell s left join character_talent t on s.guid = t.guid and t.spell = 20911 set s.specMask=0 where s.spell = 25899 and t.guid IS NULL;
|
||||
update character_spell s join character_talent t on s.guid = t.guid and t.spell = 20911 set s.specMask=t.specMask where s.spell = 25899;
|
||||
|
||||
Reference in New Issue
Block a user