TrinityCore
Loading...
Searching...
No Matches
GameTime Namespace Reference

Functions

time_t GetStartTime ()
 
time_t GetGameTime ()
 
uint32 GetGameTimeMS ()
 
SystemTimePoint GetSystemTime ()
 Current chrono system_clock time point.
 
TimePoint Now ()
 Current chrono steady_clock time point.
 
uint32 GetUptime ()
 Uptime (in secs)
 
WowTime const * GetUtcWowTime ()
 
WowTime const * GetWowTime ()
 
void UpdateGameTimers ()
 

Variables

time_t const StartTime = time(nullptr)
 
time_t GameTime = time(nullptr)
 
uint32 GameMSTime = 0
 
SystemTimePoint GameTimeSystemPoint = SystemTimePoint ::min()
 
TimePoint GameTimeSteadyPoint = TimePoint::min()
 
WowTime UtcWow
 
WowTime Wow
 

Function Documentation

◆ GetGameTime()

TC_GAME_API time_t GameTime::GetGameTime ( )

Definition at line 42 of file GameTime.cpp.

References GameTime.

Referenced by Player::_LoadQuestStatus(), Battleground::_ProcessOfflineQueue(), InstanceSaveManager::_ResetOrWarnAll(), Player::_SaveQuestStatus(), World::_UpdateGameTime(), InstanceSaveManager::AddInstanceSave(), Player::AddItemToBuyBackSlot(), AuctionBotSeller::AddNewAuctions(), Player::AddNewMailDeliverTime(), Player::AddQuest(), Creature::AllLootRemovedFromCorpse(), AuctionEntry::BuildAuctionInfo(), AuctionHouseObject::BuildListAuctionItems(), AuctionBotBuyer::BuyAndBidItems(), Player::CalculateCorpseReclaimDelay(), Creature::CanCreatureAttack(), Creature::CanGeneratePickPocketLoot(), WorldSession::CanSpeak(), lfg::LFGQueue::CheckCompatibility(), GameEventMgr::CheckOneGameEvent(), GameEventMgr::CheckOneGameEventConditions(), World::CheckQuestResetTimes(), Map::CheckRespawn(), PassengerController::ClearSlot(), AchievementMgr::CompletedAchievement(), Corpse::Corpse(), Player::Create(), Guild::Create(), Unit::DealDamage(), Player::DeleteOldCharacters(), CalendarMgr::DeleteOldEvents(), boss_magus_telestra::DoAction(), boss_ignis::boss_ignis_AI::DoAction(), Battleground::EventPlayerLoggedOut(), BattlefieldWG::FillInitialWorldStates(), Pet::FillPetInfo(), Creature::ForcedDespawn(), InstanceSaveManager::ForceGlobalReset(), GmTicket::FormatMessageString(), GetAge(), Player::GetCorpseReclaimDelay(), AuctionBotBuyer::GetItemInformation(), Player::GetNextResetTalentsCost(), Item::GetPlayedTime(), Creature::GetRespawnTimeEx(), GameObject::GetRespawnTimeEx(), Creature::GetVendorItemCurrentCount(), WorldSession::HandleAuctionSellItem(), WorldSocket::HandleAuthSessionCallback(), ban_commandscript::HandleBanInfoCharacterCommand(), ban_commandscript::HandleBanInfoHelper(), WorldSession::HandleCalendarAddEvent(), WorldSession::HandleCalendarCopyEvent(), WorldSession::HandleCalendarEventRsvp(), WorldSession::HandleCalendarEventSignup(), WorldSession::HandleCalendarGetCalendar(), WorldSession::HandleChatMessage(), WorldSession::HandleDuelAccepted(), event_commandscript::HandleEventInfoCommand(), gobject_commandscript::HandleGameObjectTargetCommand(), WorldSession::HandleGetMailList(), instance_commandscript::HandleInstanceListBindsCommand(), instance_commandscript::HandleInstanceUnbindCommand(), list_commandscript::HandleListRespawnsCommand(), WorldSession::HandleLogoutRequestOpcode(), WorldSession::HandleMailCreateTextItem(), WorldSession::HandleMailReturnToSender(), WorldSession::HandleMailTakeItem(), WorldSession::HandleMailTakeMoney(), WorldSession::HandleMoveWorldportAck(), misc_commandscript::HandleMuteCommand(), npc_commandscript::HandleNpcInfoCommand(), WorldSession::HandlePetRename(), misc_commandscript::HandlePInfoCommand(), Battlefield::HandlePlayerEnterZone(), WorldSession::HandleQueryNextMailTime(), WorldSession::HandleReclaimCorpse(), WorldSession::HandleReportLag(), Guild::HandleRoster(), WorldSession::HandleTextEmoteOpcode(), WorldSession::HandleTogglePvP(), WorldSession::HandleUITimeRequest(), World::HasRecentlyDisconnected(), Player::HasSummonPending(), Player::IncreaseResetTalentsCostAndCounters(), BattlegroundMgr::InitAutomaticArenaPointDistribution(), lfg::LFGMgr::InitBoot(), World::InitCalendarOldEventsDeletionTime(), World::InitGuildResetTime(), World::InitRandomBGResetTime(), Battlefield::InvitePlayersInZoneToWar(), Battlefield::InvitePlayerToWar(), WorldSession::IsConnectionIdle(), Creature::IsInvisibleDueToDespawn(), Item::Item(), lfg::LFGMgr::JoinLfg(), Unit::Kill(), Player::LoadFromDB(), Creature::LoadFromDB(), GameObject::LoadFromDB(), AchievementMgr::LoadFromDB(), Pet::LoadPetFromDB(), InstanceSaveManager::LoadResetTimes(), WorldPackets::Mail::MailListEntry::MailListEntry(), AchievementCriteriaData::Meets(), npc_chromie_middle::npc_chromie_middleAI::MoveInLineOfSight(), GameEventMgr::NextCheck(), go_bells::go_bellsAI::OnGameEvent(), npc_wg_queue::OnGossipHello(), AreaTrigger_at_brewfest::OnTrigger(), AreaTrigger_at_area_52_entrance::OnTrigger(), AuctionHouseMgr::PendingAuctionProcess(), Player::Player(), AuctionBotBuyer::PrepareListOfEntry(), Map::ProcessRespawns(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::ReadSaveDataMore(), AuctionHouseBot::Rebuild(), Weather::ReGenerate(), Creature::RemoveCorpse(), Map::RemoveOldCorpses(), World::ResetDailyQuests(), Corpse::ResetGhostTime(), World::ResetMonthlyQuests(), WorldSession::ResetTimeOutTime(), World::ResetWeeklyQuests(), GameObject::Respawn(), Map::Respawn(), ObjectMgr::ReturnOrDeleteOldMails(), Pet::SavePetToDB(), Creature::SaveRespawnTime(), GameObject::SaveRespawnTime(), Player::SaveToDB(), Map::ScriptCommandStart(), Map::ScriptsProcess(), Map::ScriptsStart(), WorldSession::SendAccountDataTimes(), Player::SendBattlefieldWorldStates(), WorldSession::SendBfInvitePlayerToWar(), WorldSession::SendCalendarRaidLockoutAdded(), WorldSession::SendCalendarRaidLockoutRemoved(), WorldSession::SendCalendarRaidLockoutUpdated(), WorldSession::SendLfgBootProposalUpdate(), Player::SendLoot(), MailDraft::SendMailTo(), WorldSession::SendQueryTimeResponse(), Player::SendRaidInfo(), Player::SendSummonRequestFrom(), instance_vault_of_archavon::instance_vault_of_archavon_InstanceMapScript::SetBossState(), Unit::SetCharmedBy(), AchievementMgr::SetCriteriaProgress(), Player::SetDailyQuestStatus(), Creature::setDeathState(), GameEventMgr::SetHolidayEventTime(), World::SetInitialWorldSettings(), GameObject::SetLootGenerationTime(), GameObject::SetLootState(), GmTicket::SetMessage(), GameObject::SetRespawnTime(), Creature::SetRespawnTime(), Player::SetRestFlag(), Player::SetSeasonalQuestStatus(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::SpawnInfiniteCorruptor(), GameEventMgr::StartEvent(), Creature::StartPickPocketRefillTimer(), GameEventMgr::StopEvent(), PassengerController::SummonCreatures(), Player::SummonIfPossible(), Player::SummonPet(), World::TriggerGuidWarning(), AuctionHouseObject::Update(), GameEventMgr::Update(), InstanceSaveManager::Update(), Battlefield::Update(), BattlegroundMgr::Update(), lfg::LFGMgr::Update(), World::Update(), Pet::Update(), instance_culling_of_stratholme::instance_culling_of_stratholme_InstanceMapScript::Update(), WorldSession::Update(), GameObject::Update(), Creature::Update(), Player::Update(), go_cheer_speaker::go_cheer_speakerAI::UpdateAI(), npc_high_overlord_saurfang_igb::UpdateAI(), npc_muradin_bronzebeard_igb::UpdateAI(), Channel::UpdateChannelInDB(), Player::UpdateCorpseReclaimDelay(), Player::UpdateHonorFields(), TicketMgr::UpdateLastChange(), Guild::Member::UpdateLogoutTime(), Player::UpdateNextMailTimeAndUnreads(), AuctionHouseMgr::UpdatePendingAuctions(), Item::UpdatePlayedTime(), lfg::LFGMgr::UpdateProposal(), Player::UpdatePvP(), Player::UpdatePvPState(), lfg::LFGMgr::UpdateRoleCheck(), World::UpdateSessions(), Player::UpdateSpeakTime(), Creature::UpdateVendorItemCurrentCount(), World::World(), Guild::BankEventLogEntry::WritePacket(), and Guild::EventLogEntry::WritePacket().

◆ GetGameTimeMS()

◆ GetStartTime()

TC_GAME_API time_t GameTime::GetStartTime ( )

Definition at line 37 of file GameTime.cpp.

References StartTime.

Referenced by World::SetInitialWorldSettings(), and World::Update().

◆ GetSystemTime()

◆ GetUptime()

TC_GAME_API uint32 GameTime::GetUptime ( )

Uptime (in secs)

Definition at line 62 of file GameTime.cpp.

References StartTime.

Referenced by server_commandscript::HandleServerInfoCommand(), and World::Update().

◆ GetUtcWowTime()

◆ GetWowTime()

◆ Now()

◆ UpdateGameTimers()

Variable Documentation

◆ GameMSTime

uint32 GameTime::GameMSTime = 0

Definition at line 29 of file GameTime.cpp.

Referenced by GetGameTimeMS(), and UpdateGameTimers().

◆ GameTime

time_t GameTime::GameTime = time(nullptr)

Definition at line 28 of file GameTime.cpp.

Referenced by GetGameTime().

◆ GameTimeSteadyPoint

TimePoint GameTime::GameTimeSteadyPoint = TimePoint::min()

Definition at line 32 of file GameTime.cpp.

Referenced by Now(), and UpdateGameTimers().

◆ GameTimeSystemPoint

SystemTimePoint GameTime::GameTimeSystemPoint = SystemTimePoint ::min()

Definition at line 31 of file GameTime.cpp.

Referenced by GetSystemTime(), and UpdateGameTimers().

◆ StartTime

time_t const GameTime::StartTime = time(nullptr)

Definition at line 26 of file GameTime.cpp.

Referenced by GetStartTime(), and GetUptime().

◆ UtcWow

WowTime GameTime::UtcWow

Definition at line 34 of file GameTime.cpp.

Referenced by GetUtcWowTime(), and UpdateGameTimers().

◆ Wow

WowTime GameTime::Wow

Definition at line 35 of file GameTime.cpp.

Referenced by GetWowTime(), and UpdateGameTimers().