Core/Misc: Handle timezones for hour-specific events specifieds in worldserver.conf
Port From (https://github.com/TrinityCore/TrinityCore/commit/493fe066f6b107a9f356d693c5d37d878d3a63eb)
This commit is contained in:
@@ -34,9 +34,10 @@ namespace Scripts.World
|
||||
|
||||
bool IsXPBoostActive()
|
||||
{
|
||||
var now = Time.UnixTimeToDateTime(GameTime.GetGameTime());
|
||||
long time = GameTime.GetGameTime();
|
||||
var localTm = Time.UnixTimeToDateTime(time);
|
||||
uint weekdayMaskBoosted = WorldConfig.GetUIntValue(WorldCfg.XpBoostDaymask);
|
||||
uint weekdayMask = (1u << now.Day);
|
||||
uint weekdayMask = 1u << localTm.Day;
|
||||
bool currentDayBoosted = (weekdayMask & weekdayMaskBoosted) != 0;
|
||||
return currentDayBoosted;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user