예제 #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));
        }
예제 #2
0
 public SingleAuraApplicationInfo(Unit target, AuraEffectHandler handler)
 {
     Target = target;
     Handler = handler;
 }
예제 #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);
 }
예제 #4
0
 public AuraApplicationInfo(Unit target, AuraEffectHandler firstHandler)
 {
     Target = target;
     Handlers = new List<AuraEffectHandler>(3) { firstHandler };
 }
예제 #5
0
 /// <summary>
 /// Checks whether the given Handler may be activated (see PlayerAuraCollection)
 /// </summary>
 protected internal virtual bool MayActivate(AuraEffectHandler handler)
 {
     return(true);
 }
예제 #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);
		}
예제 #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;
		}
예제 #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;
		}