mirror of
https://github.com/mangosfour/server.git
synced 2025-12-14 16:37:01 +00:00
[6988] Recheck UNIT_FLAG_NON_ATTACKABLE for delayed spells
Signed-off-by: DiSlord <dislord@nomail.com>
This commit is contained in:
parent
9a411858d0
commit
61063ad94c
2 changed files with 10 additions and 1 deletions
|
|
@ -1067,6 +1067,15 @@ void Spell::DoSpellHitOnUnit(Unit *unit, const uint32 effectMask)
|
|||
|
||||
if( m_caster != unit )
|
||||
{
|
||||
// Recheck UNIT_FLAG_NON_ATTACKABLE for delayed spells
|
||||
if (m_spellInfo->speed > 0.0f &&
|
||||
unit->HasFlag(UNIT_FIELD_FLAGS, UNIT_FLAG_NON_ATTACKABLE) &&
|
||||
unit->GetCharmerOrOwnerGUID() != m_caster->GetGUID())
|
||||
{
|
||||
m_caster->SendSpellMiss(unit, m_spellInfo->Id, SPELL_MISS_EVADE);
|
||||
return;
|
||||
}
|
||||
|
||||
if( !m_caster->IsFriendlyTo(unit) )
|
||||
{
|
||||
// for delayed spells ignore not visible explicit target
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue