public static DeclarePrayCost Create(int in_num, string in_prayExpCost, string in_prayMoneyCost) { DeclarePrayCost tmp = new DeclarePrayCost(); tmp._num = in_num; tmp._prayExpCost = in_prayExpCost; tmp._prayMoneyCost = in_prayMoneyCost; return(tmp); }
public static void Convert(Dictionary <int, DeclarePrayCost> data) { if (data == null) { return; } data.Clear(); data.Add(1, DeclarePrayCost.Create(1, StringDefines.Key_12422, StringDefines.Key_28)); data.Add(2, DeclarePrayCost.Create(2, StringDefines.Key_28, StringDefines.Key_42208)); data.Add(3, DeclarePrayCost.Create(3, StringDefines.Key_42208, StringDefines.Key_42209)); data.Add(4, DeclarePrayCost.Create(4, StringDefines.Key_42209, StringDefines.Key_12334)); data.Add(5, DeclarePrayCost.Create(5, StringDefines.Key_12334, StringDefines.Key_13611)); data.Add(6, DeclarePrayCost.Create(6, StringDefines.Key_13611, StringDefines.Key_34180)); data.Add(7, DeclarePrayCost.Create(7, StringDefines.Key_34180, StringDefines.Key_42210)); data.Add(8, DeclarePrayCost.Create(8, StringDefines.Key_42210, StringDefines.Key_12369)); data.Add(9, DeclarePrayCost.Create(9, StringDefines.Key_12369, StringDefines.Key_42211)); data.Add(10, DeclarePrayCost.Create(10, StringDefines.Key_42211, StringDefines.Key_12392)); data.Add(11, DeclarePrayCost.Create(11, StringDefines.Key_12392, StringDefines.Key_42212)); data.Add(12, DeclarePrayCost.Create(12, StringDefines.Key_42212, StringDefines.Key_42213)); data.Add(13, DeclarePrayCost.Create(13, StringDefines.Key_42213, StringDefines.Key_42214)); data.Add(14, DeclarePrayCost.Create(14, StringDefines.Key_42214, StringDefines.Key_42215)); data.Add(15, DeclarePrayCost.Create(15, StringDefines.Key_42215, StringDefines.Key_42216)); data.Add(16, DeclarePrayCost.Create(16, StringDefines.Key_42216, StringDefines.Key_42217)); data.Add(17, DeclarePrayCost.Create(17, StringDefines.Key_42217, StringDefines.Key_42218)); data.Add(18, DeclarePrayCost.Create(18, StringDefines.Key_42218, StringDefines.Key_42219)); data.Add(19, DeclarePrayCost.Create(19, StringDefines.Key_42219, StringDefines.Key_42220)); data.Add(20, DeclarePrayCost.Create(20, StringDefines.Key_42220, StringDefines.Key_42221)); data.Add(21, DeclarePrayCost.Create(21, StringDefines.Key_42221, StringDefines.Key_42222)); data.Add(22, DeclarePrayCost.Create(22, StringDefines.Key_42222, StringDefines.Key_42223)); data.Add(23, DeclarePrayCost.Create(23, StringDefines.Key_42223, StringDefines.Key_42224)); data.Add(24, DeclarePrayCost.Create(24, StringDefines.Key_42224, StringDefines.Key_42225)); data.Add(25, DeclarePrayCost.Create(25, StringDefines.Key_42225, StringDefines.Key_42226)); data.Add(26, DeclarePrayCost.Create(26, StringDefines.Key_42226, StringDefines.Key_42227)); data.Add(27, DeclarePrayCost.Create(27, StringDefines.Key_42227, StringDefines.Key_42228)); data.Add(28, DeclarePrayCost.Create(28, StringDefines.Key_42228, StringDefines.Key_42229)); data.Add(29, DeclarePrayCost.Create(29, StringDefines.Key_42229, StringDefines.Key_42230)); data.Add(30, DeclarePrayCost.Create(30, StringDefines.Key_42230, StringDefines.Key_42231)); }
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[]> >("DataPrayCost"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataPrayCost = require 'Lua/Config/DataPrayCost'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataPrayCost"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclarePrayCost>(30); foreach (var item in dic) { DeclarePrayCost tmp = new DeclarePrayCost(); tmp.Num = item.Value[0]; tmp.PrayExpCost = CfgStringLua.Get(item.Value[1]); tmp.PrayMoneyCost = CfgStringLua.Get(item.Value[2]); _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "PrayCost"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclarePrayCost>(30); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "PrayCost"); } } }