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[]> >("DataFashion"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataFashion = require 'Lua/Config/DataFashion'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataFashion"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclareFashion>(34); foreach (var item in dic) { DeclareFashion tmp = new DeclareFashion(); tmp.ActiveAtt = CfgStringLua.Get(item.Value[0]); tmp.ActiveItem = CfgStringLua.Get(item.Value[1]); tmp.ActiveTask = CfgStringLua.Get(item.Value[2]); tmp.Canshow = item.Value[3]; tmp.Head = CfgStringLua.Get(item.Value[4]); tmp.Id = item.Value[5]; tmp.Name = CfgStringLua.Get(item.Value[6]); tmp.Notice = item.Value[7]; tmp.Probation = item.Value[8]; tmp.Res = CfgStringLua.Get(item.Value[9]); tmp.StrengtheningAtt = CfgStringLua.Get(item.Value[10]); tmp.StrengtheningItem = CfgStringLua.Get(item.Value[11]); tmp.StrengtheningLevel = item.Value[12]; tmp.Type = item.Value[13]; _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "Fashion"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclareFashion>(34); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "Fashion"); } } }
public static void Convert(Dictionary <int, DeclareFashion> data) { if (data == null) { return; } data.Clear(); data.Add(1, DeclareFashion.Create(StringDefines.Key_20167, StringDefines.Key_16919, StringDefines.Key_20, 1, StringDefines.Key_20168, 1, StringDefines.Key_1957, 1, -1, StringDefines.Key_1958, StringDefines.Key_20167, StringDefines.Key_16919, 10, 0)); data.Add(2, DeclareFashion.Create(StringDefines.Key_20169, StringDefines.Key_20170, StringDefines.Key_20, 1, StringDefines.Key_20171, 2, StringDefines.Key_1961, 1, -1, StringDefines.Key_1962, StringDefines.Key_20169, StringDefines.Key_20170, 10, 0)); data.Add(3, DeclareFashion.Create(StringDefines.Key_20172, StringDefines.Key_20173, StringDefines.Key_20, 1, StringDefines.Key_20174, 3, StringDefines.Key_1964, 1, -1, StringDefines.Key_1965, StringDefines.Key_20172, StringDefines.Key_20173, 10, 0)); data.Add(4, DeclareFashion.Create(StringDefines.Key_20167, StringDefines.Key_20175, StringDefines.Key_20, 1, StringDefines.Key_20176, 4, StringDefines.Key_1968, 1, -1, StringDefines.Key_1969, StringDefines.Key_20167, StringDefines.Key_20175, 10, 0)); data.Add(5, DeclareFashion.Create(StringDefines.Key_20172, StringDefines.Key_20177, StringDefines.Key_20, 1, StringDefines.Key_20178, 5, StringDefines.Key_1971, 1, -1, StringDefines.Key_1972, StringDefines.Key_20172, StringDefines.Key_20177, 10, 0)); data.Add(6, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20180, StringDefines.Key_20, 1, StringDefines.Key_20181, 6, StringDefines.Key_1974, 1, -1, StringDefines.Key_20182, StringDefines.Key_20172, StringDefines.Key_20183, 10, 0)); data.Add(7, DeclareFashion.Create(StringDefines.Key_20167, StringDefines.Key_20184, StringDefines.Key_20, 1, StringDefines.Key_20185, 7, StringDefines.Key_1976, 1, -1, StringDefines.Key_1977, StringDefines.Key_20167, StringDefines.Key_20184, 10, 0)); data.Add(8, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20186, StringDefines.Key_20, 1, StringDefines.Key_20187, 8, StringDefines.Key_1979, 1, -1, StringDefines.Key_20188, StringDefines.Key_20172, StringDefines.Key_20189, 10, 0)); data.Add(9, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20190, StringDefines.Key_20, 1, StringDefines.Key_20191, 9, StringDefines.Key_1981, 1, -1, StringDefines.Key_20192, StringDefines.Key_20172, StringDefines.Key_20193, 10, 0)); data.Add(10, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20194, StringDefines.Key_20, 1, StringDefines.Key_20195, 10, StringDefines.Key_1983, 1, -1, StringDefines.Key_20196, StringDefines.Key_20172, StringDefines.Key_20197, 10, 0)); data.Add(11, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20198, StringDefines.Key_20, 1, StringDefines.Key_20199, 11, StringDefines.Key_1985, 1, -1, StringDefines.Key_20200, StringDefines.Key_20172, StringDefines.Key_20201, 10, 0)); data.Add(12, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20202, StringDefines.Key_20, 1, StringDefines.Key_20203, 12, StringDefines.Key_1987, 1, -1, StringDefines.Key_20204, StringDefines.Key_20172, StringDefines.Key_20205, 10, 0)); data.Add(13, DeclareFashion.Create(StringDefines.Key_20206, StringDefines.Key_20207, StringDefines.Key_20, 1, StringDefines.Key_20208, 13, StringDefines.Key_1989, 1, 8640, StringDefines.Key_20209, StringDefines.Key_10472, StringDefines.Key_20207, 0, 0)); data.Add(14, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20210, StringDefines.Key_20, 1, StringDefines.Key_20211, 14, StringDefines.Key_1991, 1, -1, StringDefines.Key_20212, StringDefines.Key_20172, StringDefines.Key_20213, 10, 0)); data.Add(15, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20214, StringDefines.Key_20, 1, StringDefines.Key_20215, 15, StringDefines.Key_1993, 1, -1, StringDefines.Key_20216, StringDefines.Key_20172, StringDefines.Key_20217, 10, 0)); data.Add(16, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20218, StringDefines.Key_20, 1, StringDefines.Key_20219, 16, StringDefines.Key_1995, 1, -1, StringDefines.Key_20220, StringDefines.Key_20172, StringDefines.Key_20221, 10, 0)); data.Add(17, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20222, StringDefines.Key_20, 1, StringDefines.Key_20223, 17, StringDefines.Key_1997, 1, -1, StringDefines.Key_20224, StringDefines.Key_20172, StringDefines.Key_20225, 10, 0)); data.Add(101, DeclareFashion.Create(StringDefines.Key_20167, StringDefines.Key_20226, StringDefines.Key_20, 1, StringDefines.Key_20227, 101, StringDefines.Key_2001, 1, -1, StringDefines.Key_2002, StringDefines.Key_20167, StringDefines.Key_20226, 10, 1)); data.Add(102, DeclareFashion.Create(StringDefines.Key_20169, StringDefines.Key_20228, StringDefines.Key_20, 1, StringDefines.Key_20229, 102, StringDefines.Key_2004, 1, -1, StringDefines.Key_2005, StringDefines.Key_20169, StringDefines.Key_20228, 10, 1)); data.Add(103, DeclareFashion.Create(StringDefines.Key_20172, StringDefines.Key_20230, StringDefines.Key_20, 1, StringDefines.Key_20231, 103, StringDefines.Key_2007, 1, -1, StringDefines.Key_2008, StringDefines.Key_20172, StringDefines.Key_20230, 10, 1)); data.Add(104, DeclareFashion.Create(StringDefines.Key_20167, StringDefines.Key_20232, StringDefines.Key_20, 1, StringDefines.Key_20233, 104, StringDefines.Key_2010, 1, -1, StringDefines.Key_2011, StringDefines.Key_20167, StringDefines.Key_20232, 10, 1)); data.Add(105, DeclareFashion.Create(StringDefines.Key_20172, StringDefines.Key_20234, StringDefines.Key_20, 1, StringDefines.Key_20235, 105, StringDefines.Key_2013, 1, -1, StringDefines.Key_2014, StringDefines.Key_20172, StringDefines.Key_20234, 10, 1)); data.Add(106, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20236, StringDefines.Key_20, 1, StringDefines.Key_20237, 106, StringDefines.Key_2016, 1, -1, StringDefines.Key_20238, StringDefines.Key_20172, StringDefines.Key_20239, 10, 1)); data.Add(107, DeclareFashion.Create(StringDefines.Key_20167, StringDefines.Key_20240, StringDefines.Key_20, 1, StringDefines.Key_20241, 107, StringDefines.Key_2018, 1, -1, StringDefines.Key_2019, StringDefines.Key_20167, StringDefines.Key_20240, 10, 1)); data.Add(108, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20242, StringDefines.Key_20, 1, StringDefines.Key_20243, 108, StringDefines.Key_2021, 1, -1, StringDefines.Key_20244, StringDefines.Key_20172, StringDefines.Key_20245, 10, 1)); data.Add(109, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20246, StringDefines.Key_20, 1, StringDefines.Key_20247, 109, StringDefines.Key_2023, 1, -1, StringDefines.Key_20248, StringDefines.Key_20172, StringDefines.Key_20249, 10, 1)); data.Add(110, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20250, StringDefines.Key_20, 1, StringDefines.Key_20251, 110, StringDefines.Key_2025, 1, -1, StringDefines.Key_20252, StringDefines.Key_20172, StringDefines.Key_20253, 10, 1)); data.Add(111, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20254, StringDefines.Key_20, 1, StringDefines.Key_20255, 111, StringDefines.Key_2027, 1, -1, StringDefines.Key_20256, StringDefines.Key_20172, StringDefines.Key_20257, 10, 1)); data.Add(112, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20258, StringDefines.Key_20, 1, StringDefines.Key_20259, 112, StringDefines.Key_2029, 1, -1, StringDefines.Key_20260, StringDefines.Key_20172, StringDefines.Key_20261, 10, 1)); data.Add(113, DeclareFashion.Create(StringDefines.Key_20206, StringDefines.Key_20262, StringDefines.Key_20, 1, StringDefines.Key_20263, 113, StringDefines.Key_2031, 1, 8640, StringDefines.Key_20264, StringDefines.Key_10472, StringDefines.Key_20262, 10, 1)); data.Add(114, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20265, StringDefines.Key_20, 1, StringDefines.Key_20266, 114, StringDefines.Key_2033, 1, -1, StringDefines.Key_20267, StringDefines.Key_20172, StringDefines.Key_20268, 10, 1)); data.Add(115, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20269, StringDefines.Key_20, 1, StringDefines.Key_20270, 115, StringDefines.Key_2035, 1, -1, StringDefines.Key_20271, StringDefines.Key_20172, StringDefines.Key_20272, 10, 1)); data.Add(116, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20273, StringDefines.Key_20, 1, StringDefines.Key_20274, 116, StringDefines.Key_2090, 1, -1, StringDefines.Key_20275, StringDefines.Key_20172, StringDefines.Key_20276, 10, 1)); data.Add(117, DeclareFashion.Create(StringDefines.Key_20179, StringDefines.Key_20277, StringDefines.Key_20, 1, StringDefines.Key_20278, 117, StringDefines.Key_2092, 1, -1, StringDefines.Key_20279, StringDefines.Key_20172, StringDefines.Key_20280, 10, 1)); }
public static DeclareFashion Create(string in_active_att, string in_active_item, string in_active_task, int in_canshow, string in_head, int in_id, string in_name, int in_notice, int in_probation, string in_res, string in_strengthening_att, string in_strengthening_item, int in_strengthening_level, int in_type) { DeclareFashion tmp = new DeclareFashion(); tmp._active_att = in_active_att; tmp._active_item = in_active_item; tmp._active_task = in_active_task; tmp._canshow = in_canshow; tmp._head = in_head; tmp._id = in_id; tmp._name = in_name; tmp._notice = in_notice; tmp._probation = in_probation; tmp._res = in_res; tmp._strengthening_att = in_strengthening_att; tmp._strengthening_item = in_strengthening_item; tmp._strengthening_level = in_strengthening_level; tmp._type = in_type; return(tmp); }