public static DeclareRYZCAward Create(string in_award, int in_id, string in_name, int in_rank_max, int in_rank_min, int in_res_icon) { DeclareRYZCAward tmp = new DeclareRYZCAward(); tmp._award = in_award; tmp._id = in_id; tmp._name = in_name; tmp._rank_max = in_rank_max; tmp._rank_min = in_rank_min; tmp._res_icon = in_res_icon; return(tmp); }
public static void Convert(Dictionary <int, DeclareRYZCAward> data) { if (data == null) { return; } data.Clear(); data.Add(1, DeclareRYZCAward.Create(StringDefines.Key_19940, 1, StringDefines.Key_19941, 1, 1, 1298)); data.Add(2, DeclareRYZCAward.Create(StringDefines.Key_19942, 2, StringDefines.Key_19943, 3, 2, 1297)); data.Add(3, DeclareRYZCAward.Create(StringDefines.Key_19944, 3, StringDefines.Key_19945, 6, 4, 1296)); data.Add(4, DeclareRYZCAward.Create(StringDefines.Key_19946, 4, StringDefines.Key_19947, 10, 7, 1295)); data.Add(5, DeclareRYZCAward.Create(StringDefines.Key_19948, 5, StringDefines.Key_42252, 15, 11, 1315)); data.Add(6, DeclareRYZCAward.Create(StringDefines.Key_42253, 6, StringDefines.Key_42254, 30, 16, 1315)); }
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[]> >("DataRYZCAward"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataRYZCAward = require 'Lua/Config/DataRYZCAward'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataRYZCAward"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclareRYZCAward>(6); foreach (var item in dic) { DeclareRYZCAward tmp = new DeclareRYZCAward(); tmp.Award = CfgStringLua.Get(item.Value[0]); tmp.Id = item.Value[1]; tmp.Name = CfgStringLua.Get(item.Value[2]); tmp.RankMax = item.Value[3]; tmp.RankMin = item.Value[4]; tmp.ResIcon = item.Value[5]; _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "RYZCAward"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclareRYZCAward>(6); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "RYZCAward"); } } }