示例#1
0
 public static void Convert(Dictionary <int, DeclareElementRuneSoul> data)
 {
     if (data == null)
     {
         return;
     }
     data.Clear();
     data.Add(1, DeclareElementRuneSoul.Create(50, StringDefines.Key_55492, 1767, 1, StringDefines.Key_55493, StringDefines.Key_55494, StringDefines.Key_55495, StringDefines.Key_17109, StringDefines.Key_20));
     data.Add(2, DeclareElementRuneSoul.Create(50, StringDefines.Key_55496, 1768, 2, StringDefines.Key_55493, StringDefines.Key_55497, StringDefines.Key_55498, StringDefines.Key_17110, StringDefines.Key_20));
     data.Add(3, DeclareElementRuneSoul.Create(100, StringDefines.Key_55499, 1769, 3, StringDefines.Key_55500, StringDefines.Key_55501, StringDefines.Key_55502, StringDefines.Key_2253, StringDefines.Key_20));
     data.Add(4, DeclareElementRuneSoul.Create(200, StringDefines.Key_55503, 1770, 4, StringDefines.Key_55500, StringDefines.Key_55504, StringDefines.Key_55505, StringDefines.Key_55506, StringDefines.Key_20));
 }
示例#2
0
        public static DeclareElementRuneSoul Create(int in_addAtt, string in_attribute, int in_icon, int in_id, string in_level, string in_name, string in_need_item, string in_runeType, string in_specialAtt)
        {
            DeclareElementRuneSoul tmp = new DeclareElementRuneSoul();

            tmp._addAtt     = in_addAtt;
            tmp._attribute  = in_attribute;
            tmp._icon       = in_icon;
            tmp._id         = in_id;
            tmp._level      = in_level;
            tmp._name       = in_name;
            tmp._need_item  = in_need_item;
            tmp._runeType   = in_runeType;
            tmp._specialAtt = in_specialAtt;

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

                if (dic != null)
                {
                    _dataCaches = new Dictionary <int, DeclareElementRuneSoul>(4);
                    foreach (var item in dic)
                    {
                        DeclareElementRuneSoul tmp = new DeclareElementRuneSoul();
                        tmp.AddAtt     = item.Value[0];
                        tmp.Attribute  = CfgStringLua.Get(item.Value[1]);
                        tmp.Icon       = item.Value[2];
                        tmp.Id         = item.Value[3];
                        tmp.Level      = CfgStringLua.Get(item.Value[4]);
                        tmp.Name       = CfgStringLua.Get(item.Value[5]);
                        tmp.NeedItem   = CfgStringLua.Get(item.Value[6]);
                        tmp.RuneType   = CfgStringLua.Get(item.Value[7]);
                        tmp.SpecialAtt = CfgStringLua.Get(item.Value[8]);

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