Exemplo n.º 1
0
        public ItemEffectHandler GetItemEffectHandler(EffectBase effect, Character target, ItemSetTemplate itemSet, bool apply)
        {
            EffectManager.ItemSetEffectConstructor itemSetEffectConstructor;
            ItemEffectHandler result;

            if (this.m_itemsSetEffectHandler.TryGetValue(effect.EffectId, out itemSetEffectConstructor))
            {
                result = itemSetEffectConstructor(effect, target, itemSet, apply);
            }
            else
            {
                result = new DefaultItemEffect(effect, target, itemSet, apply);
            }
            return(result);
        }
Exemplo n.º 2
0
        public ItemEffectHandler GetItemEffectHandler(EffectBase effect, Character target, BasePlayerItem item)
        {
            EffectManager.ItemEffectConstructor itemEffectConstructor;
            ItemEffectHandler result;

            if (this.m_itemsEffectHandler.TryGetValue(effect.EffectId, out itemEffectConstructor))
            {
                result = itemEffectConstructor(effect, target, item);
            }
            else
            {
                result = new DefaultItemEffect(effect, target, item);
            }
            return(result);
        }