aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorQAston <none@none>2010-01-24 18:26:29 +0100
committerQAston <none@none>2010-01-24 18:26:29 +0100
commit492fe452fd816ed78cea2f7f340ed325a66425de (patch)
treebb811042397db86c6a6b8f7aaf4e17e3431832c9 /src
parent8710fe8fa07d569a2f398d75ab34fcefb2324b2f (diff)
*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
Diffstat (limited to 'src')
-rw-r--r--src/game/Spell.cpp5
-rw-r--r--src/game/SpellAuras.cpp16
2 files changed, 12 insertions, 9 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp
index daa9f71289e..1cc530f5ada 100644
--- a/src/game/Spell.cpp
+++ b/src/game/Spell.cpp
@@ -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
diff --git a/src/game/SpellAuras.cpp b/src/game/SpellAuras.cpp
index 7c7ff437801..b6c7b30de23 100644
--- a/src/game/SpellAuras.cpp
+++ b/src/game/SpellAuras.cpp
@@ -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)