public static DeclareWingInfo Create(string in_condition_info, int in_id) { DeclareWingInfo tmp = new DeclareWingInfo(); tmp._condition_info = in_condition_info; tmp._id = in_id; return(tmp); }
public static void Convert(Dictionary <int, DeclareWingInfo> data) { if (data == null) { return; } data.Clear(); data.Add(19, DeclareWingInfo.Create(StringDefines.Key_31342, 19)); data.Add(72, DeclareWingInfo.Create(StringDefines.Key_31343, 72)); data.Add(73, DeclareWingInfo.Create(StringDefines.Key_31344, 73)); data.Add(76, DeclareWingInfo.Create(StringDefines.Key_31345, 76)); data.Add(80, DeclareWingInfo.Create(StringDefines.Key_31346, 80)); data.Add(81, DeclareWingInfo.Create(StringDefines.Key_31347, 81)); data.Add(115, DeclareWingInfo.Create(StringDefines.Key_31348, 115)); data.Add(95, DeclareWingInfo.Create(StringDefines.Key_31349, 95)); data.Add(120, DeclareWingInfo.Create(StringDefines.Key_31350, 120)); data.Add(121, DeclareWingInfo.Create(StringDefines.Key_31351, 121)); data.Add(126, DeclareWingInfo.Create(StringDefines.Key_31352, 126)); data.Add(42, DeclareWingInfo.Create(StringDefines.Key_31353, 42)); data.Add(136, DeclareWingInfo.Create(StringDefines.Key_31354, 136)); data.Add(137, DeclareWingInfo.Create(StringDefines.Key_31355, 137)); }
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[]> >("DataWingInfo"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataWingInfo = require 'Lua/Config/DataWingInfo'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataWingInfo"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclareWingInfo>(14); foreach (var item in dic) { DeclareWingInfo tmp = new DeclareWingInfo(); tmp.ConditionInfo = CfgStringLua.Get(item.Value[0]); tmp.Id = item.Value[1]; _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "WingInfo"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclareWingInfo>(14); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "WingInfo"); } } }