public static DeclarePray Create(Int64 in_exp, int in_level, int in_money) { DeclarePray tmp = new DeclarePray(); tmp._exp = in_exp; tmp._level = in_level; tmp._money = in_money; 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[]> >("DataPray"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataPray = require 'Lua/Config/DataPray'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataPray"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclarePray>(800); foreach (var item in dic) { DeclarePray tmp = new DeclarePray(); tmp.Exp = item.Value[0]; tmp.Level = item.Value[1]; tmp.Money = item.Value[2]; _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "Pray"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclarePray>(800); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "Pray"); } } }