Revert "Fix area aura and channel spell tick loss by syncing updates with the caster (#1099)"

This reverts commit 094f55e879.

# Conflicts:
#	src/game/Objects/Unit.cpp
This commit is contained in:
Prithu
2017-06-29 17:25:15 +10:00
committed by Prithu Parker
parent 284b38832c
commit 10a58e326b
10 changed files with 98 additions and 400 deletions
+3 -12
View File
@@ -118,7 +118,6 @@ bool DynamicObject::Create(uint32 guidlow, Unit *caster, uint32 spellId, SpellEf
m_effIndex = effIndex;
m_spellId = spellId;
m_positive = IsPositiveEffect(spellProto, m_effIndex);
m_channeled = IsChanneledSpell(spellProto);
return true;
}
@@ -140,19 +139,11 @@ void DynamicObject::Update(uint32 update_diff, uint32 p_time)
return;
}
if (_deleted)
return;
// If this object is from the current channeled spell, do not delete it. Otherwise
// we can lose the last tick of the effect due to differeng updates. The spell
// itself will call for the object to be removed at the end of the cast
bool deleteThis = false;
m_aliveDuration -= p_time;
if (m_aliveDuration <= 0)
m_aliveDuration = 0;
if (m_aliveDuration == 0 && (!m_channeled || caster->GetChannelObjectGuid() != GetObjectGuid()))
if (m_aliveDuration > int32(p_time))
m_aliveDuration -= p_time;
else
deleteThis = true;
for (AffectedMap::iterator iter = m_affected.begin(); iter != m_affected.end(); ++iter)