diff --git a/src/game/Object/Calendar.cpp b/src/game/Object/Calendar.cpp index 0d44d1d46..654c4e4f6 100644 --- a/src/game/Object/Calendar.cpp +++ b/src/game/Object/Calendar.cpp @@ -481,7 +481,7 @@ void CalendarMgr::CopyEvent(uint64 eventId, time_t newTime, ObjectGuid const& gu return; if (newEvent->IsGuildAnnouncement()) - AddInvite(newEvent, guid, guid, CALENDAR_STATUS_CONFIRMED, CALENDAR_RANK_OWNER, "", time(nullptr)); + AddInvite(newEvent, guid, guid, CALENDAR_STATUS_CONFIRMED, CALENDAR_RANK_OWNER, "", time(NULL)); else { // copy all invitees, set new owner as the one who make the copy, set invitees status to invited @@ -493,7 +493,7 @@ void CalendarMgr::CopyEvent(uint64 eventId, time_t newTime, ObjectGuid const& gu const CalendarInvite* invite = ci_itr->second; if (invite->InviteeGuid == guid) { - AddInvite(newEvent, guid, invite->InviteeGuid, CALENDAR_STATUS_CONFIRMED, CALENDAR_RANK_OWNER, "", time(nullptr)); + AddInvite(newEvent, guid, invite->InviteeGuid, CALENDAR_STATUS_CONFIRMED, CALENDAR_RANK_OWNER, "", time(NULL)); } else { @@ -502,7 +502,7 @@ void CalendarMgr::CopyEvent(uint64 eventId, time_t newTime, ObjectGuid const& gu if (invite->Rank == CALENDAR_RANK_MODERATOR) rank = CALENDAR_RANK_MODERATOR; - AddInvite(newEvent, guid, invite->InviteeGuid, CALENDAR_STATUS_INVITED, rank, "", time(nullptr)); + AddInvite(newEvent, guid, invite->InviteeGuid, CALENDAR_STATUS_INVITED, rank, "", time(NULL)); } ++ci_itr; } diff --git a/src/game/Object/Creature.cpp b/src/game/Object/Creature.cpp index 0b14db367..ef5051b8a 100644 --- a/src/game/Object/Creature.cpp +++ b/src/game/Object/Creature.cpp @@ -1785,7 +1785,7 @@ void Creature::SetDeathState(DeathState s) if ((s == JUST_DIED && !m_IsDeadByDefault) || (s == JUST_ALIVED && m_IsDeadByDefault)) { m_corpseDecayTimer = m_corpseDelay * IN_MILLISECONDS; // the max/default time for corpse decay (before creature is looted/AllLootRemovedFromCorpse() is called) - m_respawnTime = time(nullptr) + m_respawnDelay; // respawn delay (spawntimesecs) + m_respawnTime = time(NULL) + m_respawnDelay; // respawn delay (spawntimesecs) // always save boss respawn time at death to prevent crash cheating if (sWorld.getConfig(CONFIG_BOOL_SAVE_RESPAWN_TIME_IMMEDIATELY) || IsWorldBoss()) @@ -1818,7 +1818,7 @@ void Creature::SetDeathState(DeathState s) Unit::SetDeathState(ALIVE); SetHealth(GetMaxHealth()); - SetLootRecipient(nullptr); + SetLootRecipient(NULL); if (GetTemporaryFactionFlags() & TEMPFACTION_RESTORE_RESPAWN) ClearTemporaryFaction(); diff --git a/src/game/Object/CreatureEventAI.cpp b/src/game/Object/CreatureEventAI.cpp index 0ba583602..cb4f9920e 100644 --- a/src/game/Object/CreatureEventAI.cpp +++ b/src/game/Object/CreatureEventAI.cpp @@ -1136,7 +1136,7 @@ void CreatureEventAI::EnterEvadeMode() if (m_creature->IsAlive() && !m_creature->IsBoarded()) m_creature->GetMotionMaster()->MoveTargetedHome(); - m_creature->SetLootRecipient(nullptr); + m_creature->SetLootRecipient(NULL); // Handle Evade events for (CreatureEventAIList::iterator i = m_CreatureEventAIList.begin(); i != m_CreatureEventAIList.end(); ++i) diff --git a/src/game/Object/Guild.cpp b/src/game/Object/Guild.cpp index 0d8ad12ac..8d4bfb1b4 100644 --- a/src/game/Object/Guild.cpp +++ b/src/game/Object/Guild.cpp @@ -1535,7 +1535,7 @@ uint32 Guild::GetMemberSlotWithdrawRem(uint32 LowGuid, uint8 TabId) if ((GetBankRights(member.RankId, TabId) & GUILD_BANK_RIGHT_VIEW_TAB) != GUILD_BANK_RIGHT_VIEW_TAB) return 0; - uint32 curTime = uint32(time(nullptr) / MINUTE); + uint32 curTime = uint32(time(NULL) / MINUTE); if (curTime - member.BankResetTimeTab[TabId] >= 24 * HOUR / MINUTE) { member.BankResetTimeTab[TabId] = curTime; @@ -1556,7 +1556,7 @@ uint64 Guild::GetMemberMoneyWithdrawRem(uint32 LowGuid) if (member.RankId == GR_GUILDMASTER) return WITHDRAW_MONEY_UNLIMITED; - uint32 curTime = uint32(time(nullptr) / MINUTE); // minutes + uint32 curTime = uint32(time(NULL) / MINUTE); // minutes // 24 hours if (curTime > member.BankResetTimeMoney + 24 * HOUR / MINUTE) { diff --git a/src/game/Object/Pet.cpp b/src/game/Object/Pet.cpp index aa3a57947..40b2f15fd 100644 --- a/src/game/Object/Pet.cpp +++ b/src/game/Object/Pet.cpp @@ -39,7 +39,7 @@ Pet::Pet(PetType type) : m_resetTalentsCost(0), m_resetTalentsTime(0), m_usedTalentCount(0), m_removed(false), m_petType(type), m_duration(0), m_bonusdamage(0), m_auraUpdateMask(0), m_loading(false), - m_declinedname(nullptr), m_petModeFlags(PET_MODE_DEFAULT), m_retreating(false), + m_declinedname(NULL), m_petModeFlags(PET_MODE_DEFAULT), m_retreating(false), m_stayPosSet(false), m_stayPosX(0), m_stayPosY(0), m_stayPosZ(0), m_stayPosO(0), m_opener(0), m_openerMinRange(0), m_openerMaxRange(0) { @@ -426,7 +426,7 @@ void Pet::SavePetToDB(PetSaveMode mode) }; savePet.addString(ss); - savePet.addUInt64(uint64(time(nullptr))); + savePet.addUInt64(uint64(time(NULL))); savePet.addUInt32(uint32(m_resetTalentsCost)); savePet.addUInt64(uint64(m_resetTalentsTime)); savePet.addUInt32(GetUInt32Value(UNIT_CREATED_BY_SPELL)); diff --git a/src/game/Object/Player.cpp b/src/game/Object/Player.cpp index 3e2779fb5..b2cdd6fe5 100644 --- a/src/game/Object/Player.cpp +++ b/src/game/Object/Player.cpp @@ -19089,7 +19089,7 @@ void Player::ProhibitSpellSchool(SpellSchoolMask idSchoolMask, uint32 unTimeMs) WorldPacket data(SMSG_SPELL_COOLDOWN, 8 + 1 + m_spells.size() * 8); data << GetObjectGuid(); data << uint8(0x0); // flags (0x1, 0x2) - time_t curTime = time(nullptr); + time_t curTime = time(NULL); for (PlayerSpellMap::const_iterator itr = m_spells.begin(); itr != m_spells.end(); ++itr) { if (itr->second.state == PLAYERSPELL_REMOVED) @@ -21346,10 +21346,10 @@ void Player::Uncharm() charm->RemoveSpellsCausingAura(SPELL_AURA_MOD_POSSESS_PET); if (charm == GetMover()) { - SetMover(nullptr); + SetMover(NULL); GetCamera().ResetView(); RemoveSpellsCausingAura(SPELL_AURA_MOD_INVISIBILITY); - SetCharm(nullptr); + SetCharm(NULL); SetClientControl(this, 1); } } diff --git a/src/game/Object/Player.h b/src/game/Object/Player.h index 0fde40855..27b3bff39 100644 --- a/src/game/Object/Player.h +++ b/src/game/Object/Player.h @@ -303,7 +303,7 @@ typedef std::list PlayerCreateInfoActions; struct PlayerInfo { // existence checked by displayId != 0 // existence checked by displayId != 0 - PlayerInfo() : mapId(0), areaId(0), positionX(0.f), positionY(0.f), positionZ(0.f), orientation(0.f), displayId_m(0), displayId_f(0), levelInfo(nullptr) + PlayerInfo() : mapId(0), areaId(0), positionX(0.f), positionY(0.f), positionZ(0.f), orientation(0.f), displayId_m(0), displayId_f(0), levelInfo(NULL) { } diff --git a/src/game/Object/Unit.cpp b/src/game/Object/Unit.cpp index ebd68dbc7..1a139f7a9 100644 --- a/src/game/Object/Unit.cpp +++ b/src/game/Object/Unit.cpp @@ -491,10 +491,10 @@ void GlobalCooldownMgr::CancelGlobalCooldown(SpellEntry const* spellInfo) Unit::Unit() : movespline(new Movement::MoveSpline()), - m_charmInfo(nullptr), + m_charmInfo(NULL), i_motionMaster(this), m_regenTimer(0), - m_vehicleInfo(nullptr), + m_vehicleInfo(NULL), m_ThreatManager(this), m_HostileRefManager(this) { @@ -12450,7 +12450,7 @@ void Unit::ResetControlState(bool attackCharmer /*= true*/) { player->GetCamera().ResetView(); player->SetClientControl(player, 1); - player->SetMover(nullptr); + player->SetMover(NULL); } return; } @@ -12465,7 +12465,7 @@ void Unit::ResetControlState(bool attackCharmer /*= true*/) if (player) { player->SetClientControl(possessed, 0); - player->SetMover(nullptr); + player->SetMover(NULL); player->GetCamera().ResetView(); if (possessedCreature->IsPet() && possessedCreature->GetObjectGuid() == GetPetGuid()) diff --git a/src/game/Object/UnitEvents.h b/src/game/Object/UnitEvents.h index 0b07ddbc9..1d24bad77 100644 --- a/src/game/Object/UnitEvents.h +++ b/src/game/Object/UnitEvents.h @@ -93,16 +93,16 @@ class ThreatRefStatusChangeEvent : public UnitBaseEvent }; ThreatManager* iThreatManager; public: - ThreatRefStatusChangeEvent(uint32 pType) : UnitBaseEvent(pType), iThreatManager(nullptr) + ThreatRefStatusChangeEvent(uint32 pType) : UnitBaseEvent(pType), iThreatManager(NULL) { iHostileReference = nullptr; } - ThreatRefStatusChangeEvent(uint32 pType, HostileReference* pHostileReference) : UnitBaseEvent(pType), iThreatManager(nullptr) + ThreatRefStatusChangeEvent(uint32 pType, HostileReference* pHostileReference) : UnitBaseEvent(pType), iThreatManager(NULL) { iHostileReference = pHostileReference; } - ThreatRefStatusChangeEvent(uint32 pType, HostileReference* pHostileReference, float pValue) : UnitBaseEvent(pType), iThreatManager(nullptr) + ThreatRefStatusChangeEvent(uint32 pType, HostileReference* pHostileReference, float pValue) : UnitBaseEvent(pType), iThreatManager(NULL) { iHostileReference = pHostileReference; iFValue = pValue; } - ThreatRefStatusChangeEvent(uint32 pType, HostileReference* pHostileReference, bool pValue) : UnitBaseEvent(pType), iThreatManager(nullptr) + ThreatRefStatusChangeEvent(uint32 pType, HostileReference* pHostileReference, bool pValue) : UnitBaseEvent(pType), iThreatManager(NULL) { iHostileReference = pHostileReference; iBValue = pValue; } int32 getIValue() const { return iIValue; } diff --git a/src/game/Object/Vehicle.cpp b/src/game/Object/Vehicle.cpp index 8d4ed12fe..329e606e7 100644 --- a/src/game/Object/Vehicle.cpp +++ b/src/game/Object/Vehicle.cpp @@ -597,11 +597,11 @@ void VehicleInfo::RemoveSeatMods(Unit* passenger, uint32 seatFlags) if (seatFlags & SEAT_FLAG_CAN_CONTROL) { - pPlayer->SetCharm(nullptr); + pPlayer->SetCharm(NULL); pVehicle->SetCharmerGuid(ObjectGuid()); pPlayer->SetClientControl(pVehicle, 0); - pPlayer->SetMover(nullptr); + pPlayer->SetMover(NULL); pVehicle->clearUnitState(UNIT_STAT_CONTROLLED); pVehicle->RemoveFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_PLAYER_CONTROLLED); @@ -621,7 +621,7 @@ void VehicleInfo::RemoveSeatMods(Unit* passenger, uint32 seatFlags) { if (seatFlags & SEAT_FLAG_CAN_CONTROL) { - passenger->SetCharm(nullptr); + passenger->SetCharm(NULL); pVehicle->SetCharmerGuid(ObjectGuid()); } diff --git a/src/game/WorldHandlers/Chat.h b/src/game/WorldHandlers/Chat.h index 9d42d041a..cf27da8c5 100644 --- a/src/game/WorldHandlers/Chat.h +++ b/src/game/WorldHandlers/Chat.h @@ -132,7 +132,7 @@ class ChatHandler char const* channelName = NULL, uint32 achievementId = 0, const char* addonPrefix = NULL); protected: - explicit ChatHandler() : m_session(nullptr), sentErrorMessage(false) {} // for CLI subclass + explicit ChatHandler() : m_session(NULL), sentErrorMessage(false) {} // for CLI subclass bool hasStringAbbr(const char* name, const char* part); diff --git a/src/game/WorldHandlers/CreatureLinkingMgr.cpp b/src/game/WorldHandlers/CreatureLinkingMgr.cpp index 28a7dac72..8558eb827 100644 --- a/src/game/WorldHandlers/CreatureLinkingMgr.cpp +++ b/src/game/WorldHandlers/CreatureLinkingMgr.cpp @@ -635,7 +635,7 @@ bool CreatureLinkingHolder::IsSlaveInRangeOfBoss(Creature const* pBoss, float sX bool CreatureLinkingHolder::IsRespawnReady(uint32 dbLowGuid, Map* _map) const { time_t respawnTime = _map->GetPersistentState()->GetCreatureRespawnTime(dbLowGuid); - return (!respawnTime || respawnTime <= time(nullptr)) && CanSpawn(dbLowGuid, _map, nullptr, 0.0f, 0.0f); + return (!respawnTime || respawnTime <= time(NULL)) && CanSpawn(dbLowGuid, _map, nullptr, 0.0f, 0.0f); } // Function to check if a passive spawning condition is met diff --git a/src/game/WorldHandlers/Map.cpp b/src/game/WorldHandlers/Map.cpp index e97f4099e..75f99a5e9 100644 --- a/src/game/WorldHandlers/Map.cpp +++ b/src/game/WorldHandlers/Map.cpp @@ -62,7 +62,7 @@ Map::~Map() sScriptMgr.DecreaseScheduledScriptCount(m_scriptSchedule.size()); if (m_persistentState) - m_persistentState->SetUsedByMapState(nullptr); // field pointer can be deleted after this + m_persistentState->SetUsedByMapState(NULL); // field pointer can be deleted after this delete i_data; i_data = nullptr; diff --git a/src/game/WorldHandlers/MapPersistentStateMgr.cpp b/src/game/WorldHandlers/MapPersistentStateMgr.cpp index 2996d99d6..15b752f76 100644 --- a/src/game/WorldHandlers/MapPersistentStateMgr.cpp +++ b/src/game/WorldHandlers/MapPersistentStateMgr.cpp @@ -545,7 +545,7 @@ void DungeonResetScheduler::ScheduleReset(bool add, time_t time, DungeonResetEve void DungeonResetScheduler::Update() { - time_t now = time(nullptr), t; + time_t now = time(NULL), t; while (!m_resetTimeQueue.empty() && (t = m_resetTimeQueue.begin()->first) < now) { DungeonResetEvent& event = m_resetTimeQueue.begin()->second; @@ -596,7 +596,7 @@ void DungeonResetScheduler::Update() void DungeonResetScheduler::ResetAllRaid() { - time_t now = time(nullptr); + time_t now = time(NULL); ResetTimeQueue rTQ; rTQ.clear(); @@ -921,7 +921,7 @@ void MapPersistentStateManager::_ResetOrWarnAll(uint32 mapid, Difficulty difficu if (!mapEntry->IsDungeon()) return; - time_t now = time(nullptr); + time_t now = time(NULL); if (!warn) { diff --git a/src/game/WorldHandlers/PetHandler.cpp b/src/game/WorldHandlers/PetHandler.cpp index 1c55f19e0..734465346 100644 --- a/src/game/WorldHandlers/PetHandler.cpp +++ b/src/game/WorldHandlers/PetHandler.cpp @@ -716,7 +716,7 @@ void WorldSession::HandlePetCastSpellOpcode(WorldPacket& recvPacket) spell->m_cast_count = cast_count; // probably pending spell cast spell->m_targets = targets; - SpellCastResult result = triggeredByAura ? SPELL_CAST_OK : spell->CheckPetCast(nullptr); + SpellCastResult result = triggeredByAura ? SPELL_CAST_OK : spell->CheckPetCast(NULL); if (result == SPELL_CAST_OK) { pet->AddCreatureSpellCooldown(spellid); diff --git a/src/game/WorldHandlers/SpellAuras.cpp b/src/game/WorldHandlers/SpellAuras.cpp index 7b97c89cf..0ffe8dd76 100644 --- a/src/game/WorldHandlers/SpellAuras.cpp +++ b/src/game/WorldHandlers/SpellAuras.cpp @@ -3184,7 +3184,7 @@ void Aura::HandleAuraDummy(bool apply, bool Real) if (apply) caster->FixateTarget(target); else if (target->GetObjectGuid() == caster->GetFixateTargetGuid()) - caster->FixateTarget(nullptr); + caster->FixateTarget(NULL); return; } diff --git a/src/game/WorldHandlers/SpellEffects.cpp b/src/game/WorldHandlers/SpellEffects.cpp index 1294e552a..5e599ce65 100644 --- a/src/game/WorldHandlers/SpellEffects.cpp +++ b/src/game/WorldHandlers/SpellEffects.cpp @@ -1157,7 +1157,7 @@ void Spell::EffectDummy(SpellEffectEntry const* effect) return; } - pGameObj->SetRespawnTime(creatureTarget->GetRespawnTime() - time(nullptr)); + pGameObj->SetRespawnTime(creatureTarget->GetRespawnTime() - time(NULL)); pGameObj->SetOwnerGuid(m_caster->GetObjectGuid()); pGameObj->SetUInt32Value(GAMEOBJECT_LEVEL, m_caster->getLevel()); pGameObj->SetSpellId(m_spellInfo->Id); @@ -6689,7 +6689,7 @@ void Spell::EffectSummonPet(SpellEffectEntry const* effect) NewSummon->SetOwnerGuid(m_caster->GetObjectGuid()); NewSummon->SetCreatorGuid(m_caster->GetObjectGuid()); NewSummon->setFaction(m_caster->getFaction()); - NewSummon->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(time(nullptr))); + NewSummon->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(time(NULL))); NewSummon->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id); NewSummon->InitStatsForLevel(level); @@ -11909,7 +11909,7 @@ void Spell::EffectCreateTamedPet(SpellEffectEntry const* effect) newTamedPet->SetCreatorGuid(unitTarget->GetObjectGuid()); newTamedPet->SetUInt32Value(UNIT_NPC_FLAGS, UNIT_NPC_FLAG_NONE); newTamedPet->setFaction(unitTarget->getFaction()); - newTamedPet->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(time(nullptr))); + newTamedPet->SetUInt32Value(UNIT_FIELD_PET_NAME_TIMESTAMP, uint32(time(NULL))); newTamedPet->SetUInt32Value(UNIT_CREATED_BY_SPELL, m_spellInfo->Id); newTamedPet->GetCharmInfo()->SetPetNumber(petNumber, true); diff --git a/src/game/WorldHandlers/UnitAuraProcHandler.cpp b/src/game/WorldHandlers/UnitAuraProcHandler.cpp index 963b3fefb..44835057c 100644 --- a/src/game/WorldHandlers/UnitAuraProcHandler.cpp +++ b/src/game/WorldHandlers/UnitAuraProcHandler.cpp @@ -2382,7 +2382,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura // apply cooldown before cast to prevent processing itself if (cooldown) - ((Player*)this)->AddSpellCooldown(dummySpell->Id, 0, time(nullptr) + cooldown); + ((Player*)this)->AddSpellCooldown(dummySpell->Id, 0, time(NULL) + cooldown); // Attack Twice for (uint32 i = 0; i < 2; ++i) @@ -2641,7 +2641,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura CastSpell(pVictim, spellId, true, castItem, triggeredByAura); if (cooldown && GetTypeId() == TYPEID_PLAYER) - ((Player*)this)->AddSpellCooldown(dummySpell->Id, 0, time(nullptr) + cooldown); + ((Player*)this)->AddSpellCooldown(dummySpell->Id, 0, time(NULL) + cooldown); return SPELL_AURA_PROC_OK; } @@ -2894,7 +2894,7 @@ SpellAuraProcResult Unit::HandleDummyAuraProc(Unit* pVictim, uint32 damage, Aura CastSpell(target, triggered_spell_id, true, castItem, triggeredByAura); if (cooldown && GetTypeId() == TYPEID_PLAYER) - ((Player*)this)->AddSpellCooldown(triggered_spell_id, 0, time(nullptr) + cooldown); + ((Player*)this)->AddSpellCooldown(triggered_spell_id, 0, time(NULL) + cooldown); return SPELL_AURA_PROC_OK; } @@ -3822,7 +3822,7 @@ SpellAuraProcResult Unit::HandleProcTriggerSpellAuraProc(Unit* pVictim, uint32 d CastSpell(target, trigger_spell_id, true, castItem, triggeredByAura); if (cooldown && GetTypeId() == TYPEID_PLAYER) - ((Player*)this)->AddSpellCooldown(trigger_spell_id, 0, time(nullptr) + cooldown); + ((Player*)this)->AddSpellCooldown(trigger_spell_id, 0, time(NULL) + cooldown); return SPELL_AURA_PROC_OK; } diff --git a/src/game/WorldHandlers/World.cpp b/src/game/WorldHandlers/World.cpp index 52d0656ef..e9f1f4d02 100644 --- a/src/game/WorldHandlers/World.cpp +++ b/src/game/WorldHandlers/World.cpp @@ -1489,7 +1489,7 @@ void World::SetInitialWorldSettings() // ToDo: requires fix after the latest updates //sLog.outString("Loading grids for active creatures or transports..."); - //sObjectMgr.LoadActiveEntities(nullptr); + //sObjectMgr.LoadActiveEntities(NULL); //sLog.outString(); // Delete all characters which have been deleted X days before