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[]> >("DataPlayerTitleRune"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataPlayerTitleRune = require 'Lua/Config/DataPlayerTitleRune'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataPlayerTitleRune"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclarePlayerTitleRune>(); foreach (var item in dic) { DeclarePlayerTitleRune tmp = new DeclarePlayerTitleRune(); tmp.ActiveNeedValue = item.Value[0]; tmp.Att = CfgStringLua.Get(item.Value[1]); tmp.CritGet = item.Value[2]; tmp.CritPer = item.Value[3]; tmp.DecGold = item.Value[4]; tmp.EachAdd = item.Value[5]; tmp.EachCount = item.Value[6]; tmp.FullAtt = CfgStringLua.Get(item.Value[7]); tmp.Id = item.Value[8]; tmp.LimitDecGold = item.Value[9]; tmp.Name = CfgStringLua.Get(item.Value[10]); tmp.NormalGet = item.Value[11]; tmp.Radio = item.Value[12]; tmp.Res = item.Value[13]; tmp.SuperGet = item.Value[14]; tmp.SuperPer = item.Value[15]; tmp.UpNeedExp = item.Value[16]; _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "PlayerTitleRune"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclarePlayerTitleRune>(); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "PlayerTitleRune"); } } }
public static DeclarePlayerTitleRune Create(int in_activeNeedValue, string in_att, int in_critGet, int in_critPer, int in_decGold, int in_eachAdd, int in_eachCount, string in_full_att, int in_id, int in_limitDecGold, string in_name, int in_normalGet, int in_radio, int in_res, int in_superGet, int in_superPer, int in_upNeedExp) { DeclarePlayerTitleRune tmp = new DeclarePlayerTitleRune(); tmp._activeNeedValue = in_activeNeedValue; tmp._att = in_att; tmp._critGet = in_critGet; tmp._critPer = in_critPer; tmp._decGold = in_decGold; tmp._eachAdd = in_eachAdd; tmp._eachCount = in_eachCount; tmp._full_att = in_full_att; tmp._id = in_id; tmp._limitDecGold = in_limitDecGold; tmp._name = in_name; tmp._normalGet = in_normalGet; tmp._radio = in_radio; tmp._res = in_res; tmp._superGet = in_superGet; tmp._superPer = in_superPer; tmp._upNeedExp = in_upNeedExp; return(tmp); }