Exemplo n.º 1
0
      public void SerializableTable(ArrayList valuesList, string skey, Hashtable _hash)
      {
          if (string.IsNullOrEmpty(skey))
          {
              throw TableException.ErrorReader("Read File{0} as key is Empty Fail!!!", GetInstanceFile());
          }

          if ((int)_ID.MAX_RECORD != valuesList.Count)
          {
              throw TableException.ErrorReader("Load {0} error as CodeSize:{1} not Equal DataSize:{2}", GetInstanceFile(), _ID.MAX_RECORD, valuesList.Count);
          }
          Int32         nKey    = Convert.ToInt32(skey);
          Tab_SkillBase _values = new Tab_SkillBase();

          _values.m_BuffId  = Convert.ToInt32(valuesList[(int)_ID.ID_BUFF_ID] as string);
          _values.m_BuffOdd = Convert.ToInt32(valuesList[(int)_ID.ID_BUFF_ODD] as string);
          _values.m_Cost    = Convert.ToInt32(valuesList[(int)_ID.ID_COST] as string);
          _values.m_DamPer  = Convert.ToInt32(valuesList[(int)_ID.ID_DAM_PER] as string);
          _values.m_Name    = valuesList[(int)_ID.ID_NAME] as string;
          _values.m_ReceiveEffectIdButtom = Convert.ToInt32(valuesList[(int)_ID.ID_RECEIVE_EFFECT_ID_BUTTOM] as string);
          _values.m_ReceiveEffectIdTop    = Convert.ToInt32(valuesList[(int)_ID.ID_RECEIVE_EFFECT_ID_TOP] as string);
          _values.m_ReleaseEffectIdButtom = Convert.ToInt32(valuesList[(int)_ID.ID_RELEASE_EFFECT_ID_BUTTOM] as string);
          _values.m_ReleaseEffectIdTop    = Convert.ToInt32(valuesList[(int)_ID.ID_RELEASE_EFFECT_ID_TOP] as string);
          _values.m_SkillType             = Convert.ToInt32(valuesList[(int)_ID.ID_SKILL_TYPE] as string);
          _values.m_TargetForce           = Convert.ToInt32(valuesList[(int)_ID.ID_TARGET_FORCE] as string);
          _values.m_TargetType            = Convert.ToInt32(valuesList[(int)_ID.ID_TARGET_TYPE] as string);

          _hash.Add(nKey, _values);
      }
Exemplo n.º 2
0
      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_SkillBase _values = new Tab_SkillBase();

          _values.m_ChangeMode [0]          = Convert.ToInt32(valuesList[(int)_ID.ID_CHANGEMODE0] as string);
          _values.m_ChangeMode [1]          = Convert.ToInt32(valuesList[(int)_ID.ID_CHANGEMODE1] as string);
          _values.m_ChangeMode [2]          = Convert.ToInt32(valuesList[(int)_ID.ID_CHANGEMODE2] as string);
          _values.m_ChangeMode [3]          = Convert.ToInt32(valuesList[(int)_ID.ID_CHANGEMODE3] as string);
          _values.m_FirstIndex              = Convert.ToInt32(valuesList[(int)_ID.ID_FIRSTINDEX] as string);
          _values.m_HasPublicCd             = Convert.ToInt32(valuesList[(int)_ID.ID_HASPUBLICCD] as string);
          _values.m_Icon                    = valuesList[(int)_ID.ID_ICON] as string;
          _values.m_Id                      = Convert.ToInt32(valuesList[(int)_ID.ID_ID] as string);
          _values.m_IsAutoSelectTar         = Convert.ToInt32(valuesList[(int)_ID.ID_ISAUTOSELECTTAR] as string);
          _values.m_IsBreakBeAttacked       = Convert.ToInt32(valuesList[(int)_ID.ID_ISBREAKBEATTACKED] as string);
          _values.m_IsMove                  = Convert.ToInt32(valuesList[(int)_ID.ID_ISMOVE] as string);
          _values.m_IsMoveBreak             = Convert.ToInt32(valuesList[(int)_ID.ID_ISMOVEBREAK] as string);
          _values.m_IsMoveToTarInAutoCombat = Convert.ToInt32(valuesList[(int)_ID.ID_ISMOVETOTARINAUTOCOMBAT] as string);
          _values.m_IsNeedStopEffectId [0]  = Convert.ToInt32(valuesList[(int)_ID.ID_ISNEEDSTOPEFFECTID1] as string);
          _values.m_IsNeedStopEffectId [1]  = Convert.ToInt32(valuesList[(int)_ID.ID_ISNEEDSTOPEFFECTID2] as string);
          _values.m_IsNeedWeapon            = Convert.ToInt32(valuesList[(int)_ID.ID_ISNEEDWEAPON] as string);
          _values.m_IsShowSkillName         = Convert.ToInt32(valuesList[(int)_ID.ID_ISSHOWSKILLNAME] as string);
          _values.m_IsSkillBreak            = Convert.ToInt32(valuesList[(int)_ID.ID_ISSKILLBREAK] as string);
          _values.m_LevelUpIndex            = Convert.ToInt32(valuesList[(int)_ID.ID_LEVELUPINDEX] as string);
          _values.m_Name                    = valuesList[(int)_ID.ID_NAME] as string;
          _values.m_NextIndex               = Convert.ToInt32(valuesList[(int)_ID.ID_NEXTINDEX] as string);
          _values.m_PlayAttackSound         = Convert.ToInt32(valuesList[(int)_ID.ID_PLAYATTACKSOUND] as string);
          _values.m_PriorityAutoFight       = Convert.ToInt32(valuesList[(int)_ID.ID_PRIORITYAUTOFIGHT] as string);
          _values.m_ProfessionId            = Convert.ToInt32(valuesList[(int)_ID.ID_PROFESSIONID] as string);
          _values.m_SelLogic                = Convert.ToInt32(valuesList[(int)_ID.ID_SELLOGIC] as string);
          _values.m_SkillClass              = Convert.ToInt32(valuesList[(int)_ID.ID_SKILLCLASS] as string);
          _values.m_SkillIntro              = valuesList[(int)_ID.ID_SKILLINTRO] as string;
          _values.m_TargetType              = Convert.ToInt32(valuesList[(int)_ID.ID_TARGETTYPE] as string);
          _values.m_UseType                 = Convert.ToInt32(valuesList[(int)_ID.ID_USETYPE] as string);
          _values.m_XpSkillIndex            = Convert.ToInt32(valuesList[(int)_ID.ID_XPSKILLINDEX] 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);
          }
      }