public static DeclareSoulBeastsEquipLevel Create(string in_att, int in_id, int in_level, int in_needExp, int in_part) { DeclareSoulBeastsEquipLevel tmp = new DeclareSoulBeastsEquipLevel(); tmp._att = in_att; tmp._id = in_id; tmp._level = in_level; tmp._needExp = in_needExp; tmp._part = in_part; return(tmp); }
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[]> >("DataSoulBeastsEquipLevel"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataSoulBeastsEquipLevel = require 'Lua/Config/DataSoulBeastsEquipLevel'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataSoulBeastsEquipLevel"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclareSoulBeastsEquipLevel>(505); foreach (var item in dic) { DeclareSoulBeastsEquipLevel tmp = new DeclareSoulBeastsEquipLevel(); tmp.Att = CfgStringLua.Get(item.Value[0]); tmp.Id = item.Value[1]; tmp.Level = item.Value[2]; tmp.NeedExp = item.Value[3]; tmp.Part = item.Value[4]; _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "SoulBeastsEquipLevel"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclareSoulBeastsEquipLevel>(505); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "SoulBeastsEquipLevel"); } } }