public static DeclareKuafuGuildBattle Create(int in_fail_integral, string in_fail_reward, int in_id, string in_month_reward, int in_victory_integral, string in_victory_reward, string in_week_reward) { DeclareKuafuGuildBattle tmp = new DeclareKuafuGuildBattle(); tmp._fail_integral = in_fail_integral; tmp._fail_reward = in_fail_reward; tmp._id = in_id; tmp._month_reward = in_month_reward; tmp._victory_integral = in_victory_integral; tmp._victory_reward = in_victory_reward; tmp._week_reward = in_week_reward; 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[]> >("DataKuafuGuildBattle"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataKuafuGuildBattle = require 'Lua/Config/DataKuafuGuildBattle'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataKuafuGuildBattle"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclareKuafuGuildBattle>(16); foreach (var item in dic) { DeclareKuafuGuildBattle tmp = new DeclareKuafuGuildBattle(); tmp.FailIntegral = item.Value[0]; tmp.FailReward = CfgStringLua.Get(item.Value[1]); tmp.Id = item.Value[2]; tmp.MonthReward = CfgStringLua.Get(item.Value[3]); tmp.VictoryIntegral = item.Value[4]; tmp.VictoryReward = CfgStringLua.Get(item.Value[5]); tmp.WeekReward = CfgStringLua.Get(item.Value[6]); _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "KuafuGuildBattle"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclareKuafuGuildBattle>(16); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "KuafuGuildBattle"); } } }
public static void Convert(Dictionary <int, DeclareKuafuGuildBattle> data) { if (data == null) { return; } data.Clear(); data.Add(1, DeclareKuafuGuildBattle.Create(100, StringDefines.Key_18091, 1, StringDefines.Key_31288, 1000, StringDefines.Key_31289, StringDefines.Key_31290)); data.Add(2, DeclareKuafuGuildBattle.Create(90, StringDefines.Key_18091, 2, StringDefines.Key_31291, 900, StringDefines.Key_31292, StringDefines.Key_31293)); data.Add(3, DeclareKuafuGuildBattle.Create(80, StringDefines.Key_18091, 3, StringDefines.Key_31294, 800, StringDefines.Key_31295, StringDefines.Key_31296)); data.Add(4, DeclareKuafuGuildBattle.Create(70, StringDefines.Key_18091, 4, StringDefines.Key_31297, 700, StringDefines.Key_31298, StringDefines.Key_31299)); data.Add(5, DeclareKuafuGuildBattle.Create(60, StringDefines.Key_18091, 5, StringDefines.Key_31300, 600, StringDefines.Key_31301, StringDefines.Key_31302)); data.Add(6, DeclareKuafuGuildBattle.Create(50, StringDefines.Key_18091, 6, StringDefines.Key_31303, 500, StringDefines.Key_31304, StringDefines.Key_31305)); data.Add(7, DeclareKuafuGuildBattle.Create(40, StringDefines.Key_18091, 7, StringDefines.Key_31306, 400, StringDefines.Key_31307, StringDefines.Key_31308)); data.Add(8, DeclareKuafuGuildBattle.Create(30, StringDefines.Key_18091, 8, StringDefines.Key_31309, 300, StringDefines.Key_31310, StringDefines.Key_31311)); data.Add(9, DeclareKuafuGuildBattle.Create(20, StringDefines.Key_18091, 9, StringDefines.Key_31312, 200, StringDefines.Key_31313, StringDefines.Key_31314)); data.Add(10, DeclareKuafuGuildBattle.Create(10, StringDefines.Key_18091, 10, StringDefines.Key_31315, 100, StringDefines.Key_31316, StringDefines.Key_31317)); data.Add(11, DeclareKuafuGuildBattle.Create(9, StringDefines.Key_18091, 11, StringDefines.Key_31318, 90, StringDefines.Key_31319, StringDefines.Key_31320)); data.Add(12, DeclareKuafuGuildBattle.Create(8, StringDefines.Key_18091, 12, StringDefines.Key_31321, 80, StringDefines.Key_31322, StringDefines.Key_31323)); data.Add(13, DeclareKuafuGuildBattle.Create(7, StringDefines.Key_18091, 13, StringDefines.Key_31324, 70, StringDefines.Key_31325, StringDefines.Key_31326)); data.Add(14, DeclareKuafuGuildBattle.Create(6, StringDefines.Key_18091, 14, StringDefines.Key_31327, 60, StringDefines.Key_31328, StringDefines.Key_31329)); data.Add(15, DeclareKuafuGuildBattle.Create(5, StringDefines.Key_18091, 15, StringDefines.Key_31330, 50, StringDefines.Key_31331, StringDefines.Key_31332)); data.Add(16, DeclareKuafuGuildBattle.Create(4, StringDefines.Key_18091, 16, StringDefines.Key_31333, 40, StringDefines.Key_31334, StringDefines.Key_31335)); }