[10655] Add support for monthly quests

Quest that can repeated each month are set by quest_template.SpecialFlags |0x04 flag
Quest are reset at midnight the first day of each month.
Note: for the time being, quest must also be set repeatable (SpecialFlags |0x01)

Signed-off-by: NoFantasy <nofantasy@nf.no>
This commit is contained in:
NoFantasy 2010-10-29 20:38:09 +02:00
parent 331a7e7f5b
commit a38f97f71c
12 changed files with 218 additions and 13 deletions

View file

@ -21,7 +21,7 @@
DROP TABLE IF EXISTS `character_db_version`;
CREATE TABLE `character_db_version` (
`required_10568_01_characters_character_tutorial` bit(1) default NULL
`required_10655_01_characters_character_queststatus_monthly` bit(1) default NULL
) ENGINE=MyISAM DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Last applied sql update to DB';
--
@ -725,6 +725,27 @@ LOCK TABLES `character_queststatus_daily` WRITE;
/*!40000 ALTER TABLE `character_queststatus_daily` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `character_queststatus_monthly`
--
DROP TABLE IF EXISTS `character_queststatus_monthly`;
CREATE TABLE `character_queststatus_monthly` (
`guid` int(11) unsigned NOT NULL default '0' COMMENT 'Global Unique Identifier',
`quest` int(11) unsigned NOT NULL default '0' COMMENT 'Quest Identifier',
PRIMARY KEY (`guid`,`quest`),
KEY `idx_guid` (`guid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Player System';
--
-- Dumping data for table `character_queststatus_monthly`
--
LOCK TABLES `character_queststatus_monthly` WRITE;
/*!40000 ALTER TABLE `character_queststatus_monthly` DISABLE KEYS */;
/*!40000 ALTER TABLE `character_queststatus_monthly` ENABLE KEYS */;
UNLOCK TABLES;
--
-- Table structure for table `character_queststatus_weekly`
--
@ -1624,6 +1645,7 @@ CREATE TABLE `saved_variables` (
`NextArenaPointDistributionTime` bigint(40) UNSIGNED NOT NULL DEFAULT '0',
`NextDailyQuestResetTime` bigint(40) unsigned NOT NULL default '0',
`NextWeeklyQuestResetTime` bigint(40) unsigned NOT NULL default '0',
`NextMonthlyQuestResetTime` bigint(40) unsigned NOT NULL default '0',
`cleaning_flags` int(11) unsigned NOT NULL default '0'
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=FIXED COMMENT='Variable Saves';

View file

@ -0,0 +1,12 @@
ALTER TABLE character_db_version CHANGE COLUMN required_10568_01_characters_character_tutorial required_10655_01_characters_character_queststatus_monthly bit;
DROP TABLE IF EXISTS character_queststatus_monthly;
CREATE TABLE character_queststatus_monthly (
guid int(11) unsigned NOT NULL default '0' COMMENT 'Global Unique Identifier',
quest int(11) unsigned NOT NULL default '0' COMMENT 'Quest Identifier',
PRIMARY KEY (guid,quest),
KEY idx_guid (guid)
) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='Player System';
ALTER TABLE saved_variables
ADD COLUMN NextMonthlyQuestResetTime bigint(40) unsigned NOT NULL default '0' AFTER NextWeeklyQuestResetTime;

View file

@ -110,6 +110,7 @@ pkgdata_DATA = \
10628_01_mangos_mangos_string.sql \
10629_01_mangos_mangos_string.sql \
10654_01_mangos_game_event_creature_quest.sql \
10655_01_characters_character_queststatus_monthly.sql \
README
## Additional files to include when running 'make dist'
@ -200,4 +201,5 @@ EXTRA_DIST = \
10628_01_mangos_mangos_string.sql \
10629_01_mangos_mangos_string.sql \
10654_01_mangos_game_event_creature_quest.sql \
10655_01_characters_character_queststatus_monthly.sql \
README