예제 #1
0
        public static DeclarePeopleSoul Create(string in_attribute, int in_attribute_type, string in_bj, int in_color, string in_conditions, string in_ff, string in_fg, string in_group, int in_icon, int in_id, int in_if_synthesis, string in_item, string in_jy, string in_name, int in_probability, string in_seal_item, string in_sm, string in_soul, string in_sx, int in_synthesis_title, int in_type, string in_wf, string in_wg)
        {
            DeclarePeopleSoul tmp = new DeclarePeopleSoul();

            tmp._attribute       = in_attribute;
            tmp._attribute_type  = in_attribute_type;
            tmp._bj              = in_bj;
            tmp._color           = in_color;
            tmp._conditions      = in_conditions;
            tmp._ff              = in_ff;
            tmp._fg              = in_fg;
            tmp._group           = in_group;
            tmp._icon            = in_icon;
            tmp._id              = in_id;
            tmp._if_synthesis    = in_if_synthesis;
            tmp._item            = in_item;
            tmp._jy              = in_jy;
            tmp._name            = in_name;
            tmp._probability     = in_probability;
            tmp._seal_item       = in_seal_item;
            tmp._sm              = in_sm;
            tmp._soul            = in_soul;
            tmp._sx              = in_sx;
            tmp._synthesis_title = in_synthesis_title;
            tmp._type            = in_type;
            tmp._wf              = in_wf;
            tmp._wg              = in_wg;

            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[]> >("DataPeopleSoul");
                if (dic == null)
                {
                    LuaEnv.SharedLuaEnv.DoString("DataPeopleSoul = require 'Lua/Config/DataPeopleSoul'");
                    dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataPeopleSoul");
                }

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclarePeopleSoul>(174);
                    foreach (var item in dic)
                    {
                        DeclarePeopleSoul tmp = new DeclarePeopleSoul();
                        tmp.Attribute      = CfgStringLua.Get(item.Value[0]);
                        tmp.AttributeType  = item.Value[1];
                        tmp.Bj             = CfgStringLua.Get(item.Value[2]);
                        tmp.Color          = item.Value[3];
                        tmp.Conditions     = CfgStringLua.Get(item.Value[4]);
                        tmp.Ff             = CfgStringLua.Get(item.Value[5]);
                        tmp.Fg             = CfgStringLua.Get(item.Value[6]);
                        tmp.Group          = CfgStringLua.Get(item.Value[7]);
                        tmp.Icon           = item.Value[8];
                        tmp.Id             = item.Value[9];
                        tmp.IfSynthesis    = item.Value[10];
                        tmp.Item           = CfgStringLua.Get(item.Value[11]);
                        tmp.Jy             = CfgStringLua.Get(item.Value[12]);
                        tmp.Name           = CfgStringLua.Get(item.Value[13]);
                        tmp.Probability    = item.Value[14];
                        tmp.SealItem       = CfgStringLua.Get(item.Value[15]);
                        tmp.Sm             = CfgStringLua.Get(item.Value[16]);
                        tmp.Soul           = CfgStringLua.Get(item.Value[17]);
                        tmp.Sx             = CfgStringLua.Get(item.Value[18]);
                        tmp.SynthesisTitle = item.Value[19];
                        tmp.Type           = item.Value[20];
                        tmp.Wf             = CfgStringLua.Get(item.Value[21]);
                        tmp.Wg             = CfgStringLua.Get(item.Value[22]);

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