Core/Threading: Replaced localtime with threadsafe ACE_OS::localtime_r call

This commit is contained in:
Shauren
2013-10-27 17:23:21 +01:00
parent 73e02597b6
commit bf2c0505ad
+2 -1
View File
@@ -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;
}
}