diff options
| author | Giacomo Pozzoni <giacomopoz@gmail.com> | 2019-07-19 21:24:56 +0200 |
|---|---|---|
| committer | Shauren <shauren.trinity@gmail.com> | 2021-12-16 22:35:44 +0100 |
| commit | 493fe066f6b107a9f356d693c5d37d878d3a63eb (patch) | |
| tree | 3039d6c3a031f716a6a8f369181a92828380df63 /src/server/scripts | |
| parent | 53c41b28216dd75309ea918e9c8a5387a7a2cf5d (diff) | |
Core/Misc: Handle timezones for hour-specific events specifieds in worldserver.conf (#23540)
* Core/Misc: Handle timezones for hour-specific events specifieds in worldserver.conf
* Handle Respawn.RestartQuietTime too
* Handle XP.Boost.Daymask too
* Core/Misc: Code cleanup
* Core/Misc: Code cleanup
* Update Util.cpp
* Update boosted_xp.cpp
(cherry picked from commit aeddd417c460c43d885cb89ceaa6e051c44b1d27)
Diffstat (limited to 'src/server/scripts')
| -rw-r--r-- | src/server/scripts/World/boosted_xp.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/server/scripts/World/boosted_xp.cpp b/src/server/scripts/World/boosted_xp.cpp index d65a1b812c2..240dc4b34f7 100644 --- a/src/server/scripts/World/boosted_xp.cpp +++ b/src/server/scripts/World/boosted_xp.cpp @@ -17,17 +17,17 @@ #include "GameTime.h" #include "ScriptMgr.h" +#include "Util.h" #include "World.h" -#include <boost/date_time/posix_time/posix_time.hpp> - namespace { bool IsXPBoostActive() { - auto now = boost::posix_time::to_tm(boost::posix_time::from_time_t(GameTime::GetGameTime())); + time_t time = GameTime::GetGameTime(); + tm localTm = TimeBreakdown(time); uint32 weekdayMaskBoosted = sWorld->getIntConfig(CONFIG_XP_BOOST_DAYMASK); - uint32 weekdayMask = (1 << now.tm_wday); + uint32 weekdayMask = (1 << localTm.tm_wday); bool currentDayBoosted = (weekdayMask & weekdayMaskBoosted) != 0; return currentDayBoosted; } |
