protected AuraEffect(Aura aura, AuraEffectInfo effectInfo, int index, float baseValue) { Aura = aura; EffectInfo = effectInfo; Index = index; Value = BaseValue = baseValue; }
internal bool IsImmuneToAuraEffect(AuraEffectInfo auraEffectInfo, Unit caster) { if (auraEffectInfo.Mechanics != SpellMechanics.None) { if (mechanicsImmunities.ContainsKey(auraEffectInfo.Mechanics)) { return(true); } } return(false); }
public bool CanCancelAura(AuraEffect auraEffect) { if (!HasAttribute(SpellAttributes.DispelAurasOnImmunity)) { return(false); } if (auraEffect.Aura.SpellInfo.HasAttribute(SpellAttributes.UnaffectedByInvulnerability)) { return(false); } foreach (SpellEffectInfo effectInfo in spellEffectInfos) { if (!(effectInfo is EffectApplyAura applyAuraEffect)) { continue; } for (int index = 0; index < applyAuraEffect.AuraInfo.AuraEffects.Count; index++) { AuraEffectInfo auraEffectInfo = applyAuraEffect.AuraInfo.AuraEffects[index]; switch (auraEffectInfo) { case AuraEffectInfoSchoolImmunity schoolImmunity: if (auraEffect.Aura.SpellInfo.HasAttribute(SpellAttributes.UnaffectedBySchoolImmune)) { continue; } if (schoolImmunity.SchoolMask.HasAnyFlag(SchoolMask)) { return(true); } break; } } } return(false); }
internal bool IsImmuneToAuraEffect(AuraEffectInfo auraEffectInfo, Unit caster) { return(false); }