*Bring back one unintentionally removed check in Aura::UpdateOwner

*Remove not blizzlike hack for Vanish (it should not remove delayed spells from player)

--HG--
branch : trunk
This commit is contained in:
QAston
2010-01-24 18:26:29 +01:00
parent 8710fe8fa0
commit 492fe452fd
2 changed files with 12 additions and 9 deletions
+2 -3
View File
@@ -1292,12 +1292,11 @@ SpellMissInfo Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask, bool
if( !m_caster->IsFriendlyTo(unit) )
{
// reset damage to 0 if target has Invisibility or Vanish aura (_only_ vanish, not stealth) and isn't visible for caster
// reset damage to 0 if target has Invisibility and isn't visible for caster
// I do not think this is a correct way to fix it. Sanctuary effect should make all delayed spells invalid
// for delayed spells ignore not visible explicit target
if(m_spellInfo->speed > 0.0f && unit == m_targets.getUnitTarget()
&& (unit->m_invisibilityMask || m_caster->m_invisibilityMask
|| unit->HasAuraTypeWithFamilyFlags(SPELL_AURA_MOD_STEALTH, SPELLFAMILY_ROGUE, SPELLFAMILYFLAG_ROGUE_VANISH))
&& (unit->m_invisibilityMask || m_caster->m_invisibilityMask)
&& !m_caster->canSeeOrDetect(unit, true))
{
// that was causing CombatLog errors
+10 -6
View File
@@ -444,12 +444,13 @@ void Aura::_Remove(AuraRemoveMode removeMode)
{
assert (!m_isRemoved);
m_isRemoved = true;
for (ApplicationMap::iterator appItr = m_applications.begin() ; appItr != m_applications.end() ;)
ApplicationMap::iterator appItr = m_applications.begin();
while(!m_applications.empty())
{
AuraApplication * aurApp = appItr->second;
Unit * target = aurApp->GetTarget();
++appItr;
target->_UnapplyAura(aurApp, removeMode);
appItr = m_applications.begin();
}
}
@@ -592,10 +593,13 @@ void Aura::UpdateOwner(uint32 diff, WorldObject * owner)
Update(diff, caster);
if (m_updateTargetMapInterval <= diff)
UpdateTargetMap(caster);
else
m_updateTargetMapInterval -= diff;
if (!IsRemoved())
{
if (m_updateTargetMapInterval <= diff)
UpdateTargetMap(caster);
else
m_updateTargetMapInterval -= diff;
}
// update aura effects
for (uint8 i = 0; i < MAX_SPELL_EFFECTS; ++i)