mirror of
https://github.com/mod-playerbots/azerothcore-wotlk.git
synced 2026-01-21 20:56:23 +00:00
feat(Core/Common): add new helpers for time utility (#10207)
This commit is contained in:
@@ -1849,7 +1849,7 @@ void GameEventMgr::SetHolidayEventTime(GameEventData& event)
|
||||
tm timeInfo;
|
||||
if (singleDate)
|
||||
{
|
||||
localtime_r(&curTime, &timeInfo);
|
||||
timeInfo = Acore::Time::TimeBreakdown(curTime);
|
||||
timeInfo.tm_year -= 1; // First try last year (event active through New Year)
|
||||
}
|
||||
else
|
||||
@@ -1873,8 +1873,7 @@ void GameEventMgr::SetHolidayEventTime(GameEventData& event)
|
||||
}
|
||||
else if (singleDate)
|
||||
{
|
||||
tm tmCopy;
|
||||
localtime_r(&curTime, &tmCopy);
|
||||
tm tmCopy = Acore::Time::TimeBreakdown(curTime);
|
||||
int year = tmCopy.tm_year; // This year
|
||||
tmCopy = timeInfo;
|
||||
tmCopy.tm_year = year;
|
||||
|
||||
Reference in New Issue
Block a user