Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[10621] Add new field RequiredClasses for quest_template
* SkillOrClass is converted to RequiredSkill (and then field can contain skill id only) * Field ZoneOrSort has no longer a function in quest requirement, and RequiredClasses must be used instead where class limits are expected. To restrict a quest to one class or more, use bitmask of class in RequiredClasses. RequiredSkill works like before. Signed-off-by: NoFantasy <nofantasy@nf.no>
- Loading branch information
NoFantasy
committed
Oct 18, 2010
1 parent
93b2f8f
commit a946ebc
Showing
10 changed files
with
199 additions
and
166 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,40 @@ | ||
ALTER TABLE db_version CHANGE COLUMN required_10604_01_mangos_spell_proc_event required_10621_01_mangos_quest_template bit; | ||
|
||
ALTER TABLE quest_template ADD COLUMN RequiredClasses smallint(5) unsigned NOT NULL default '0' AFTER Type; | ||
|
||
UPDATE quest_template | ||
SET RequiredClasses = RequiredClasses| | ||
CASE SkillOrClass | ||
WHEN -1 THEN 1 -- warrior | ||
WHEN -2 THEN 2 -- paladin | ||
WHEN -3 THEN 4 -- hunter | ||
WHEN -4 THEN 8 -- rogue | ||
WHEN -5 THEN 16 -- priest | ||
WHEN -6 THEN 32 -- dk | ||
WHEN -7 THEN 64 -- shaman | ||
WHEN -8 THEN 128 -- mage | ||
WHEN -9 THEN 256 -- warlock | ||
WHEN -11 THEN 1024 -- druid | ||
ELSE 0 | ||
END | ||
WHERE SkillOrClass < 0; | ||
|
||
UPDATE quest_template | ||
SET RequiredClasses = RequiredClasses| | ||
CASE ZoneOrSort | ||
WHEN -81 THEN 1 -- warrior | ||
WHEN -141 THEN 2 -- paladin | ||
WHEN -261 THEN 4 -- hunter | ||
WHEN -162 THEN 8 -- rogue | ||
WHEN -262 THEN 16 -- priest | ||
WHEN -372 THEN 32 -- dk | ||
WHEN -82 THEN 64 -- shaman | ||
WHEN -161 THEN 128 -- mage | ||
WHEN -61 THEN 256 -- warlock | ||
WHEN -263 THEN 1024 -- druid | ||
ELSE 0 | ||
END | ||
WHERE ZoneOrSort < 0; | ||
|
||
UPDATE quest_template SET SkillOrClass=0 WHERE SkillOrClass<0; | ||
ALTER TABLE quest_template CHANGE COLUMN SkillOrClass RequiredSkill smallint(5) unsigned NOT NULL default '0' AFTER RequiredRaces; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.