mirror of
https://github.com/TrinityCore/TrinityCore.git
synced 2026-01-22 10:05:32 +01:00
Core/GameEvent: Use game_event table for blizzard birthday
This commit is contained in:
6
sql/updates/world/2014_04_26_01_world_game_event.sql
Normal file
6
sql/updates/world/2014_04_26_01_world_game_event.sql
Normal file
@@ -0,0 +1,6 @@
|
||||
DELETE FROM `game_event` `eventEntry` IN (65,66,67,68);
|
||||
INSERT INTO `game_event` (`eventEntry`, `start_time`, `end_time`, `occurence`, `length`, `holiday`, `description`, `world_event`, `announce`) VALUES
|
||||
(65, '2011-11-20 00:01:00', '2011-12-03 23:59:00', 525600, 336, 467, 'WoW''s 7th Anniversary', 0, 2),
|
||||
(66, '2012-11-18 00:01:00', '2012-12-01 23:59:00', 525600, 336, 484, 'WoW''s 8th Anniversary', 0, 2),
|
||||
(67, '2013-11-18 00:01:00', '2013-12-01 23:59:00', 525600, 336, 0/*509*/, 'WoW''s 9th Anniversary', 0, 2),
|
||||
(68, '2014-11-17 00:01:00', '2014-12-01 23:59:00', 525600, 336, 0/*514*/, 'WoW''s 10th Anniversary', 0, 2);
|
||||
@@ -380,19 +380,10 @@ bool AchievementCriteriaData::Meets(uint32 criteria_id, Player const* source, Un
|
||||
return pProto->ItemLevel >= equipped_item.item_level && pProto->Quality >= equipped_item.item_quality;
|
||||
}
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_NTH_BIRTHDAY:
|
||||
{
|
||||
time_t birthday_start = time_t(sWorld->getIntConfig(CONFIG_BIRTHDAY_TIME));
|
||||
|
||||
tm birthday_tm;
|
||||
ACE_OS::localtime_r(&birthday_start, &birthday_tm);
|
||||
|
||||
// exactly N birthday
|
||||
birthday_tm.tm_year += birthday_login.nth_birthday;
|
||||
|
||||
time_t birthday = mktime(&birthday_tm);
|
||||
time_t now = sWorld->GetGameTime();
|
||||
return now <= birthday + DAY && now >= birthday;
|
||||
}
|
||||
return (IsHolidayActive(HOLIDAY_ANNIVERSARY_7_YEARS) ||
|
||||
IsHolidayActive(HOLIDAY_ANNIVERSARY_8_YEARS) ||
|
||||
IsEventActive(67 /*HOLIDAY_ANNIVERSARY_9_YEARS = 509*/) ||
|
||||
IsEventActive(68 /*HOLIDAY_ANNIVERSARY_10_YEARS = 514*/));
|
||||
case ACHIEVEMENT_CRITERIA_DATA_TYPE_S_KNOWN_TITLE:
|
||||
{
|
||||
if (CharTitlesEntry const* titleInfo = sCharTitlesStore.LookupEntry(known_title.title_id))
|
||||
|
||||
@@ -1297,8 +1297,6 @@ void World::LoadConfigSettings(bool reload)
|
||||
|
||||
m_int_configs[CONFIG_PACKET_SPOOF_BANDURATION] = sConfigMgr->GetIntDefault("PacketSpoof.BanDuration", 86400);
|
||||
|
||||
m_int_configs[CONFIG_BIRTHDAY_TIME] = sConfigMgr->GetIntDefault("BirthdayTime", 1222964635);
|
||||
|
||||
// call ScriptMgr if we're reloading the configuration
|
||||
if (reload)
|
||||
sScriptMgr->OnConfigLoad(reload);
|
||||
|
||||
@@ -347,7 +347,6 @@ enum WorldIntConfigs
|
||||
CONFIG_BG_REWARD_LOSER_HONOR_LAST,
|
||||
CONFIG_BG_REWARD_WINNER_CONQUEST_FIRST,
|
||||
CONFIG_BG_REWARD_WINNER_CONQUEST_LAST,
|
||||
CONFIG_BIRTHDAY_TIME,
|
||||
INT_CONFIG_VALUE_COUNT
|
||||
};
|
||||
|
||||
|
||||
@@ -1041,15 +1041,6 @@ AccountInstancesPerHour = 5
|
||||
|
||||
Account.PasswordChangeSecurity = 0
|
||||
|
||||
#
|
||||
# BirthdayTime
|
||||
# Description: Set to date of project's birth in UNIX time. By default the date when TrinityCore was started (Thu Oct 2, 2008)
|
||||
# Default: 1222964635
|
||||
#
|
||||
#
|
||||
|
||||
BirthdayTime = 1222964635
|
||||
|
||||
#
|
||||
###################################################################################################
|
||||
|
||||
|
||||
Reference in New Issue
Block a user