Beispiel #1
0
        //-------------------------------------------------------------------------
        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;
        }
Beispiel #2
0
        //-------------------------------------------------------------------------
        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);
        }
Beispiel #3
0
        //-------------------------------------------------------------------------
        public override object excute(EffectMgr effect_mgr, EffectContext effect_context, string[] predefine_param, string[] effect_param)
        {
            //EbLog.Note("EffectStatusCreator1.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;
        }
Beispiel #4
0
        //-------------------------------------------------------------------------
        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((EquipSlot)item.TbDataItem.ItemTypeId);

            return null;
        }
Beispiel #5
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;
        }
Beispiel #6
0
        //-------------------------------------------------------------------------
        public override object excute(EffectMgr effect_mgr, EffectContext effect_context, string[] predefine_param, string[] effect_param)
        {
            //EbLog.Note("EffectStatus1.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);
        }
Beispiel #7
0
        //-------------------------------------------------------------------------
        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((EquipSlot)item.TbDataItem.ItemTypeId);

            return(null);
        }
Beispiel #8
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);
        }
Beispiel #9
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);
        }
Beispiel #10
0
        //-------------------------------------------------------------------------
        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;
        }
Beispiel #11
0
        //-------------------------------------------------------------------------
        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);
        }
Beispiel #12
0
 //-------------------------------------------------------------------------
 void _freeEffectContext(EffectContext effect_context)
 {
     effect_context.clear();
     QueEffectContext.Enqueue(effect_context);
 }
Beispiel #13
0
 //-------------------------------------------------------------------------
 public abstract object excute(EffectMgr effect_mgr, EffectContext effect_context, string[] predefine_param, string[] effect_param);
Beispiel #14
0
 //-------------------------------------------------------------------------
 public abstract object excute(EffectMgr effect_mgr, EffectContext effect_context, string[] predefine_param, string[] effect_param);