public static void SerializableTable(string[] valuesList, int skey, Dictionary <int, List <object> > _hash) { if ((int)_ID.MAX_RECORD != valuesList.Length) { throw TableException.ErrorReader("Load {0} error as CodeSize:{1} not Equal DataSize:{2}", GetInstanceFile(), _ID.MAX_RECORD, valuesList.Length); } Tab_SkillEx _values = new Tab_SkillEx(); _values.m_BaseId = Convert.ToInt32(valuesList[(int)_ID.ID_BASEID] as string); _values.m_BulletEffectID [0] = Convert.ToInt32(valuesList[(int)_ID.ID_BULLETEFFECTID_01] as string); _values.m_BulletEffectID [1] = Convert.ToInt32(valuesList[(int)_ID.ID_BULLETEFFECTID_02] as string); _values.m_BulletEffectID [2] = Convert.ToInt32(valuesList[(int)_ID.ID_BULLETEFFECTID_03] as string); _values.m_CDTimeId = Convert.ToInt32(valuesList[(int)_ID.ID_CDTIMEID] as string); _values.m_CameraRockId = Convert.ToInt32(valuesList[(int)_ID.ID_CAMERAROCKID] as string); _values.m_CameraRockRate = Convert.ToInt32(valuesList[(int)_ID.ID_CAMERAROCKRATE] as string); _values.m_DelNum = Convert.ToInt32(valuesList[(int)_ID.ID_DELNUM] as string); _values.m_DelType = Convert.ToInt32(valuesList[(int)_ID.ID_DELTYPE] as string); _values.m_Impact [0] = Convert.ToInt32(valuesList[(int)_ID.ID_IMPACT_01] as string); _values.m_Impact [1] = Convert.ToInt32(valuesList[(int)_ID.ID_IMPACT_2] as string); _values.m_Impact [2] = Convert.ToInt32(valuesList[(int)_ID.ID_IMPACT_03] as string); _values.m_Impact [3] = Convert.ToInt32(valuesList[(int)_ID.ID_IMPACT_04] as string); _values.m_Impact [4] = Convert.ToInt32(valuesList[(int)_ID.ID_IMPACT_05] as string); _values.m_Impact [5] = Convert.ToInt32(valuesList[(int)_ID.ID_IMPACT_06] as string); _values.m_LogicParam [0] = Convert.ToInt32(valuesList[(int)_ID.ID_LOGICPARAM01] as string); _values.m_LogicParam [1] = Convert.ToInt32(valuesList[(int)_ID.ID_LOGICPARAM02] as string); _values.m_LogicParam [2] = Convert.ToInt32(valuesList[(int)_ID.ID_LOGICPARAM03] as string); _values.m_LogicParam [3] = Convert.ToInt32(valuesList[(int)_ID.ID_LOGICPARAM04] as string); _values.m_NextSkillId = Convert.ToInt32(valuesList[(int)_ID.ID_NEXTSKILLID] as string); _values.m_Radius = Convert.ToSingle(valuesList[(int)_ID.ID_RADIUS] as string); _values.m_RangeEffectSize [0] = Convert.ToInt32(valuesList[(int)_ID.ID_RANGEEFFECTSIZE01] as string); _values.m_RangeEffectSize [1] = Convert.ToInt32(valuesList[(int)_ID.ID_RANGEEFFECTSIZE02] as string); _values.m_RangeEffectTarType = Convert.ToInt32(valuesList[(int)_ID.ID_RANGEEFFECTTARTYPE] as string); _values.m_RangeEffectType = Convert.ToInt32(valuesList[(int)_ID.ID_RANGEEFFECTTYPE] as string); _values.m_RefixThreat = Convert.ToInt32(valuesList[(int)_ID.ID_REFIXTHREAT] as string); _values.m_SatrtMotionId = Convert.ToInt32(valuesList[(int)_ID.ID_SATRTMOTIONID] as string); _values.m_SceneEffectId = Convert.ToInt32(valuesList[(int)_ID.ID_SCENEEFFECTID] as string); _values.m_SecondMotionId = Convert.ToInt32(valuesList[(int)_ID.ID_SECONDMOTIONID] as string); _values.m_SkillContinueTime = Convert.ToInt32(valuesList[(int)_ID.ID_SKILLCONTINUETIME] as string); _values.m_SkillDataID = Convert.ToInt32(valuesList[(int)_ID.ID_SKILLDATAID] as string); _values.m_SkillDelayTime = Convert.ToInt32(valuesList[(int)_ID.ID_SKILLDELAYTIME] as string); _values.m_SkillDesc = valuesList[(int)_ID.ID_SKILLDESC] as string; _values.m_SkillExID = Convert.ToInt32(valuesList[(int)_ID.ID_SKILLEXID] as string); _values.m_SkillLogic = Convert.ToInt32(valuesList[(int)_ID.ID_SKILLLOGIC] as string); _values.m_Level = Convert.ToInt32(valuesList[(int)_ID.ID_LEVEL] as string); if (_hash.ContainsKey(skey)) { List <object> tList = _hash[skey]; tList.Add(_values); } else { List <object> tList = new List <object>(); tList.Add(_values); _hash.Add(skey, (List <object>)tList); } }
public static bool InitTable_SkillEx() { g_SkillEx.Clear(); Dictionary <int, List <object> > tmps = new Dictionary <int, List <object> >(); if (!Tab_SkillEx.LoadTable(tmps)) { return(false); } foreach (KeyValuePair <int, List <object> > kv in tmps) { List <Tab_SkillEx> values = new List <Tab_SkillEx>(); foreach (object subit in kv.Value) { values.Add((Tab_SkillEx)subit); } g_SkillEx.Add(kv.Key, values); } return(true); }