AzerothCore 3.3.5a
OpenSource WoW Emulator
Loading...
Searching...
No Matches
HolidayDateCalculator.cpp File Reference
#include "HolidayDateCalculator.h"
#include "SharedDefines.h"
#include <cmath>

Go to the source code of this file.

Functions

double sind (double deg)
 

Variables

constexpr double PI = 3.14159265358979323846
 
constexpr double DEG_TO_RAD = PI / 180.0
 
static const std::vector< HolidayRuleHolidayRules
 

Function Documentation

◆ sind()

double sind ( double  deg)
inline
27{ return std::sin(deg * DEG_TO_RAD); }
constexpr double DEG_TO_RAD
Definition HolidayDateCalculator.cpp:24

References DEG_TO_RAD.

Referenced by HolidayDateCalculator::CalculateNewMoon().

Variable Documentation

◆ DEG_TO_RAD

constexpr double DEG_TO_RAD = PI / 180.0
constexpr

◆ HolidayRules

const std::vector<HolidayRule> HolidayRules
static
30 {
31 // Lunar Festival: Chinese New Year - 1 day (event starts day before CNY)
33
34 // Love is in the Air: First Monday on or after Feb 3
36
37 // Noblegarden: Day after Easter Sunday (Easter + 1 day)
39
40 // Children's Week: First Monday on or after Apr 25 (Monday closest to May 1)
42
43 // Midsummer Fire Festival: Fixed Jun 21
45
46 // Fireworks Spectacular: Fixed Jul 4
48
49 // Pirates' Day: Fixed Sep 19
51
52 // Brewfest: Fixed Sept 20 main event, prep starts Sept 13
54
55 // Harvest Festival: 2 days before autumn equinox (Sept 20-21)
57
58 // Hallow's End: Fixed Oct 18
60
61 // Day of the Dead: Fixed Nov 1
63
64 // Pilgrim's Bounty: Sunday before Thanksgiving (4th Thursday - 4 days)
66
67 // Winter Veil: 6 days before winter solstice (Dec 15-16)
69
70 // Darkmoon Faire: First Sunday of months matching (month % 3 == locationOffset)
71 // Rotates monthly: Mulgore (Jan) -> Terokkar (Feb) -> Elwynn (Mar) -> repeat
72 // rule.month stores the location offset
73 // rule.offset is -2 (building phase starts Friday, 2 days before faire opens on Sunday)
74 { HOLIDAY_DARKMOON_FAIRE_ELWYNN, HolidayCalculationType::DARKMOON_FAIRE, 0, 0, 0, -2 }, // Mar, Jun, Sep, Dec
75 { HOLIDAY_DARKMOON_FAIRE_THUNDER, HolidayCalculationType::DARKMOON_FAIRE, 1, 0, 0, -2 }, // Jan, Apr, Jul, Oct
77};
@ HOLIDAY_NOBLEGARDEN
Definition SharedDefines.h:2986
@ HOLIDAY_DARKMOON_FAIRE_THUNDER
Definition SharedDefines.h:3000
@ HOLIDAY_HALLOWS_END
Definition SharedDefines.h:2993
@ HOLIDAY_DARKMOON_FAIRE_ELWYNN
Definition SharedDefines.h:2999
@ HOLIDAY_FIRE_FESTIVAL
Definition SharedDefines.h:2996
@ HOLIDAY_DARKMOON_FAIRE_SHATTRATH
Definition SharedDefines.h:3001
@ HOLIDAY_CHILDRENS_WEEK
Definition SharedDefines.h:2987
@ HOLIDAY_FEAST_OF_WINTER_VEIL
Definition SharedDefines.h:2985
@ HOLIDAY_LOVE_IS_IN_THE_AIR
Definition SharedDefines.h:3008
@ HOLIDAY_FIREWORKS_SPECTACULAR
Definition SharedDefines.h:2984
@ HOLIDAY_PILGRIMS_BOUNTY
Definition SharedDefines.h:3004
@ HOLIDAY_HARVEST_FESTIVAL
Definition SharedDefines.h:2992
@ HOLIDAY_DAY_OF_DEAD
Definition SharedDefines.h:3006
@ HOLIDAY_PIRATES_DAY
Definition SharedDefines.h:3002
@ HOLIDAY_LUNAR_FESTIVAL
Definition SharedDefines.h:2994
@ HOLIDAY_BREWFEST
Definition SharedDefines.h:2998

Referenced by HolidayDateCalculator::GetHolidayRules(), and HolidayDateCalculator::GetPackedHolidayDate().

◆ PI

constexpr double PI = 3.14159265358979323846
constexpr