aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorShauren <shauren.trinity@gmail.com>2021-04-16 15:23:04 +0200
committerShauren <shauren.trinity@gmail.com>2021-04-16 15:23:04 +0200
commit8eb3c61f1aea5610cf68fb622f41850d2b934c51 (patch)
treeabfd676210adbaa4b9e38204f1710f4abc1aa060
parent9b141207d170e4b2b4e6d9290d5f921f76cbcea0 (diff)
Core/Misc: Fix cherry-pick errors
-rw-r--r--src/server/game/Spells/Spell.cpp2
-rw-r--r--src/server/game/Time/GameTime.cpp4
2 files changed, 3 insertions, 3 deletions
diff --git a/src/server/game/Spells/Spell.cpp b/src/server/game/Spells/Spell.cpp
index 25e0e56bdf5..5fd94978915 100644
--- a/src/server/game/Spells/Spell.cpp
+++ b/src/server/game/Spells/Spell.cpp
@@ -3245,7 +3245,7 @@ void Spell::_cast(bool skipCheck)
{
uint8 aura_effmask = 0;
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)
- if (m_spellInfo->GetEffect(i)->IsUnitOwnedAuraEffect())
+ if (m_spellInfo->GetEffect(i) && m_spellInfo->GetEffect(i)->IsUnitOwnedAuraEffect())
aura_effmask |= 1 << i;
if (aura_effmask)
diff --git a/src/server/game/Time/GameTime.cpp b/src/server/game/Time/GameTime.cpp
index 08fc72dc6a9..b1a3d269cd9 100644
--- a/src/server/game/Time/GameTime.cpp
+++ b/src/server/game/Time/GameTime.cpp
@@ -21,7 +21,7 @@
namespace GameTime
{
- time_t const StartTime = GameTime::GetGameTime();
+ time_t const StartTime = time(nullptr);
time_t GameTime = 0;
uint32 GameMSTime = 0;
@@ -68,7 +68,7 @@ namespace GameTime
void UpdateGameTimers()
{
- GameTime = GameTime::GetGameTime();
+ GameTime = time(nullptr);
GameMSTime = getMSTime();
GameTimeSystemPoint = std::chrono::system_clock::now();
GameTimeSteadyPoint = std::chrono::steady_clock::now();