Core/Threading: Replaced localtime with threadsafe ACE_OS::localtime_r call
This commit is contained in:
@@ -22294,7 +22294,8 @@ void Player::AddSpellAndCategoryCooldowns(SpellInfo const* spellInfo, uint32 ite
|
||||
ASSERT(categoryEntry);
|
||||
if (categoryEntry->Flags & SPELL_CATEGORY_FLAG_COOLDOWN_EXPIRES_AT_MIDNIGHT)
|
||||
{
|
||||
struct tm date = *localtime(&curTime);
|
||||
tm date;
|
||||
ACE_OS::localtime_r(&curTime, &date);
|
||||
catrec = catrec * DAY - (date.tm_hour * HOUR + date.tm_min * MINUTE + date.tm_sec) * IN_MILLISECONDS;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user