From 27f091806a6f52f406837d188dd4171019bfa59b Mon Sep 17 00:00:00 2001 From: Subv Date: Tue, 16 Oct 2012 21:43:23 -0500 Subject: Core/SpellAreas: Changed the way quest_start and quest_end works. They now follow this rule: The player's quest status of quest_start must have the mask defined in quest_start_status in order for the spell to be applied/kept. The player's quest status of quest_end must _NOT_ have the mask defined in quest_end_status in order for the spell to be removed To generate the mask: Take the QuestStatus enum in QuestDef.h, use (1 << theValueYouWant) to obtain a mask and you can use | to combine masks. This expands the usage of the spell_area table, making possible to give a player an aura while he has a quest, but remove it as soon as the quest is completed (not rewarded). Feature request by @Svannon --- sql/updates/world/2012_10_16_00_world_spell_area.sql | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 sql/updates/world/2012_10_16_00_world_spell_area.sql (limited to 'sql/updates') diff --git a/sql/updates/world/2012_10_16_00_world_spell_area.sql b/sql/updates/world/2012_10_16_00_world_spell_area.sql new file mode 100644 index 00000000000..3dbc29d077f --- /dev/null +++ b/sql/updates/world/2012_10_16_00_world_spell_area.sql @@ -0,0 +1,4 @@ +ALTER TABLE `spell_area` ADD COLUMN `quest_start_status` INT(11) NOT NULL DEFAULT 64; -- default is QUEST_STATUS_REWARDED +ALTER TABLE `spell_area` ADD COLUMN `quest_end_status` INT(11) NOT NULL DEFAULT 11; -- default is QUEST_STATUS_COMPLETE | QUEST_STATUS_NONE | QUEST_STATUS_INCOMPLETE +UPDATE spell_area SET `quest_start_status` = (1 << 6) | (1 << 3) | (1 << 1) WHERE `quest_start_active` = 1; +ALTER TABLE spell_area DROP COLUMN `quest_start_active`; \ No newline at end of file -- cgit v1.2.3