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[]> >("DataSoulBeastsEquipSynthesis"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataSoulBeastsEquipSynthesis = require 'Lua/Config/DataSoulBeastsEquipSynthesis'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataSoulBeastsEquipSynthesis"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclareSoulBeastsEquipSynthesis>(10); foreach (var item in dic) { DeclareSoulBeastsEquipSynthesis tmp = new DeclareSoulBeastsEquipSynthesis(); tmp.DemandItem = CfgStringLua.Get(item.Value[0]); tmp.DiamondNumber = item.Value[1]; tmp.EquipDiamondNumber = item.Value[2]; tmp.EquipID = item.Value[3]; tmp.EquipPosition = item.Value[4]; tmp.EquipQuality = item.Value[5]; tmp.Id = item.Value[6]; tmp.JoinNum = CfgStringLua.Get(item.Value[7]); tmp.JoinNumProbability = CfgStringLua.Get(item.Value[8]); tmp.Quality = item.Value[9]; tmp.Shielding = item.Value[10]; tmp.SynthesisLevel = item.Value[11]; _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "SoulBeastsEquipSynthesis"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclareSoulBeastsEquipSynthesis>(10); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "SoulBeastsEquipSynthesis"); } } }
public static void Convert(Dictionary <int, DeclareSoulBeastsEquipSynthesis> data) { if (data == null) { return; } data.Clear(); data.Add(1, DeclareSoulBeastsEquipSynthesis.Create(StringDefines.Key_20, 2, 3, 2000051, 1, 7, 1, StringDefines.Key_4241, StringDefines.Key_30794, 7, 0, 1)); data.Add(2, DeclareSoulBeastsEquipSynthesis.Create(StringDefines.Key_20, 2, 3, 2000052, 2, 7, 2, StringDefines.Key_4241, StringDefines.Key_30794, 7, 0, 1)); data.Add(3, DeclareSoulBeastsEquipSynthesis.Create(StringDefines.Key_20, 2, 3, 2000053, 3, 7, 3, StringDefines.Key_4241, StringDefines.Key_30794, 7, 0, 1)); data.Add(4, DeclareSoulBeastsEquipSynthesis.Create(StringDefines.Key_20, 2, 3, 2000054, 4, 7, 4, StringDefines.Key_4241, StringDefines.Key_30794, 7, 0, 1)); data.Add(5, DeclareSoulBeastsEquipSynthesis.Create(StringDefines.Key_20, 2, 3, 2000055, 5, 7, 5, StringDefines.Key_4241, StringDefines.Key_30794, 7, 0, 1)); data.Add(6, DeclareSoulBeastsEquipSynthesis.Create(StringDefines.Key_30795, 3, 3, 2000056, 1, 8, 6, StringDefines.Key_4241, StringDefines.Key_30794, 7, 0, 1)); data.Add(7, DeclareSoulBeastsEquipSynthesis.Create(StringDefines.Key_30795, 3, 3, 2000057, 2, 8, 7, StringDefines.Key_4241, StringDefines.Key_30794, 7, 0, 1)); data.Add(8, DeclareSoulBeastsEquipSynthesis.Create(StringDefines.Key_30795, 3, 3, 2000058, 3, 8, 8, StringDefines.Key_4241, StringDefines.Key_30794, 7, 0, 1)); data.Add(9, DeclareSoulBeastsEquipSynthesis.Create(StringDefines.Key_30795, 3, 3, 2000059, 4, 8, 9, StringDefines.Key_4241, StringDefines.Key_30794, 7, 0, 1)); data.Add(10, DeclareSoulBeastsEquipSynthesis.Create(StringDefines.Key_30795, 3, 3, 2000060, 5, 8, 10, StringDefines.Key_4241, StringDefines.Key_30794, 7, 0, 1)); }
public static DeclareSoulBeastsEquipSynthesis Create(string in_demand_item, int in_diamond_Number, int in_equip_diamond_Number, int in_equip_ID, int in_equip_position, int in_equip_quality, int in_id, string in_join_num, string in_join_num_probability, int in_quality, int in_shielding, int in_synthesis_level) { DeclareSoulBeastsEquipSynthesis tmp = new DeclareSoulBeastsEquipSynthesis(); tmp._demand_item = in_demand_item; tmp._diamond_Number = in_diamond_Number; tmp._equip_diamond_Number = in_equip_diamond_Number; tmp._equip_ID = in_equip_ID; tmp._equip_position = in_equip_position; tmp._equip_quality = in_equip_quality; tmp._id = in_id; tmp._join_num = in_join_num; tmp._join_num_probability = in_join_num_probability; tmp._quality = in_quality; tmp._shielding = in_shielding; tmp._synthesis_level = in_synthesis_level; return(tmp); }