From 2cac04e4390062a989ab5419a9f7721d1bf1cfc9 Mon Sep 17 00:00:00 2001 From: hondacrx Date: Wed, 4 Oct 2017 18:16:56 -0400 Subject: [PATCH] mark Arcane Missiles aura as negative. Was downranking the spell when targetting low level mobs due to effect 1 flagged as possitive. clear auras of channeled spells if channeling is cancelled due to invalid targets (dead or w/e) --- Game/Spells/Spell.cs | 11 +++++++++-- Game/Spells/SpellInfo.cs | 5 +++++ 2 files changed, 14 insertions(+), 2 deletions(-) diff --git a/Game/Spells/Spell.cs b/Game/Spells/Spell.cs index 90c5baa18..ae0fac36c 100644 --- a/Game/Spells/Spell.cs +++ b/Game/Spells/Spell.cs @@ -3185,8 +3185,15 @@ namespace Game.Spells if (!UpdateChanneledTargetList()) { Log.outDebug(LogFilter.Spells, "Channeled spell {0} is removed due to lack of targets", m_spellInfo.Id); - SendChannelUpdate(0); - finish(); + m_timer = 0; + + // Also remove applied auras + foreach (TargetInfo target in m_UniqueTargetInfo) + { + Unit unit = m_caster.GetGUID() == target.targetGUID ? m_caster : Global.ObjAccessor.GetUnit(m_caster, target.targetGUID); + if (unit) + unit.RemoveOwnedAura(m_spellInfo.Id, m_originalCasterGUID, 0, AuraRemoveMode.Cancel); + } } if (m_timer > 0) diff --git a/Game/Spells/SpellInfo.cs b/Game/Spells/SpellInfo.cs index 5407709ed..a1ce1323c 100644 --- a/Game/Spells/SpellInfo.cs +++ b/Game/Spells/SpellInfo.cs @@ -2592,6 +2592,11 @@ namespace Game.Spells return true; } break; + case SpellFamilyNames.Mage: + // Arcane Missiles + if (SpellFamilyFlags[0] == 0x00000800) + return false; + break; case SpellFamilyNames.Priest: switch (Id) {