Revert "feat(core): Ensure that all actions are compared to fixed point in time (#1236) (#1458)" (#1471)

This reverts commit 51b8773528.
This commit is contained in:
Nefertumm
2019-02-15 15:14:49 -03:00
committed by GitHub
parent 23e7ae6a2f
commit c15206fc15
108 changed files with 509 additions and 933 deletions

View File

@@ -23,7 +23,6 @@
#include "Spell.h"
#include "DynamicObject.h"
#include "Group.h"
#include "GameTime.h"
#include "UpdateData.h"
#include "MapManager.h"
#include "ObjectAccessor.h"
@@ -2577,7 +2576,7 @@ void Spell::DoAllEffectOnTarget(TargetInfo* target)
// Xinef: absorb delayed projectiles for 500ms
if (getState() == SPELL_STATE_DELAYED && !m_spellInfo->IsTargetingArea() && !m_spellInfo->IsPositive() &&
(GameTime::GetGameTimeMS() - target->timeDelay) <= effectUnit->m_lastSanctuaryTime && GameTime::GetGameTimeMS() < (effectUnit->m_lastSanctuaryTime + 500) &&
(World::GetGameTimeMS() - target->timeDelay) <= effectUnit->m_lastSanctuaryTime && World::GetGameTimeMS() < (effectUnit->m_lastSanctuaryTime + 500) &&
effectUnit->FindMap() && !effectUnit->FindMap()->IsDungeon()
)
return; // No missinfo in that case
@@ -4518,7 +4517,7 @@ void Spell::SendSpellGo()
data << uint8(m_cast_count); // pending spell cast?
data << uint32(m_spellInfo->Id); // spellId
data << uint32(castFlags); // cast flags
data << uint32(GameTime::GetGameTimeMS()); // timestamp
data << uint32(World::GetGameTimeMS()); // timestamp
WriteSpellGoTargets(&data);
@@ -5001,7 +5000,7 @@ void Spell::TakePower()
// Set the five second timer
if (powerType == POWER_MANA && m_powerCost > 0)
m_caster->SetLastManaUse(GameTime::GetGameTimeMS());
m_caster->SetLastManaUse(World::GetGameTimeMS());
}
void Spell::TakeAmmo()
@@ -6023,7 +6022,7 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_BAD_TARGETS;
// Xinef: Implement summon pending error
if (target->GetSummonExpireTimer() > GameTime::GetGameTime())
if (target->GetSummonExpireTimer() > time(NULL))
return SPELL_FAILED_SUMMON_PENDING;
// check if our map is dungeon
@@ -6063,7 +6062,7 @@ SpellCastResult Spell::CheckCast(bool strict)
return SPELL_FAILED_BAD_TARGETS;
// Xinef: Implement summon pending error
if (target->GetSummonExpireTimer() > GameTime::GetGameTime())
if (target->GetSummonExpireTimer() > time(NULL))
return SPELL_FAILED_SUMMON_PENDING;
break;