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[]> >("DataKingFightLevel"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataKingFightLevel = require 'Lua/Config/DataKingFightLevel'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataKingFightLevel"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclareKingFightLevel>(30); foreach (var item in dic) { DeclareKingFightLevel tmp = new DeclareKingFightLevel(); tmp.DayAward = CfgStringLua.Get(item.Value[0]); tmp.DayJoinAward = CfgStringLua.Get(item.Value[1]); tmp.Degree = item.Value[2]; tmp.Id = item.Value[3]; tmp.LoseFeatsValue = item.Value[4]; tmp.LoseScore = item.Value[5]; tmp.Name = CfgStringLua.Get(item.Value[6]); tmp.NeedScore = item.Value[7]; tmp.ResIcon = item.Value[8]; tmp.ResTex = CfgStringLua.Get(item.Value[9]); tmp.StarNum = item.Value[10]; tmp.WinFeatsValue = item.Value[11]; tmp.WinSocre = item.Value[12]; _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "KingFightLevel"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclareKingFightLevel>(30); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "KingFightLevel"); } } }
public static DeclareKingFightLevel Create(string in_day_award, string in_day_join_award, int in_degree, int in_id, int in_lose_feats_value, int in_lose_score, string in_name, int in_need_score, int in_res_icon, string in_res_tex, int in_star_num, int in_win_feats_value, int in_win_socre) { DeclareKingFightLevel tmp = new DeclareKingFightLevel(); tmp._day_award = in_day_award; tmp._day_join_award = in_day_join_award; tmp._degree = in_degree; tmp._id = in_id; tmp._lose_feats_value = in_lose_feats_value; tmp._lose_score = in_lose_score; tmp._name = in_name; tmp._need_score = in_need_score; tmp._res_icon = in_res_icon; tmp._res_tex = in_res_tex; tmp._star_num = in_star_num; tmp._win_feats_value = in_win_feats_value; tmp._win_socre = in_win_socre; return(tmp); }
public static void Convert(Dictionary <int, DeclareKingFightLevel> data) { if (data == null) { return; } data.Clear(); data.Add(1, DeclareKingFightLevel.Create(StringDefines.Key_13824, StringDefines.Key_49997, 1, 1, 30, 15, StringDefines.Key_49998, 0, 1117, StringDefines.Key_11604, 1, 50, 30)); data.Add(2, DeclareKingFightLevel.Create(StringDefines.Key_13799, StringDefines.Key_49997, 1, 2, 30, -15, StringDefines.Key_15608, 31, 1117, StringDefines.Key_11604, 2, 50, 30)); data.Add(3, DeclareKingFightLevel.Create(StringDefines.Key_13803, StringDefines.Key_49997, 1, 3, 30, -15, StringDefines.Key_15609, 61, 1117, StringDefines.Key_11604, 3, 50, 30)); data.Add(4, DeclareKingFightLevel.Create(StringDefines.Key_13807, StringDefines.Key_49997, 1, 4, 30, -15, StringDefines.Key_15610, 91, 1117, StringDefines.Key_11604, 4, 50, 30)); data.Add(5, DeclareKingFightLevel.Create(StringDefines.Key_13811, StringDefines.Key_49997, 1, 5, 30, -15, StringDefines.Key_15611, 121, 1117, StringDefines.Key_11604, 5, 50, 30)); data.Add(6, DeclareKingFightLevel.Create(StringDefines.Key_49999, StringDefines.Key_49997, 2, 6, 40, -20, StringDefines.Key_15612, 151, 1118, StringDefines.Key_11610, 1, 60, 40)); data.Add(7, DeclareKingFightLevel.Create(StringDefines.Key_50000, StringDefines.Key_49997, 2, 7, 40, -20, StringDefines.Key_15613, 231, 1118, StringDefines.Key_11610, 2, 60, 40)); data.Add(8, DeclareKingFightLevel.Create(StringDefines.Key_50001, StringDefines.Key_49997, 2, 8, 40, -20, StringDefines.Key_15614, 311, 1118, StringDefines.Key_11610, 3, 60, 40)); data.Add(9, DeclareKingFightLevel.Create(StringDefines.Key_50002, StringDefines.Key_49997, 2, 9, 40, -20, StringDefines.Key_15615, 391, 1118, StringDefines.Key_11610, 4, 60, 40)); data.Add(10, DeclareKingFightLevel.Create(StringDefines.Key_50003, StringDefines.Key_49997, 2, 10, 40, -20, StringDefines.Key_15616, 471, 1118, StringDefines.Key_11610, 5, 60, 40)); data.Add(11, DeclareKingFightLevel.Create(StringDefines.Key_50004, StringDefines.Key_49997, 3, 11, 45, -30, StringDefines.Key_15617, 551, 1119, StringDefines.Key_11616, 1, 70, 60)); data.Add(12, DeclareKingFightLevel.Create(StringDefines.Key_50005, StringDefines.Key_49997, 3, 12, 45, -30, StringDefines.Key_15618, 731, 1119, StringDefines.Key_11616, 2, 70, 60)); data.Add(13, DeclareKingFightLevel.Create(StringDefines.Key_50006, StringDefines.Key_49997, 3, 13, 45, -30, StringDefines.Key_15619, 911, 1119, StringDefines.Key_11616, 3, 70, 60)); data.Add(14, DeclareKingFightLevel.Create(StringDefines.Key_50007, StringDefines.Key_49997, 3, 14, 45, -30, StringDefines.Key_15620, 1091, 1119, StringDefines.Key_11616, 4, 70, 60)); data.Add(15, DeclareKingFightLevel.Create(StringDefines.Key_50008, StringDefines.Key_49997, 3, 15, 45, -30, StringDefines.Key_15621, 1271, 1119, StringDefines.Key_11616, 5, 70, 60)); data.Add(16, DeclareKingFightLevel.Create(StringDefines.Key_50009, StringDefines.Key_49997, 4, 16, 50, -40, StringDefines.Key_15622, 1451, 1120, StringDefines.Key_11622, 1, 80, 80)); data.Add(17, DeclareKingFightLevel.Create(StringDefines.Key_50010, StringDefines.Key_49997, 4, 17, 50, -40, StringDefines.Key_15623, 1771, 1120, StringDefines.Key_11622, 2, 80, 80)); data.Add(18, DeclareKingFightLevel.Create(StringDefines.Key_50011, StringDefines.Key_49997, 4, 18, 50, -40, StringDefines.Key_15624, 2091, 1120, StringDefines.Key_11622, 3, 80, 80)); data.Add(19, DeclareKingFightLevel.Create(StringDefines.Key_50012, StringDefines.Key_49997, 4, 19, 50, -40, StringDefines.Key_15625, 2411, 1120, StringDefines.Key_11622, 4, 80, 80)); data.Add(20, DeclareKingFightLevel.Create(StringDefines.Key_50013, StringDefines.Key_49997, 4, 20, 50, -40, StringDefines.Key_15626, 2731, 1120, StringDefines.Key_11622, 5, 80, 80)); data.Add(21, DeclareKingFightLevel.Create(StringDefines.Key_50014, StringDefines.Key_49997, 5, 21, 60, -60, StringDefines.Key_15627, 3051, 1121, StringDefines.Key_11628, 1, 100, 100)); data.Add(22, DeclareKingFightLevel.Create(StringDefines.Key_50015, StringDefines.Key_49997, 5, 22, 60, -60, StringDefines.Key_15628, 3551, 1121, StringDefines.Key_11628, 2, 100, 100)); data.Add(23, DeclareKingFightLevel.Create(StringDefines.Key_50016, StringDefines.Key_49997, 5, 23, 60, -60, StringDefines.Key_15629, 4051, 1121, StringDefines.Key_11628, 3, 100, 100)); data.Add(24, DeclareKingFightLevel.Create(StringDefines.Key_50017, StringDefines.Key_49997, 5, 24, 60, -60, StringDefines.Key_15630, 4551, 1121, StringDefines.Key_11628, 4, 100, 100)); data.Add(25, DeclareKingFightLevel.Create(StringDefines.Key_50018, StringDefines.Key_49997, 5, 25, 60, -60, StringDefines.Key_15631, 5051, 1121, StringDefines.Key_11628, 5, 100, 100)); data.Add(26, DeclareKingFightLevel.Create(StringDefines.Key_50019, StringDefines.Key_49997, 6, 26, 70, -85, StringDefines.Key_15632, 5551, 1122, StringDefines.Key_11634, 1, 130, 130)); data.Add(27, DeclareKingFightLevel.Create(StringDefines.Key_50020, StringDefines.Key_49997, 6, 27, 70, -85, StringDefines.Key_15633, 6331, 1122, StringDefines.Key_11634, 2, 130, 130)); data.Add(28, DeclareKingFightLevel.Create(StringDefines.Key_50021, StringDefines.Key_49997, 6, 28, 70, -85, StringDefines.Key_15634, 7111, 1122, StringDefines.Key_11634, 3, 130, 130)); data.Add(29, DeclareKingFightLevel.Create(StringDefines.Key_50022, StringDefines.Key_49997, 6, 29, 70, -85, StringDefines.Key_15635, 7891, 1122, StringDefines.Key_11634, 4, 130, 130)); data.Add(30, DeclareKingFightLevel.Create(StringDefines.Key_50023, StringDefines.Key_49997, 6, 30, 70, -85, StringDefines.Key_15636, 8671, 1122, StringDefines.Key_11634, 5, 130, 130)); }