Esempio n. 1
0
        public virtual bool Add(AbstractEffect effect)
        {
            bool result;

            if (this.CanAddEffect(effect.TypeValue))
            {
                ArrayList effects;
                Monitor.Enter(effects = this.m_effects);
                try
                {
                    this.m_effects.Add(effect);
                }
                finally
                {
                    Monitor.Exit(effects);
                }
                effect.OnAttached(this.m_owner);
                this.OnEffectsChanged(effect);
                result = true;
            }
            else
            {
                if (effect.TypeValue == 9 && this.m_owner is SimpleBoss)
                {
                    this.m_owner.State = 0;
                }
                result = false;
            }
            return(result);
        }
Esempio n. 2
0
        public virtual bool Add(AbstractEffect effect)
        {
            if (CanAddEffect(effect.TypeValue))
            {
                lock (m_effects)
                {
                    m_effects.Add(effect);
                }

                effect.OnAttached(m_owner);

                OnEffectsChanged(effect);

                return true;
            }

            if (effect.TypeValue == (int)eEffectType.IceFronzeEffect && m_owner is SimpleBoss)
            {
                m_owner.State = 0;
            }

            return false;
        }
Esempio n. 3
0
        public virtual bool Add(AbstractEffect effect)
        {
            if (CanAddEffect(effect.TypeValue))
            {
                lock (m_effects)
                {
                    m_effects.Add(effect);
                }

                effect.OnAttached(m_owner);

                OnEffectsChanged(effect);

                return(true);
            }

            if (effect.TypeValue == (int)eEffectType.IceFronzeEffect && m_owner is SimpleBoss)
            {
                m_owner.State = 0;
            }

            return(false);
        }