diff options
Diffstat (limited to 'src/game')
| -rw-r--r-- | src/game/Spell.cpp | 5 | ||||
| -rw-r--r-- | src/game/SpellEffects.cpp | 7 |
2 files changed, 7 insertions, 5 deletions
diff --git a/src/game/Spell.cpp b/src/game/Spell.cpp index 77fe888e23a..aa94f6b24eb 100644 --- a/src/game/Spell.cpp +++ b/src/game/Spell.cpp @@ -981,8 +981,9 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask) } // Recheck immune (only for delayed spells) - if( m_spellInfo->speed && ( - unit->IsImmunedToDamage(GetSpellSchoolMask(m_spellInfo),true) || + if( m_spellInfo->speed && + !(m_spellInfo->Attributes & SPELL_ATTR_UNAFFECTED_BY_INVULNERABILITY) + && (unit->IsImmunedToDamage(GetSpellSchoolMask(m_spellInfo),true) || unit->IsImmunedToSpell(m_spellInfo,true) )) { m_caster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_IMMUNE); diff --git a/src/game/SpellEffects.cpp b/src/game/SpellEffects.cpp index eeafd0d024e..e1f80bdcc58 100644 --- a/src/game/SpellEffects.cpp +++ b/src/game/SpellEffects.cpp @@ -2633,13 +2633,14 @@ void Spell::EffectCreateItem(uint32 i) void Spell::EffectPersistentAA(uint32 i) { float radius = GetSpellRadius(sSpellRadiusStore.LookupEntry(m_spellInfo->EffectRadiusIndex[i])); + Unit *caster = m_originalCasterGUID ? m_originalCaster : m_caster; - if(Player* modOwner = m_caster->GetSpellModOwner()) + if(Player* modOwner = caster->GetSpellModOwner()) modOwner->ApplySpellMod(m_spellInfo->Id, SPELLMOD_RADIUS, radius); int32 duration = GetSpellDuration(m_spellInfo); DynamicObject* dynObj = new DynamicObject; - if(!dynObj->Create(objmgr.GenerateLowGuid(HIGHGUID_DYNAMICOBJECT), m_caster, m_spellInfo->Id, i, m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, duration, radius)) + if(!dynObj->Create(objmgr.GenerateLowGuid(HIGHGUID_DYNAMICOBJECT), caster, m_spellInfo->Id, i, m_targets.m_destX, m_targets.m_destY, m_targets.m_destZ, duration, radius)) { delete dynObj; return; @@ -2647,7 +2648,7 @@ void Spell::EffectPersistentAA(uint32 i) dynObj->SetUInt32Value(OBJECT_FIELD_TYPE, 65); dynObj->SetUInt32Value(GAMEOBJECT_DISPLAYID, 368003); dynObj->SetUInt32Value(DYNAMICOBJECT_BYTES, 0x01eeeeee); - m_caster->AddDynObject(dynObj); + caster->AddDynObject(dynObj); MapManager::Instance().GetMap(dynObj->GetMapId(), dynObj)->Add(dynObj); } |
