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[]> >("DataMarriageRing"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataMarriageRing = require 'Lua/Config/DataMarriageRing'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataMarriageRing"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclareMarriageRing>(9); foreach (var item in dic) { DeclareMarriageRing tmp = new DeclareMarriageRing(); tmp.AddIntimacy = item.Value[0]; tmp.Attributes = CfgStringLua.Get(item.Value[1]); tmp.AttType = item.Value[2]; tmp.BuffId = item.Value[3]; tmp.Degree = CfgStringLua.Get(item.Value[4]); tmp.Dis = CfgStringLua.Get(item.Value[5]); tmp.Icon = item.Value[6]; tmp.Level = item.Value[7]; tmp.ModelId = item.Value[8]; tmp.Name = CfgStringLua.Get(item.Value[9]); tmp.Radio = item.Value[10]; tmp.SkillId = item.Value[11]; tmp.UpGold = item.Value[12]; tmp.UpNeedItem = CfgStringLua.Get(item.Value[13]); _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "MarriageRing"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclareMarriageRing>(9); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "MarriageRing"); } } }
public static void Convert(Dictionary <int, DeclareMarriageRing> data) { if (data == null) { return; } data.Clear(); data.Add(1, DeclareMarriageRing.Create(960, StringDefines.Key_31216, -1, 900001, StringDefines.Key_31217, StringDefines.Key_31218, 979, 1, 651001, StringDefines.Key_31219, 1, 900001, 80, StringDefines.Key_31220)); data.Add(2, DeclareMarriageRing.Create(2160, StringDefines.Key_31221, -1, 0, StringDefines.Key_31222, StringDefines.Key_20, 976, 2, 651002, StringDefines.Key_31223, 1, 0, 180, StringDefines.Key_31224)); data.Add(3, DeclareMarriageRing.Create(3480, StringDefines.Key_31225, -1, 0, StringDefines.Key_31226, StringDefines.Key_20, 978, 3, 651003, StringDefines.Key_31227, 1, 0, 290, StringDefines.Key_31228)); data.Add(4, DeclareMarriageRing.Create(7080, StringDefines.Key_31229, -1, 0, StringDefines.Key_31230, StringDefines.Key_20, 975, 4, 651004, StringDefines.Key_31231, 1, 0, 590, StringDefines.Key_31232)); data.Add(5, DeclareMarriageRing.Create(11880, StringDefines.Key_31233, -1, 0, StringDefines.Key_31234, StringDefines.Key_20, 981, 5, 651005, StringDefines.Key_31235, 1, 0, 990, StringDefines.Key_31236)); data.Add(6, DeclareMarriageRing.Create(15480, StringDefines.Key_31237, -1, 0, StringDefines.Key_31238, StringDefines.Key_20, 977, 6, 651006, StringDefines.Key_31239, 1, 0, 1290, StringDefines.Key_31240)); data.Add(7, DeclareMarriageRing.Create(19080, StringDefines.Key_31241, -1, 0, StringDefines.Key_31242, StringDefines.Key_20, 983, 7, 651007, StringDefines.Key_31243, 1, 0, 1590, StringDefines.Key_31244)); data.Add(8, DeclareMarriageRing.Create(23880, StringDefines.Key_31245, -1, 0, StringDefines.Key_31246, StringDefines.Key_20, 982, 8, 651008, StringDefines.Key_31247, 1, 0, 1990, StringDefines.Key_31248)); data.Add(9, DeclareMarriageRing.Create(35880, StringDefines.Key_31249, -1, 0, StringDefines.Key_31250, StringDefines.Key_31251, 984, 9, 651009, StringDefines.Key_31252, 1, 900002, 2990, StringDefines.Key_31253)); }
public static DeclareMarriageRing Create(int in_addIntimacy, string in_attributes, int in_attType, int in_buffId, string in_degree, string in_dis, int in_icon, int in_level, int in_modelId, string in_name, int in_radio, int in_skillId, int in_upGold, string in_upNeedItem) { DeclareMarriageRing tmp = new DeclareMarriageRing(); tmp._addIntimacy = in_addIntimacy; tmp._attributes = in_attributes; tmp._attType = in_attType; tmp._buffId = in_buffId; tmp._degree = in_degree; tmp._dis = in_dis; tmp._icon = in_icon; tmp._level = in_level; tmp._modelId = in_modelId; tmp._name = in_name; tmp._radio = in_radio; tmp._skillId = in_skillId; tmp._upGold = in_upGold; tmp._upNeedItem = in_upNeedItem; return(tmp); }