public static DeclareSyntheticSuitStone Create(int in_id, string in_name, string in_need, int in_need_money, int in_type) { DeclareSyntheticSuitStone tmp = new DeclareSyntheticSuitStone(); tmp._id = in_id; tmp._name = in_name; tmp._need = in_need; tmp._need_money = in_need_money; tmp._type = in_type; return(tmp); }
public static void Convert(Dictionary <int, DeclareSyntheticSuitStone> data) { if (data == null) { return; } data.Clear(); data.Add(50118, DeclareSyntheticSuitStone.Create(50118, StringDefines.Key_1852, StringDefines.Key_13601, 1000, 0)); data.Add(50119, DeclareSyntheticSuitStone.Create(50119, StringDefines.Key_1854, StringDefines.Key_13602, 1000, 0)); data.Add(50120, DeclareSyntheticSuitStone.Create(50120, StringDefines.Key_1856, StringDefines.Key_13603, 1000, 0)); data.Add(50121, DeclareSyntheticSuitStone.Create(50121, StringDefines.Key_1858, StringDefines.Key_13604, 1000, 0)); data.Add(50122, DeclareSyntheticSuitStone.Create(50122, StringDefines.Key_1860, StringDefines.Key_13605, 1000, 0)); data.Add(50123, DeclareSyntheticSuitStone.Create(50123, StringDefines.Key_1862, StringDefines.Key_13606, 1000, 0)); data.Add(50124, DeclareSyntheticSuitStone.Create(50124, StringDefines.Key_1864, StringDefines.Key_13601, 1000, 1)); data.Add(50125, DeclareSyntheticSuitStone.Create(50125, StringDefines.Key_1866, StringDefines.Key_13602, 1000, 1)); data.Add(50126, DeclareSyntheticSuitStone.Create(50126, StringDefines.Key_1868, StringDefines.Key_13603, 1000, 1)); data.Add(50127, DeclareSyntheticSuitStone.Create(50127, StringDefines.Key_1870, StringDefines.Key_13604, 1000, 1)); data.Add(50128, DeclareSyntheticSuitStone.Create(50128, StringDefines.Key_1872, StringDefines.Key_13605, 1000, 1)); data.Add(50129, DeclareSyntheticSuitStone.Create(50129, StringDefines.Key_1874, StringDefines.Key_13606, 1000, 1)); }
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[]> >("DataSyntheticSuitStone"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataSyntheticSuitStone = require 'Lua/Config/DataSyntheticSuitStone'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataSyntheticSuitStone"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclareSyntheticSuitStone>(12); foreach (var item in dic) { DeclareSyntheticSuitStone tmp = new DeclareSyntheticSuitStone(); tmp.Id = item.Value[0]; tmp.Name = CfgStringLua.Get(item.Value[1]); tmp.Need = CfgStringLua.Get(item.Value[2]); tmp.NeedMoney = item.Value[3]; tmp.Type = item.Value[4]; _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "SyntheticSuitStone"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclareSyntheticSuitStone>(12); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "SyntheticSuitStone"); } } }