mirror of
https://github.com/mangosfour/server.git
synced 2025-12-16 04:37:00 +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 )
|
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) )
|
if( !m_caster->IsFriendlyTo(unit) )
|
||||||
{
|
{
|
||||||
// for delayed spells ignore not visible explicit target
|
// for delayed spells ignore not visible explicit target
|
||||||
|
|
|
||||||
|
|
@ -1,4 +1,4 @@
|
||||||
#ifndef __REVISION_NR_H__
|
#ifndef __REVISION_NR_H__
|
||||||
#define __REVISION_NR_H__
|
#define __REVISION_NR_H__
|
||||||
#define REVISION_NR "6987"
|
#define REVISION_NR "6988"
|
||||||
#endif // __REVISION_NR_H__
|
#endif // __REVISION_NR_H__
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue