diff options
| author | Giacomo Pozzoni <giacomopoz@gmail.com> | 2019-07-19 21:24:56 +0200 |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2019-07-19 21:24:56 +0200 |
| commit | aeddd417c460c43d885cb89ceaa6e051c44b1d27 (patch) | |
| tree | 589e76b3c39940dec7e8db8240224220d4893090 /src/server/scripts | |
| parent | fbd0fe26ee239f7cf80004d771b96df3f9ae1274 (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
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 df03dab4a81..9d73e5afadf 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; } |
