Код:
------------------------------ src/game/Spell.cpp ------------------------------
index 9ea4124..c0a59dc 100644
@@ -925,7 +925,13 @@ void Spell::DoAllEffectOnTarget(TargetInfo *target)
{
if (target->reflectResult == SPELL_MISS_NONE) // If reflected spell hit caster -> do all effect on him
DoSpellHitOnUnit(m_caster, mask);
- }
+ } else
+ {
+ m_caster->FinishSpell(CURRENT_CHANNELED_SPELL, false);
+ doTriggers(missInfo);
+ return;
+ }
+
// Do triggers only on miss/resist/parry/dodge
if (missInfo!=SPELL_MISS_NONE)
------------------------------ src/game/Unit.cpp ------------------------------
index a6e6379..43c802f 100644
@@ -1090,7 +1090,9 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
}
if (remove)
{
- pVictim->RemoveAurasDueToSpell(i->second->GetId());
+ if (IsChanneledSpell(se))
+ i->second->GetCaster()->FinishSpell(CURRENT_CHANNELED_SPELL, false);
+ else pVictim->RemoveAurasDueToSpell(i->second->GetId());
// FIXME: this may cause the auras with proc chance to be rerolled several times
next = vAuras.begin();
}
@@ -1101,7 +1103,9 @@ uint32 Unit::DealDamage(Unit *pVictim, uint32 damage, CleanDamage const* cleanDa
float chance = float(damage) / max_dmg * 100.0f;
if (roll_chance_f(chance))
{
- pVictim->RemoveAurasDueToSpell(i->second->GetId());
+ if (IsChanneledSpell(se))
+ i->second->GetCaster()->FinishSpell(CURRENT_CHANNELED_SPELL, false);
+ else pVictim->RemoveAurasDueToSpell(i->second->GetId());
next = vAuras.begin();
}
}
Например, пет варлока - сукуб, продолжал кастовать канальный каст Seduction при непопадании по таргету, а также при прерывании каста уроном по таргету.