Core/Misc: Replace time(NULL) with GameTime::GetGameTime()

(ported commit: 12701cb0c6c45eb105ad449eb9a56e76d84d691e)
This commit is contained in:
Ovahlord committed 2019-07-08 12:19:19 +02:00
1 parent ba38f74816
commit 5fe3a1f7f9
68 files changed
+335 -259

No files matched your search

+2 -2
View File
@@ -12313,7 +12313,7 @@ bool Unit::SetCharmedBy(Unit* charmer, CharmType type, AuraApplication const* au
GetCharmInfo()->SetPetNumber(sObjectMgr->GeneratePetNumber(), true);
// if charmed two demons the same session, the 2nd gets the 1st one's name
SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(time(nullptr))); // cast can't be helped
SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(GameTime::GetGameTime())); // cast can't be helped
}
}
playerCharmer->CharmSpellInitialize();
@@ -14740,7 +14740,7 @@ void Unit::UpdateLastDamagedTime(SpellInfo const* spellProto)
if (spellProto && spellProto->HasAura(SPELL_AURA_DAMAGE_SHIELD))
return;
SetLastDamagedTime(time(nullptr));
SetLastDamagedTime(GameTime::GetGameTime());
}
bool Unit::IsHighestExclusiveAura(Aura const* aura, bool removeOtherAuraApplications /*= false*/)