Core/Spells: Assign spell effect handles for new apply aura effects
Port From (https://github.com/TrinityCore/TrinityCore/commit/c3dcbe04dcea04ce3f453f99d44ebebb542bcda7)
This commit is contained in:
@@ -2556,7 +2556,7 @@ namespace Game.Spells
|
||||
|
||||
List<Unit> targetList = new List<Unit>();
|
||||
// non-area aura
|
||||
if (effect.Effect == SpellEffectName.ApplyAura)
|
||||
if (effect.Effect == SpellEffectName.ApplyAura || effect.Effect == SpellEffectName.Unk202)
|
||||
{
|
||||
targetList.Add(GetUnitOwner());
|
||||
}
|
||||
@@ -2570,7 +2570,8 @@ namespace Game.Spells
|
||||
{
|
||||
case SpellEffectName.ApplyAreaAuraParty:
|
||||
case SpellEffectName.ApplyAreaAuraRaid:
|
||||
{
|
||||
case SpellEffectName.ApplyAreaAuraPartyNonrandom:
|
||||
{
|
||||
targetList.Add(GetUnitOwner());
|
||||
var u_check = new AnyGroupedUnitInObjectRangeCheck(GetUnitOwner(), GetUnitOwner(), radius, effect.Effect == SpellEffectName.ApplyAreaAuraRaid, GetSpellInfo().HasAttribute(SpellAttr3.OnlyTargetPlayers), false, true);
|
||||
var searcher = new UnitListSearcher(GetUnitOwner(), targetList, u_check);
|
||||
@@ -2603,6 +2604,13 @@ namespace Game.Spells
|
||||
targetList.Add(owner);
|
||||
break;
|
||||
}
|
||||
case SpellEffectName.ApplyAuraOnPet:
|
||||
{
|
||||
Unit pet = Global.ObjAccessor.GetUnit(GetUnitOwner(), GetUnitOwner().GetPetGUID());
|
||||
if (pet != null)
|
||||
targetList.Add(pet);
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -934,14 +934,7 @@ namespace Game.Spells
|
||||
public bool IsEffect(SpellEffectName effectName) { return _effectInfo.Effect == effectName; }
|
||||
public bool IsAreaAuraEffect()
|
||||
{
|
||||
if (_effectInfo.Effect == SpellEffectName.ApplyAreaAuraParty ||
|
||||
_effectInfo.Effect == SpellEffectName.ApplyAreaAuraRaid ||
|
||||
_effectInfo.Effect == SpellEffectName.ApplyAreaAuraFriend ||
|
||||
_effectInfo.Effect == SpellEffectName.ApplyAreaAuraEnemy ||
|
||||
_effectInfo.Effect == SpellEffectName.ApplyAreaAuraPet ||
|
||||
_effectInfo.Effect == SpellEffectName.ApplyAreaAuraOwner)
|
||||
return true;
|
||||
return false;
|
||||
return _effectInfo.IsAreaAuraEffect();
|
||||
}
|
||||
|
||||
#region Fields
|
||||
|
||||
Reference in New Issue
Block a user