//-------------------------------------------------------------------------
        public override object excute(EffectMgr effect_mgr, EffectContext effect_context, string[] predefine_param, string[] effect_param)
        {
            Item   item = effect_context.item;
            Entity et   = effect_context.EtActor;

            return(null);
        }
        //-------------------------------------------------------------------------
        public override object excute(EffectMgr effect_mgr, EffectContext effect_context, string[] predefine_param, string[] effect_param)
        {
            //EbLog.Note("EffectCreateStatus.excute()");

            Item   item = effect_context.item;
            Entity et   = effect_context.EtActor;

            // 创建Status
            var co_status = et.getComponent <CellStatus <DefStatus> >();

            co_status.createStatus(item);

            return(null);
        }
        //-------------------------------------------------------------------------
        public override object excute(EffectMgr effect_mgr, EffectContext effect_context, string[] predefine_param, string[] effect_param)
        {
            //EbLog.Note("EffectTakeoffEquip.excute()");

            Item   item = effect_context.item;
            Entity et   = effect_context.EtActor;

            // 从装备背包中移除
            var co_equip = et.getComponent <CellEquip <DefEquip> >();

            item = co_equip.takeoffEquip((Ps.EquipSlot)item.TbDataItem.ItemTypeId);

            return(null);
        }
Esempio n. 4
0
        //-------------------------------------------------------------------------
        public override object excute(EffectMgr effect_mgr, EffectContext effect_context, string[] predefine_param, string[] effect_param)
        {
            //EbLog.Note("EffectTakeonEquip.excute()");

            Item   item = effect_context.item;
            Entity et   = effect_context.EtActor;

            // 添加到装备背包
            var co_equip = et.getComponent <CellEquip <DefEquip> >();

            co_equip.takeonEquip(item);

            return(null);
        }
Esempio n. 5
0
        //-------------------------------------------------------------------------
        public object doEffect(EffectContext effect_context, string effect_name, string[] predefine_param, string[] effect_param)
        {
            Effect effect = EffectSys.getEffect(effect_name);

            if (effect == null)
            {
                //EbLog.Error("EffectSys.doEffect() Error, can't found effect_name=" + effect_name);
                return(null);
            }

            object result = effect.excute(this, effect_context, predefine_param, effect_param);

            _freeEffectContext(effect_context);

            return(result);
        }
        //-------------------------------------------------------------------------
        public override object excute(EffectMgr effect_mgr, EffectContext effect_context, string[] predefine_param, string[] effect_param)
        {
            Item   item = effect_context.item;
            Entity et   = effect_context.EtActor;

            UnitConsumables unit_consumable = (UnitConsumables)item.UnitLink;

            foreach (var i in unit_consumable.TbDataUnitConsumables.ListEffect)
            {
                TbDataEffect data_effect = EbDataMgr.Instance.getData <TbDataEffect>(i.EffectId);

                effect_mgr.doEffect(effect_context, data_effect.ScriptName,
                                    data_effect.PredefineParamList, i.ListParam);
            }

            item.ItemData.n -= (byte)item.TbDataItem.MainOperateInfo.SubOverlapNum;

            return(null);
        }
Esempio n. 7
0
 //-------------------------------------------------------------------------
 public abstract object excute(EffectMgr effect_mgr, EffectContext effect_context, string[] predefine_param, string[] effect_param);
Esempio n. 8
0
 //-------------------------------------------------------------------------
 void _freeEffectContext(EffectContext effect_context)
 {
     effect_context.clear();
     QueEffectContext.Enqueue(effect_context);
 }