-- update20070221.sql
CREATE TABLE `repair_character_quests` (
  `char_id` INT NOT NULL DEFAULT 0,
   `cond` VARCHAR(40) NOT NULL DEFAULT '',
   PRIMARY KEY  (`char_id`,`cond`)
   );
 
INSERT INTO `repair_character_quests` SELECT `char_id`,`value` FROM `character_quests` WHERE `name` = '336_CoinOfMagic' and `var`= 'cond';

UPDATE `character_quests`,repair_character_quests  SET 
character_quests.`value` = 'Solo' 
WHERE character_quests.`name` = '336_CoinOfMagic' and 
character_quests.`var` = '<state>' and character_quests.`value` = 'Started' and 
character_quests.`char_id` =  repair_character_quests.`char_id` AND  repair_character_quests.`cond` < 4;

UPDATE `character_quests`,repair_character_quests  SET 
character_quests.`value` = 'Party' WHERE character_quests.`name` = '336_CoinOfMagic' and 
character_quests.`var` = '<state>' and character_quests.`value` = 'Started' and 
character_quests.`char_id` =  repair_character_quests.`char_id` AND  repair_character_quests.`cond` >= 4;

DROP TABLE `repair_character_quests`;

-- update20070223.sql
ALTER TABLE raidboss_spawnlist DROP respawn_delay;
ALTER TABLE raidboss_spawnlist ADD respawn_min_delay INT( 11 ) NOT NULL default '43200' AFTER heading; -- 12 (36-24) hours
ALTER TABLE raidboss_spawnlist ADD respawn_max_delay INT( 11 ) NOT NULL default '129600' AFTER respawn_min_delay; -- 36 hours
DELETE FROM raidboss_spawnlist WHERE boss_id IN (25328, 25339, 25342, 25346, 25349); -- remove Shadow of Halisha and Hellman spawns (possible exploits)