public static DeclareMarriage Create(string in_attr, int in_attType, int in_buffId, int in_level, string in_name, int in_needValue, int in_radio, int in_skillId) { DeclareMarriage tmp = new DeclareMarriage(); tmp._attr = in_attr; tmp._attType = in_attType; tmp._buffId = in_buffId; tmp._level = in_level; tmp._name = in_name; tmp._needValue = in_needValue; tmp._radio = in_radio; tmp._skillId = in_skillId; 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[]> >("DataMarriage"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataMarriage = require 'Lua/Config/DataMarriage'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataMarriage"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclareMarriage>(13); foreach (var item in dic) { DeclareMarriage tmp = new DeclareMarriage(); tmp.Attr = CfgStringLua.Get(item.Value[0]); tmp.AttType = item.Value[1]; tmp.BuffId = item.Value[2]; tmp.Level = item.Value[3]; tmp.Name = CfgStringLua.Get(item.Value[4]); tmp.NeedValue = item.Value[5]; tmp.Radio = item.Value[6]; tmp.SkillId = item.Value[7]; _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "Marriage"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclareMarriage>(13); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "Marriage"); } } }
public static void Convert(Dictionary <int, DeclareMarriage> data) { if (data == null) { return; } data.Clear(); data.Add(0, DeclareMarriage.Create(StringDefines.Key_10472, -1, 0, 0, StringDefines.Key_50024, 19300, 0, 0)); data.Add(1, DeclareMarriage.Create(StringDefines.Key_50025, -1, 0, 1, StringDefines.Key_50026, 27100, 0, 0)); data.Add(2, DeclareMarriage.Create(StringDefines.Key_50027, 1, 900001, 2, StringDefines.Key_50028, 38000, 0, 900001)); data.Add(3, DeclareMarriage.Create(StringDefines.Key_50029, 2, 0, 3, StringDefines.Key_50030, 53200, 1, 0)); data.Add(4, DeclareMarriage.Create(StringDefines.Key_50031, 3, 0, 4, StringDefines.Key_50032, 74400, 1, 900002)); data.Add(5, DeclareMarriage.Create(StringDefines.Key_50033, 4, 0, 5, StringDefines.Key_50034, 104200, 1, 0)); data.Add(6, DeclareMarriage.Create(StringDefines.Key_50035, -1, 0, 6, StringDefines.Key_50036, 146000, 1, 0)); data.Add(7, DeclareMarriage.Create(StringDefines.Key_50037, -1, 0, 7, StringDefines.Key_50038, 204400, 1, 0)); data.Add(8, DeclareMarriage.Create(StringDefines.Key_50039, -1, 0, 8, StringDefines.Key_50040, 286100, 1, 0)); data.Add(9, DeclareMarriage.Create(StringDefines.Key_50041, -1, 0, 9, StringDefines.Key_50042, 400600, 1, 0)); data.Add(10, DeclareMarriage.Create(StringDefines.Key_50043, -1, 0, 10, StringDefines.Key_50044, 560900, 1, 0)); data.Add(11, DeclareMarriage.Create(StringDefines.Key_50045, -1, 0, 11, StringDefines.Key_50046, 785200, 1, 0)); data.Add(12, DeclareMarriage.Create(StringDefines.Key_50047, -1, 0, 12, StringDefines.Key_50048, 0, 1, 0)); }