From 711858c43bdf58fe309a2a23cfc674bb1bbf894f Mon Sep 17 00:00:00 2001 From: Nay Date: Sat, 26 Nov 2011 14:49:15 +0000 Subject: Core/Quests: Update `quest_template` and SMSG_QUEST_QUERY_RESPONSE TODO: - Validate SkillId and reward it - Validate Currency, add it to the requires and reward it (after being able to read currency dbc) - Update other quest related opcodes --- sql/updates/world/2011_11_24_01_world_command.sql | 2 - .../2011_11_24_02_world_player_xp_for_level.sql | 7 ---- .../2011_11_25_02_world_item_script_names.sql | 17 -------- .../world/2011_11_25_02_world_item_template.sql | 48 ---------------------- .../2011_11_25_02_world_item_template_addon.sql | 38 ----------------- .../world/4.x/2011_11_24_01_world_command.sql | 2 + .../2011_11_24_02_world_player_xp_for_level.sql | 7 ++++ .../4.x/2011_11_25_02_world_item_script_names.sql | 17 ++++++++ .../4.x/2011_11_25_02_world_item_template.sql | 48 ++++++++++++++++++++++ .../2011_11_25_02_world_item_template_addon.sql | 38 +++++++++++++++++ .../4.x/2011_12_26_02_world_quest_template.sql | 31 ++++++++++++++ 11 files changed, 143 insertions(+), 112 deletions(-) delete mode 100644 sql/updates/world/2011_11_24_01_world_command.sql delete mode 100644 sql/updates/world/2011_11_24_02_world_player_xp_for_level.sql delete mode 100644 sql/updates/world/2011_11_25_02_world_item_script_names.sql delete mode 100644 sql/updates/world/2011_11_25_02_world_item_template.sql delete mode 100644 sql/updates/world/2011_11_25_02_world_item_template_addon.sql create mode 100644 sql/updates/world/4.x/2011_11_24_01_world_command.sql create mode 100644 sql/updates/world/4.x/2011_11_24_02_world_player_xp_for_level.sql create mode 100644 sql/updates/world/4.x/2011_11_25_02_world_item_script_names.sql create mode 100644 sql/updates/world/4.x/2011_11_25_02_world_item_template.sql create mode 100644 sql/updates/world/4.x/2011_11_25_02_world_item_template_addon.sql create mode 100644 sql/updates/world/4.x/2011_12_26_02_world_quest_template.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2011_11_24_01_world_command.sql b/sql/updates/world/2011_11_24_01_world_command.sql deleted file mode 100644 index 849a7538621..00000000000 --- a/sql/updates/world/2011_11_24_01_world_command.sql +++ /dev/null @@ -1,2 +0,0 @@ -UPDATE `command` SET `help`='Syntax: .account set addon [$account] #addon\n\nSet user (possible targeted) expansion addon level allowed. Addon values: 0 - normal, 1 - tbc, 2 - wotlk, 3 - cata.' WHERE `name`='account set addon'; -UPDATE `command` SET `help`='Syntax: .account addon #addon\nSet expansion addon level allowed. Addon values: 0 - normal, 1 - tbc, 2 - wotlk, 3 - cata.' WHERE `name`='account addon'; diff --git a/sql/updates/world/2011_11_24_02_world_player_xp_for_level.sql b/sql/updates/world/2011_11_24_02_world_player_xp_for_level.sql deleted file mode 100644 index d108b01824d..00000000000 --- a/sql/updates/world/2011_11_24_02_world_player_xp_for_level.sql +++ /dev/null @@ -1,7 +0,0 @@ -DELETE FROM `player_xp_for_level` WHERE `lvl` BETWEEN 80 AND 84; -INSERT INTO `player_xp_for_level` (`lvl`, `xp_for_next_level`) VALUES -(80, 1686300), -(81, 2121500), -(82, 4004000), -(83, 5203400), -(84, 9165100); diff --git a/sql/updates/world/2011_11_25_02_world_item_script_names.sql b/sql/updates/world/2011_11_25_02_world_item_script_names.sql deleted file mode 100644 index aaf843b91ae..00000000000 --- a/sql/updates/world/2011_11_25_02_world_item_script_names.sql +++ /dev/null @@ -1,17 +0,0 @@ -DROP TABLE IF EXISTS `item_script_names`; -CREATE TABLE `item_script_names` ( -`Id` int(10) unsigned not null, -`ScriptName` varchar(64) not null, -PRIMARY KEY(`Id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; - -INSERT INTO `item_script_names` -SELECT -`item_template`.`entry` AS `Id`, -`item_template`.`ScriptName` AS `ScriptName` -FROM -`item_template` -WHERE -length(`item_template`.`ScriptName`)>0; - -ALTER TABLE `item_template` DROP `ScriptName`; diff --git a/sql/updates/world/2011_11_25_02_world_item_template.sql b/sql/updates/world/2011_11_25_02_world_item_template.sql deleted file mode 100644 index 8a047ed9d11..00000000000 --- a/sql/updates/world/2011_11_25_02_world_item_template.sql +++ /dev/null @@ -1,48 +0,0 @@ -ALTER TABLE `item_template` - ADD `stat_unk1_1` int(11) not null default 0 AFTER `stat_value1`, - ADD `stat_unk2_1` int(11) not null default 0 AFTER `stat_unk1_1`, - ADD `stat_unk1_2` int(11) not null default 0 AFTER `stat_value2`, - ADD `stat_unk2_2` int(11) not null default 0 AFTER `stat_unk1_2`, - ADD `stat_unk1_3` int(11) not null default 0 AFTER `stat_value3`, - ADD `stat_unk2_3` int(11) not null default 0 AFTER `stat_unk1_3`, - ADD `stat_unk1_4` int(11) not null default 0 AFTER `stat_value4`, - ADD `stat_unk2_4` int(11) not null default 0 AFTER `stat_unk1_4`, - ADD `stat_unk1_5` int(11) not null default 0 AFTER `stat_value5`, - ADD `stat_unk2_5` int(11) not null default 0 AFTER `stat_unk1_5`, - ADD `stat_unk1_6` int(11) not null default 0 AFTER `stat_value6`, - ADD `stat_unk2_6` int(11) not null default 0 AFTER `stat_unk1_6`, - ADD `stat_unk1_7` int(11) not null default 0 AFTER `stat_value7`, - ADD `stat_unk2_7` int(11) not null default 0 AFTER `stat_unk1_7`, - ADD `stat_unk1_8` int(11) not null default 0 AFTER `stat_value8`, - ADD `stat_unk2_8` int(11) not null default 0 AFTER `stat_unk1_8`, - ADD `stat_unk1_9` int(11) not null default 0 AFTER `stat_value9`, - ADD `stat_unk2_9` int(11) not null default 0 AFTER `stat_unk1_9`, - ADD `stat_unk1_10` int(11) not null default 0 AFTER `stat_value10`, - ADD `stat_unk2_10` int(11) not null default 0 AFTER `stat_unk1_10`, - DROP `StatsCount`, - DROP `ScalingStatValue`, - CHANGE `dmg_type1` `DamageType` tinyint(3) unsigned not null default 0 AFTER `ScalingStatDistribution`, - DROP `dmg_min1`, - DROP `dmg_max1`, - DROP `dmg_min2`, - DROP `dmg_max2`, - DROP `dmg_type2`, - DROP `armor`, - DROP `holy_res`, - DROP `fire_res`, - DROP `nature_res`, - DROP `frost_res`, - DROP `shadow_res`, - DROP `arcane_res`, - DROP `ammo_type`, - DROP `spellppmRate_1`, - DROP `spellppmRate_2`, - DROP `spellppmRate_3`, - DROP `spellppmRate_4`, - DROP `spellppmRate_5`, - DROP `block`, - DROP `RequiredDisenchantSkill`, - DROP `DisenchantId`, - ADD `StatScalingFactor` float not null default 0 AFTER `HolidayId`, - ADD `Field130` int(11) not null default 0 AFTER `StatScalingFactor`, - ADD `Field131` int(11) not null default 0 AFTER `Field130`; diff --git a/sql/updates/world/2011_11_25_02_world_item_template_addon.sql b/sql/updates/world/2011_11_25_02_world_item_template_addon.sql deleted file mode 100644 index 2d99d9fc610..00000000000 --- a/sql/updates/world/2011_11_25_02_world_item_template_addon.sql +++ /dev/null @@ -1,38 +0,0 @@ -DROP TABLE IF EXISTS `item_template_addon`; -CREATE TABLE `item_template_addon` ( -`Id` int(10) unsigned not null, -`BuyCount` tinyint(3) unsigned not null default 1, -`FoodType` tinyint(3) unsigned not null default 0, -`MinMoneyLoot` int(10) unsigned not null default 0, -`MaxMoneyLoot` int(10) unsigned not null default 0, -`SpellPPMChance` float unsigned not null default 0, -PRIMARY KEY(`Id`) -) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; - -INSERT INTO `item_template_addon` -SELECT -`item_template`.`entry` AS `Id`, -`item_template`.`BuyCount` AS `BuyCount`, -`item_template`.`FoodType` AS `FoodType`, -`item_template`.`minMoneyLoot` AS `MinMoneyLoot`, -`item_template`.`maxMoneyLoot` AS `MaxMoneyLoot`, -ABS(IF(`item_template`.`spelltrigger_1`=2, `item_template`.`spellppmRate_1`, - IF (`item_template`.`spelltrigger_2`=2, `item_template`.`spellppmRate_2`, - IF (`item_template`.`spelltrigger_3`=2, `item_template`.`spellppmRate_3`, - IF (`item_template`.`spelltrigger_4`=2, `item_template`.`spellppmRate_4`, - IF (`item_template`.`spelltrigger_5`=2, `item_template`.`spellppmRate_5`, 0)))))) - AS `SpellPPMChance` -FROM -`item_template` -HAVING -- need to use having due to `SpellPPMChance` usage which is not an actual field in table -`item_template`.`BuyCount`!=1 OR -`item_template`.`FoodType`!=0 OR -(`item_template`.`minMoneyLoot`!=0 AND -`item_template`.`maxMoneyLoot`!=0) OR -`SpellPPMChance`!=0; - -ALTER TABLE `item_template` - DROP `BuyCount`, - DROP `FoodType`, - DROP `minMoneyLoot`, - DROP `maxMoneyLoot`; diff --git a/sql/updates/world/4.x/2011_11_24_01_world_command.sql b/sql/updates/world/4.x/2011_11_24_01_world_command.sql new file mode 100644 index 00000000000..849a7538621 --- /dev/null +++ b/sql/updates/world/4.x/2011_11_24_01_world_command.sql @@ -0,0 +1,2 @@ +UPDATE `command` SET `help`='Syntax: .account set addon [$account] #addon\n\nSet user (possible targeted) expansion addon level allowed. Addon values: 0 - normal, 1 - tbc, 2 - wotlk, 3 - cata.' WHERE `name`='account set addon'; +UPDATE `command` SET `help`='Syntax: .account addon #addon\nSet expansion addon level allowed. Addon values: 0 - normal, 1 - tbc, 2 - wotlk, 3 - cata.' WHERE `name`='account addon'; diff --git a/sql/updates/world/4.x/2011_11_24_02_world_player_xp_for_level.sql b/sql/updates/world/4.x/2011_11_24_02_world_player_xp_for_level.sql new file mode 100644 index 00000000000..d108b01824d --- /dev/null +++ b/sql/updates/world/4.x/2011_11_24_02_world_player_xp_for_level.sql @@ -0,0 +1,7 @@ +DELETE FROM `player_xp_for_level` WHERE `lvl` BETWEEN 80 AND 84; +INSERT INTO `player_xp_for_level` (`lvl`, `xp_for_next_level`) VALUES +(80, 1686300), +(81, 2121500), +(82, 4004000), +(83, 5203400), +(84, 9165100); diff --git a/sql/updates/world/4.x/2011_11_25_02_world_item_script_names.sql b/sql/updates/world/4.x/2011_11_25_02_world_item_script_names.sql new file mode 100644 index 00000000000..aaf843b91ae --- /dev/null +++ b/sql/updates/world/4.x/2011_11_25_02_world_item_script_names.sql @@ -0,0 +1,17 @@ +DROP TABLE IF EXISTS `item_script_names`; +CREATE TABLE `item_script_names` ( +`Id` int(10) unsigned not null, +`ScriptName` varchar(64) not null, +PRIMARY KEY(`Id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; + +INSERT INTO `item_script_names` +SELECT +`item_template`.`entry` AS `Id`, +`item_template`.`ScriptName` AS `ScriptName` +FROM +`item_template` +WHERE +length(`item_template`.`ScriptName`)>0; + +ALTER TABLE `item_template` DROP `ScriptName`; diff --git a/sql/updates/world/4.x/2011_11_25_02_world_item_template.sql b/sql/updates/world/4.x/2011_11_25_02_world_item_template.sql new file mode 100644 index 00000000000..8a047ed9d11 --- /dev/null +++ b/sql/updates/world/4.x/2011_11_25_02_world_item_template.sql @@ -0,0 +1,48 @@ +ALTER TABLE `item_template` + ADD `stat_unk1_1` int(11) not null default 0 AFTER `stat_value1`, + ADD `stat_unk2_1` int(11) not null default 0 AFTER `stat_unk1_1`, + ADD `stat_unk1_2` int(11) not null default 0 AFTER `stat_value2`, + ADD `stat_unk2_2` int(11) not null default 0 AFTER `stat_unk1_2`, + ADD `stat_unk1_3` int(11) not null default 0 AFTER `stat_value3`, + ADD `stat_unk2_3` int(11) not null default 0 AFTER `stat_unk1_3`, + ADD `stat_unk1_4` int(11) not null default 0 AFTER `stat_value4`, + ADD `stat_unk2_4` int(11) not null default 0 AFTER `stat_unk1_4`, + ADD `stat_unk1_5` int(11) not null default 0 AFTER `stat_value5`, + ADD `stat_unk2_5` int(11) not null default 0 AFTER `stat_unk1_5`, + ADD `stat_unk1_6` int(11) not null default 0 AFTER `stat_value6`, + ADD `stat_unk2_6` int(11) not null default 0 AFTER `stat_unk1_6`, + ADD `stat_unk1_7` int(11) not null default 0 AFTER `stat_value7`, + ADD `stat_unk2_7` int(11) not null default 0 AFTER `stat_unk1_7`, + ADD `stat_unk1_8` int(11) not null default 0 AFTER `stat_value8`, + ADD `stat_unk2_8` int(11) not null default 0 AFTER `stat_unk1_8`, + ADD `stat_unk1_9` int(11) not null default 0 AFTER `stat_value9`, + ADD `stat_unk2_9` int(11) not null default 0 AFTER `stat_unk1_9`, + ADD `stat_unk1_10` int(11) not null default 0 AFTER `stat_value10`, + ADD `stat_unk2_10` int(11) not null default 0 AFTER `stat_unk1_10`, + DROP `StatsCount`, + DROP `ScalingStatValue`, + CHANGE `dmg_type1` `DamageType` tinyint(3) unsigned not null default 0 AFTER `ScalingStatDistribution`, + DROP `dmg_min1`, + DROP `dmg_max1`, + DROP `dmg_min2`, + DROP `dmg_max2`, + DROP `dmg_type2`, + DROP `armor`, + DROP `holy_res`, + DROP `fire_res`, + DROP `nature_res`, + DROP `frost_res`, + DROP `shadow_res`, + DROP `arcane_res`, + DROP `ammo_type`, + DROP `spellppmRate_1`, + DROP `spellppmRate_2`, + DROP `spellppmRate_3`, + DROP `spellppmRate_4`, + DROP `spellppmRate_5`, + DROP `block`, + DROP `RequiredDisenchantSkill`, + DROP `DisenchantId`, + ADD `StatScalingFactor` float not null default 0 AFTER `HolidayId`, + ADD `Field130` int(11) not null default 0 AFTER `StatScalingFactor`, + ADD `Field131` int(11) not null default 0 AFTER `Field130`; diff --git a/sql/updates/world/4.x/2011_11_25_02_world_item_template_addon.sql b/sql/updates/world/4.x/2011_11_25_02_world_item_template_addon.sql new file mode 100644 index 00000000000..2d99d9fc610 --- /dev/null +++ b/sql/updates/world/4.x/2011_11_25_02_world_item_template_addon.sql @@ -0,0 +1,38 @@ +DROP TABLE IF EXISTS `item_template_addon`; +CREATE TABLE `item_template_addon` ( +`Id` int(10) unsigned not null, +`BuyCount` tinyint(3) unsigned not null default 1, +`FoodType` tinyint(3) unsigned not null default 0, +`MinMoneyLoot` int(10) unsigned not null default 0, +`MaxMoneyLoot` int(10) unsigned not null default 0, +`SpellPPMChance` float unsigned not null default 0, +PRIMARY KEY(`Id`) +) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC; + +INSERT INTO `item_template_addon` +SELECT +`item_template`.`entry` AS `Id`, +`item_template`.`BuyCount` AS `BuyCount`, +`item_template`.`FoodType` AS `FoodType`, +`item_template`.`minMoneyLoot` AS `MinMoneyLoot`, +`item_template`.`maxMoneyLoot` AS `MaxMoneyLoot`, +ABS(IF(`item_template`.`spelltrigger_1`=2, `item_template`.`spellppmRate_1`, + IF (`item_template`.`spelltrigger_2`=2, `item_template`.`spellppmRate_2`, + IF (`item_template`.`spelltrigger_3`=2, `item_template`.`spellppmRate_3`, + IF (`item_template`.`spelltrigger_4`=2, `item_template`.`spellppmRate_4`, + IF (`item_template`.`spelltrigger_5`=2, `item_template`.`spellppmRate_5`, 0)))))) + AS `SpellPPMChance` +FROM +`item_template` +HAVING -- need to use having due to `SpellPPMChance` usage which is not an actual field in table +`item_template`.`BuyCount`!=1 OR +`item_template`.`FoodType`!=0 OR +(`item_template`.`minMoneyLoot`!=0 AND +`item_template`.`maxMoneyLoot`!=0) OR +`SpellPPMChance`!=0; + +ALTER TABLE `item_template` + DROP `BuyCount`, + DROP `FoodType`, + DROP `minMoneyLoot`, + DROP `maxMoneyLoot`; diff --git a/sql/updates/world/4.x/2011_12_26_02_world_quest_template.sql b/sql/updates/world/4.x/2011_12_26_02_world_quest_template.sql new file mode 100644 index 00000000000..b43abd6f85d --- /dev/null +++ b/sql/updates/world/4.x/2011_12_26_02_world_quest_template.sql @@ -0,0 +1,31 @@ +ALTER TABLE `quest_template` ADD COLUMN `MinimapTargetMark` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `SpecialFlags`, + ADD COLUMN `RewardSkillId` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `RewardArenaPoints`, + ADD COLUMN `RewardSkillPoints` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `RewardSkillId`, + ADD COLUMN `RewardReputationMask` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `RewardSkillPoints`, + ADD COLUMN `QuestGiverPortrait` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0' AFTER `RewardReputationMask`, + ADD COLUMN `QuestTurnInPortrait` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0' AFTER `QuestGiverPortrait`, + ADD COLUMN `RequiredSpell` MEDIUMINT(8) UNSIGNED NOT NULL DEFAULT '0' AFTER `RequiredItemCount6`, + ADD COLUMN `RewardCurrencyId1` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `ObjectiveText4`, + ADD COLUMN `RewardCurrencyId2` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `RewardCurrencyId1`, + ADD COLUMN `RewardCurrencyId3` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `RewardCurrencyId2`, + ADD COLUMN `RewardCurrencyId4` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `RewardCurrencyId3`, + ADD COLUMN `RewardCurrencyCount1` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `RewardCurrencyId4`, + ADD COLUMN `RewardCurrencyCount2` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `RewardCurrencyCount1`, + ADD COLUMN `RewardCurrencyCount3` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `RewardCurrencyCount2`, + ADD COLUMN `RewardCurrencyCount4` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `RewardCurrencyCount3`, + ADD COLUMN `RequiredCurrencyId1` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `RewardCurrencyCount4`, + ADD COLUMN `RequiredCurrencyId2` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `RequiredCurrencyId1`, + ADD COLUMN `RequiredCurrencyId3` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `RequiredCurrencyId2`, + ADD COLUMN `RequiredCurrencyId4` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '0' AFTER `RequiredCurrencyId3`, + ADD COLUMN `RequiredCurrencyCount1` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `RequiredCurrencyId4`, + ADD COLUMN `RequiredCurrencyCount2` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `RequiredCurrencyCount1`, + ADD COLUMN `RequiredCurrencyCount3` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `RequiredCurrencyCount2`, + ADD COLUMN `RequiredCurrencyCount4` TINYINT(3) UNSIGNED NOT NULL DEFAULT '0' AFTER `RequiredCurrencyCount3`, + ADD COLUMN `QuestGiverTextWindow` TEXT NULL DEFAULT NULL AFTER `RequiredCurrencyCount4`, + ADD COLUMN `QuestGiverTargetName` TEXT NULL DEFAULT NULL AFTER `QuestGiverTextWindow`, + ADD COLUMN `QuestTurnTextWindow` TEXT NULL DEFAULT NULL AFTER `QuestGiverTargetName`, + ADD COLUMN `QuestTurnTargetName` TEXT NULL DEFAULT NULL AFTER `QuestTurnTextWindow`, + ADD COLUMN `SoundAccept` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '890' AFTER `QuestTurnTargetName`, + ADD COLUMN `SoundTurnIn` SMALLINT(5) UNSIGNED NOT NULL DEFAULT '878' AFTER `SoundAccept`; + +ALTER TABLE `quest_template` DROP COLUMN `Unknown0`; -- Not found on 422 -- cgit v1.2.3