示例#1
0
        public static DeclareBuff Create(int in_addsub, int in_buffVfx, string in_condi, int in_d_time, string in_desc, int in_group, int in_icon, int in_id, int in_if_changemap, int in_if_send, int in_level, string in_name, int in_overlap, int in_param1, int in_param2, int in_param3, int in_param4, string in_porperty, int in_targetType, int in_type, int in_vfxScal, int in_vfxSlot, int in_wenzi)
        {
            DeclareBuff tmp = new DeclareBuff();

            tmp._addsub       = in_addsub;
            tmp._buffVfx      = in_buffVfx;
            tmp._condi        = in_condi;
            tmp._d_time       = in_d_time;
            tmp._desc         = in_desc;
            tmp._group        = in_group;
            tmp._icon         = in_icon;
            tmp._id           = in_id;
            tmp._if_changemap = in_if_changemap;
            tmp._if_send      = in_if_send;
            tmp._level        = in_level;
            tmp._name         = in_name;
            tmp._overlap      = in_overlap;
            tmp._param1       = in_param1;
            tmp._param2       = in_param2;
            tmp._param3       = in_param3;
            tmp._param4       = in_param4;
            tmp._porperty     = in_porperty;
            tmp._targetType   = in_targetType;
            tmp._type         = in_type;
            tmp._vfxScal      = in_vfxScal;
            tmp._vfxSlot      = in_vfxSlot;
            tmp._wenzi        = in_wenzi;

            return(tmp);
        }
示例#2
0
        public static void SetData()
        {
            if (_dataCaches == null && LuaEnv.isLoadLuaCfg)
            {
                long startTime = DateTime.Now.Ticks;
                Dictionary <int, int[]> dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataBuff");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataBuff = require 'Lua/Config/DataBuff'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataBuff");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareBuff>(265);
                    foreach (var item in dic)
                    {
                        DeclareBuff tmp = new DeclareBuff();
                        tmp.Addsub      = item.Value[0];
                        tmp.BuffVfx     = item.Value[1];
                        tmp.Condi       = CfgStringLua.Get(item.Value[2]);
                        tmp.DTime       = item.Value[3];
                        tmp.Desc        = CfgStringLua.Get(item.Value[4]);
                        tmp.Group       = item.Value[5];
                        tmp.Icon        = item.Value[6];
                        tmp.Id          = item.Value[7];
                        tmp.IfChangemap = item.Value[8];
                        tmp.IfSend      = item.Value[9];
                        tmp.Level       = item.Value[10];
                        tmp.Name        = CfgStringLua.Get(item.Value[11]);
                        tmp.Overlap     = item.Value[12];
                        tmp.Param1      = item.Value[13];
                        tmp.Param2      = item.Value[14];
                        tmp.Param3      = item.Value[15];
                        tmp.Param4      = item.Value[16];
                        tmp.Porperty    = CfgStringLua.Get(item.Value[17]);
                        tmp.TargetType  = item.Value[18];
                        tmp.Type        = item.Value[19];
                        tmp.VfxScal     = item.Value[20];
                        tmp.VfxSlot     = item.Value[21];
                        tmp.Wenzi       = item.Value[22];

                        _dataCaches.Add(item.Key, tmp);
                    }
                }
                Record(startTime, DateTime.Now.Ticks, "Buff");
            }
            if (_dataCaches == null && _fillDataCallBack != null)
            {
                if (_dataCaches == null)
                {
                    long startTime = DateTime.Now.Ticks;
                    _dataCaches = new Dictionary <int, DeclareBuff>(265);
                    _fillDataCallBack(_dataCaches);
                    Record(startTime, DateTime.Now.Ticks, "Buff");
                }
            }
        }