public static DeclareMasterLevel Create(string in_att, int in_holy, int in_lv, string in_name, int in_radio, int in_upNeed) { DeclareMasterLevel tmp = new DeclareMasterLevel(); tmp._att = in_att; tmp._holy = in_holy; tmp._lv = in_lv; tmp._name = in_name; tmp._radio = in_radio; tmp._upNeed = in_upNeed; 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[]> >("DataMasterLevel"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataMasterLevel = require 'Lua/Config/DataMasterLevel'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataMasterLevel"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclareMasterLevel>(); foreach (var item in dic) { DeclareMasterLevel tmp = new DeclareMasterLevel(); tmp.Att = CfgStringLua.Get(item.Value[0]); tmp.Holy = item.Value[1]; tmp.Lv = item.Value[2]; tmp.Name = CfgStringLua.Get(item.Value[3]); tmp.Radio = item.Value[4]; tmp.UpNeed = item.Value[5]; _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "MasterLevel"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclareMasterLevel>(); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "MasterLevel"); } } }