public static void Convert(Dictionary <int, DeclareSoulBeasts> data) { if (data == null) { return; } data.Clear(); data.Add(1, DeclareSoulBeasts.Create(StringDefines.Key_34470, 1, 1465, 1, StringDefines.Key_34471, StringDefines.Key_34472, StringDefines.Key_34473, 1)); data.Add(2, DeclareSoulBeasts.Create(StringDefines.Key_34474, 1, 1466, 2, StringDefines.Key_34475, StringDefines.Key_34476, StringDefines.Key_34477, 2)); data.Add(3, DeclareSoulBeasts.Create(StringDefines.Key_34478, 1, 1467, 3, StringDefines.Key_34479, StringDefines.Key_34480, StringDefines.Key_34481, 3)); data.Add(4, DeclareSoulBeasts.Create(StringDefines.Key_34482, 1, 1468, 4, StringDefines.Key_34483, StringDefines.Key_34484, StringDefines.Key_34485, 4)); data.Add(5, DeclareSoulBeasts.Create(StringDefines.Key_34486, 1, 1469, 5, StringDefines.Key_34487, StringDefines.Key_34488, StringDefines.Key_34489, 5)); data.Add(6, DeclareSoulBeasts.Create(StringDefines.Key_34490, 1, 1470, 6, StringDefines.Key_34491, StringDefines.Key_34492, StringDefines.Key_34493, 6)); data.Add(7, DeclareSoulBeasts.Create(StringDefines.Key_34494, 1, 1471, 7, StringDefines.Key_34495, StringDefines.Key_34492, StringDefines.Key_34496, 7)); data.Add(8, DeclareSoulBeasts.Create(StringDefines.Key_34497, 1, 1472, 8, StringDefines.Key_34498, StringDefines.Key_34499, StringDefines.Key_34500, 8)); data.Add(9, DeclareSoulBeasts.Create(StringDefines.Key_34501, 1, 1473, 9, StringDefines.Key_34502, StringDefines.Key_34503, StringDefines.Key_34504, 9)); data.Add(10, DeclareSoulBeasts.Create(StringDefines.Key_34505, 1, 1474, 10, StringDefines.Key_34506, StringDefines.Key_34507, StringDefines.Key_34508, 10)); data.Add(11, DeclareSoulBeasts.Create(StringDefines.Key_34509, 1, 1475, 11, StringDefines.Key_34510, StringDefines.Key_34507, StringDefines.Key_34511, 11)); data.Add(12, DeclareSoulBeasts.Create(StringDefines.Key_34512, 1, 1476, 12, StringDefines.Key_34513, StringDefines.Key_34514, StringDefines.Key_34515, 12)); data.Add(13, DeclareSoulBeasts.Create(StringDefines.Key_34516, 1, 1477, 13, StringDefines.Key_34517, StringDefines.Key_34518, StringDefines.Key_34519, 13)); data.Add(14, DeclareSoulBeasts.Create(StringDefines.Key_34520, 1, 1478, 14, StringDefines.Key_34521, StringDefines.Key_34522, StringDefines.Key_34523, 14)); data.Add(15, DeclareSoulBeasts.Create(StringDefines.Key_34524, 1, 1479, 15, StringDefines.Key_34525, StringDefines.Key_34522, StringDefines.Key_34526, 15)); data.Add(16, DeclareSoulBeasts.Create(StringDefines.Key_34527, 1, 1480, 16, StringDefines.Key_34528, StringDefines.Key_34529, StringDefines.Key_34530, 16)); data.Add(17, DeclareSoulBeasts.Create(StringDefines.Key_34531, 1, 1481, 17, StringDefines.Key_34532, StringDefines.Key_34533, StringDefines.Key_34534, 17)); data.Add(18, DeclareSoulBeasts.Create(StringDefines.Key_34535, 1, 1482, 18, StringDefines.Key_34536, StringDefines.Key_34537, StringDefines.Key_34538, 18)); data.Add(19, DeclareSoulBeasts.Create(StringDefines.Key_34539, 1, 1483, 19, StringDefines.Key_34540, StringDefines.Key_34541, StringDefines.Key_34542, 19)); data.Add(20, DeclareSoulBeasts.Create(StringDefines.Key_34543, 0, 1484, 20, StringDefines.Key_2099, StringDefines.Key_34544, StringDefines.Key_34545, 20)); data.Add(21, DeclareSoulBeasts.Create(StringDefines.Key_34546, 0, 1485, 21, StringDefines.Key_34547, StringDefines.Key_34544, StringDefines.Key_34548, 21)); data.Add(22, DeclareSoulBeasts.Create(StringDefines.Key_34549, 0, 1486, 22, StringDefines.Key_34550, StringDefines.Key_34544, StringDefines.Key_34551, 22)); }
public static DeclareSoulBeasts Create(string in_attribute, int in_canShow, int in_icon, int in_id, string in_name, string in_needEquip, string in_skill, int in_text) { DeclareSoulBeasts tmp = new DeclareSoulBeasts(); tmp._attribute = in_attribute; tmp._canShow = in_canShow; tmp._icon = in_icon; tmp._id = in_id; tmp._name = in_name; tmp._needEquip = in_needEquip; tmp._skill = in_skill; tmp._text = in_text; 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[]> >("DataSoulBeasts"); if (dic == null) { LuaEnv.SharedLuaEnv.DoString("DataSoulBeasts = require 'Lua/Config/DataSoulBeasts'"); dic = LuaEnv.SharedLuaEnv.Global.Get <Dictionary <int, int[]> >("DataSoulBeasts"); } if (dic != null) { _dataCaches = new Dictionary <int, DeclareSoulBeasts>(22); foreach (var item in dic) { DeclareSoulBeasts tmp = new DeclareSoulBeasts(); tmp.Attribute = CfgStringLua.Get(item.Value[0]); tmp.CanShow = item.Value[1]; tmp.Icon = item.Value[2]; tmp.Id = item.Value[3]; tmp.Name = CfgStringLua.Get(item.Value[4]); tmp.NeedEquip = CfgStringLua.Get(item.Value[5]); tmp.Skill = CfgStringLua.Get(item.Value[6]); tmp.Text = item.Value[7]; _dataCaches.Add(item.Key, tmp); } } Record(startTime, DateTime.Now.Ticks, "SoulBeasts"); } if (_dataCaches == null && _fillDataCallBack != null) { if (_dataCaches == null) { long startTime = DateTime.Now.Ticks; _dataCaches = new Dictionary <int, DeclareSoulBeasts>(22); _fillDataCallBack(_dataCaches); Record(startTime, DateTime.Now.Ticks, "SoulBeasts"); } } }