Core/Spells:
* fixed releasing spell focus when a creature enters evade mode while focusing a target * allow the focus handling to accept self cast spells * fixed an issue that was prevent channeled spells without a cast time being rejected for focusing * channeled spells will now always have a focus target * target less casts will now trigger focusing as well
This commit is contained in:
1 parent
148291729f
commit
4ba820d5dc
4 files changed
+23
-13
No files matched your search
@@ -4679,6 +4679,10 @@ void Spell::SendChannelStart(uint32 duration)
|
||||
}
|
||||
}
|
||||
|
||||
// There must always be a caster
|
||||
if (!channelTarget)
|
||||
channelTarget = m_caster->GetGUID();
|
||||
|
||||
uint32 castFlags = CAST_FLAG_HAS_TRAJECTORY;
|
||||
uint32 schoolImmunityMask = m_caster->GetSchoolImmunityMask();
|
||||
uint32 mechanicImmunityMask = m_caster->GetMechanicImmunityMask();
|
||||
@@ -4733,10 +4737,9 @@ void Spell::SendChannelStart(uint32 duration)
|
||||
{
|
||||
m_caster->SetChannelObjectGuid(channelTarget);
|
||||
|
||||
if (channelTarget != m_caster->GetGUID())
|
||||
if (Creature* creatureCaster = m_caster->ToCreature())
|
||||
if (!creatureCaster->HasSpellFocus(this))
|
||||
creatureCaster->SetSpellFocus(this, ObjectAccessor::GetWorldObject(*creatureCaster, channelTarget));
|
||||
if (Creature* creatureCaster = m_caster->ToCreature())
|
||||
if (!creatureCaster->HasSpellFocus(this))
|
||||
creatureCaster->SetSpellFocus(this, ObjectAccessor::GetWorldObject(*creatureCaster, channelTarget));
|
||||
}
|
||||
|
||||
m_caster->SetUInt32Value(UNIT_CHANNEL_SPELL, m_spellInfo->Id);
|
||||
|
||||
Reference in new issue
Block a user