Ejemplo n.º 1
0
        protected internal override bool MayActivate(AuraEffectHandler handler)
        {
            SpellEffect spellEffect = handler.SpellEffect;

            if ((spellEffect.RequiredShapeshiftMask == ShapeshiftMask.None ||
                 spellEffect.RequiredShapeshiftMask.HasAnyFlag(Owner.ShapeshiftMask)) &&
                (spellEffect.RequiredActivationAuras == null || ContainsAny(spellEffect.RequiredActivationAuras)))
            {
                return(true);
            }
            return(base.MayActivate(handler));
        }
Ejemplo n.º 2
0
 public SingleAuraApplicationInfo(Unit target, AuraEffectHandler handler)
 {
     Target = target;
     Handler = handler;
 }
Ejemplo n.º 3
0
 protected internal override bool MayActivate(AuraEffectHandler handler)
 {
     // ShapeShiftMask & RequiredActivationAuras
     var effect = handler.SpellEffect;
     if ((effect.RequiredShapeshiftMask == 0 ||
                 (effect.RequiredShapeshiftMask.HasAnyFlag(Owner.ShapeshiftMask))) &&
         (effect.RequiredActivationAuras == null || ContainsAny(effect.RequiredActivationAuras)))
     {
         return true;
     }
     return base.MayActivate(handler);
 }
Ejemplo n.º 4
0
 public AuraApplicationInfo(Unit target, AuraEffectHandler firstHandler)
 {
     Target = target;
     Handlers = new List<AuraEffectHandler>(3) { firstHandler };
 }
Ejemplo n.º 5
0
 /// <summary>
 /// Checks whether the given Handler may be activated (see PlayerAuraCollection)
 /// </summary>
 protected internal virtual bool MayActivate(AuraEffectHandler handler)
 {
     return(true);
 }
Ejemplo n.º 6
0
		/// <summary>
		/// Indicates whether this aura is a stronger version of the given Aura 
		/// (not very accurate, can only be consistent for comparison of 2 Auras of the same type).
		/// </summary>
		public virtual bool IsStrongerOrEqual(AuraEffectHandler otherHandler)
		{
			return IsEquallyStrong(otherHandler) || IsStrongerThan(otherHandler);
		}
Ejemplo n.º 7
0
		/// <summary>
		/// Returns whether the 2 Auras are equally strong. 
		/// If stronger or equally strong, reapplying non-stackable Auras will result into duration resets.
		/// </summary>
		public virtual bool IsEquallyStrong(AuraEffectHandler otherHandler)
		{
			return m_spellEffect.BasePoints == otherHandler.m_spellEffect.BasePoints;
		}
Ejemplo n.º 8
0
		/// <summary>
		/// Indicates whether this aura is a stronger version of the given Aura 
		/// (not very accurate, can only be consistent for comparison of 2 Auras of the same type).
		/// </summary>
		public virtual bool IsStrongerThan(AuraEffectHandler otherHandler)
		{
			return m_spellEffect.BasePoints > otherHandler.m_spellEffect.BasePoints;
		}