public void UpdateField(int Id, int Index, byte[] buff, int start, int len) { SyncIdE SyncId = (SyncIdE)Id; byte[] updateBuffer = new byte[len]; Array.Copy(buff, start, updateBuffer, 0, len); int iValue = 0; long lValue = 0; switch (SyncId) { case SyncIdE.LASTREFRESHTIME: GameAssist.ReadInt32Variant(updateBuffer, 0, out iValue); m_Instance.LastRefreshTime = iValue; break; default: break; } try { if (NotifySyncValueChanged != null) { NotifySyncValueChanged(Id, Index); } } catch { Ex.Logger.Log("RefreshDataData.NotifySyncValueChanged catch exception"); } updateBuffer.GetType(); iValue++; lValue++; }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 4) { Ex.Logger.Log("MailIcon.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Ex.Logger.Log("MailIcon.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "Desc") { Ex.Logger.Log("MailIcon.csv中字段[Desc]位置不对应"); return(false); } if (vecLine[2] != "Unread") { Ex.Logger.Log("MailIcon.csv中字段[Unread]位置不对应"); return(false); } if (vecLine[3] != "Read") { Ex.Logger.Log("MailIcon.csv中字段[Read]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { MailIconElement member = new MailIconElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadString(binContent, readPos, out member.Desc); readPos += GameAssist.ReadString(binContent, readPos, out member.Unread); readPos += GameAssist.ReadString(binContent, readPos, out member.Read); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.ID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 4) { Debug.Log("BASEConfig.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Debug.Log("BASEConfig.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "Name") { Debug.Log("BASEConfig.csv中字段[Name]位置不对应"); return(false); } if (vecLine[2] != "Args1") { Debug.Log("BASEConfig.csv中字段[Args1]位置不对应"); return(false); } if (vecLine[3] != "Args2") { Debug.Log("BASEConfig.csv中字段[Args2]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { BASEConfigElement member = new BASEConfigElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadString(binContent, readPos, out member.Name); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Args1); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Args2); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.ID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 4) { Ex.Logger.Log("CargoType.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "Type") { Ex.Logger.Log("CargoType.csv中字段[Type]位置不对应"); return(false); } if (vecLine[1] != "MinNum") { Ex.Logger.Log("CargoType.csv中字段[MinNum]位置不对应"); return(false); } if (vecLine[2] != "MaxNum") { Ex.Logger.Log("CargoType.csv中字段[MaxNum]位置不对应"); return(false); } if (vecLine[3] != "Weight") { Ex.Logger.Log("CargoType.csv中字段[Weight]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { CargoTypeElement member = new CargoTypeElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MinNum); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MaxNum); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Weight); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.Type] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 4) { Ex.Logger.Log("Location.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Ex.Logger.Log("Location.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "PosX") { Ex.Logger.Log("Location.csv中字段[PosX]位置不对应"); return(false); } if (vecLine[2] != "Dungeons") { Ex.Logger.Log("Location.csv中字段[Dungeons]位置不对应"); return(false); } if (vecLine[3] != "Layer") { Ex.Logger.Log("Location.csv中字段[Layer]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { LocationElement member = new LocationElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadFloat(binContent, readPos, out member.PosX); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Dungeons); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Layer); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.ID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 4) { Ex.Logger.Log("Localization.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "id") { Ex.Logger.Log("Localization.csv中字段[id]位置不对应"); return(false); } if (vecLine[1] != "key") { Ex.Logger.Log("Localization.csv中字段[key]位置不对应"); return(false); } if (vecLine[2] != "cn") { Ex.Logger.Log("Localization.csv中字段[cn]位置不对应"); return(false); } if (vecLine[3] != "en") { Ex.Logger.Log("Localization.csv中字段[en]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { LocalizationElement member = new LocalizationElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.id); readPos += GameAssist.ReadString(binContent, readPos, out member.key); readPos += GameAssist.ReadString(binContent, readPos, out member.cn); readPos += GameAssist.ReadString(binContent, readPos, out member.en); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.id] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 4) { Ex.Logger.Log("JuLingLimit.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Ex.Logger.Log("JuLingLimit.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "ShangGu") { Ex.Logger.Log("JuLingLimit.csv中字段[ShangGu]位置不对应"); return(false); } if (vecLine[2] != "PuTong") { Ex.Logger.Log("JuLingLimit.csv中字段[PuTong]位置不对应"); return(false); } if (vecLine[3] != "Max") { Ex.Logger.Log("JuLingLimit.csv中字段[Max]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { JuLingLimitElement member = new JuLingLimitElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ShangGu); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.PuTong); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Max); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.ID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 4) { Debug.Log("EquipStrengthen.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "RankID") { Debug.Log("EquipStrengthen.csv中字段[RankID]位置不对应"); return(false); } if (vecLine[1] != "Num") { Debug.Log("EquipStrengthen.csv中字段[Num]位置不对应"); return(false); } if (vecLine[2] != "Money") { Debug.Log("EquipStrengthen.csv中字段[Money]位置不对应"); return(false); } if (vecLine[3] != "Chance") { Debug.Log("EquipStrengthen.csv中字段[Chance]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { EquipStrengthenElement member = new EquipStrengthenElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.RankID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Num); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Money); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Chance); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.RankID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 4) { Ex.Logger.Log("Formula.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "FormulaID") { Ex.Logger.Log("Formula.csv中字段[FormulaID]位置不对应"); return(false); } if (vecLine[1] != "Describe") { Ex.Logger.Log("Formula.csv中字段[Describe]位置不对应"); return(false); } if (vecLine[2] != "VarsName") { Ex.Logger.Log("Formula.csv中字段[VarsName]位置不对应"); return(false); } if (vecLine[3] != "Formula") { Ex.Logger.Log("Formula.csv中字段[Formula]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { FormulaElement member = new FormulaElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.FormulaID); readPos += GameAssist.ReadString(binContent, readPos, out member.Describe); readPos += GameAssist.ReadString(binContent, readPos, out member.VarsName); readPos += GameAssist.ReadString(binContent, readPos, out member.Formula); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.FormulaID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 4) { Debug.Log("Equip.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "EquipID") { Debug.Log("Equip.csv中字段[EquipID]位置不对应"); return(false); } if (vecLine[1] != "Type") { Debug.Log("Equip.csv中字段[Type]位置不对应"); return(false); } if (vecLine[2] != "Attribute") { Debug.Log("Equip.csv中字段[Attribute]位置不对应"); return(false); } if (vecLine[3] != "Colour") { Debug.Log("Equip.csv中字段[Colour]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { EquipElement member = new EquipElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.EquipID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type); readPos += GameAssist.ReadString(binContent, readPos, out member.Attribute); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Colour); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.EquipID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 4) { Ex.Logger.Log("FaBaoSkill.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Ex.Logger.Log("FaBaoSkill.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "Name") { Ex.Logger.Log("FaBaoSkill.csv中字段[Name]位置不对应"); return(false); } if (vecLine[2] != "Lv") { Ex.Logger.Log("FaBaoSkill.csv中字段[Lv]位置不对应"); return(false); } if (vecLine[3] != "MiaoShu") { Ex.Logger.Log("FaBaoSkill.csv中字段[MiaoShu]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { FaBaoSkillElement member = new FaBaoSkillElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadString(binContent, readPos, out member.Name); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Lv); readPos += GameAssist.ReadString(binContent, readPos, out member.MiaoShu); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.ID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 4) { Ex.Logger.Log("Ranking.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Ex.Logger.Log("Ranking.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "SmallLabel") { Ex.Logger.Log("Ranking.csv中字段[SmallLabel]位置不对应"); return(false); } if (vecLine[2] != "LargeLabel") { Ex.Logger.Log("Ranking.csv中字段[LargeLabel]位置不对应"); return(false); } if (vecLine[3] != "Type") { Ex.Logger.Log("Ranking.csv中字段[Type]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { RankingElement member = new RankingElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadString(binContent, readPos, out member.SmallLabel); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LargeLabel); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.ID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 3) { Debug.Log("WuPinTypeID.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Debug.Log("WuPinTypeID.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "ZiDuan") { Debug.Log("WuPinTypeID.csv中字段[ZiDuan]位置不对应"); return(false); } if (vecLine[2] != "Type") { Debug.Log("WuPinTypeID.csv中字段[Type]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { WuPinTypeIDElement member = new WuPinTypeIDElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ZiDuan); readPos += GameAssist.ReadString(binContent, readPos, out member.Type); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.ID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 3) { Ex.Logger.Log("Monster.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "id") { Ex.Logger.Log("Monster.csv中字段[id]位置不对应"); return(false); } if (vecLine[1] != "name") { Ex.Logger.Log("Monster.csv中字段[name]位置不对应"); return(false); } if (vecLine[2] != "skills") { Ex.Logger.Log("Monster.csv中字段[skills]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { MonsterElement member = new MonsterElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.id); readPos += GameAssist.ReadString(binContent, readPos, out member.name); readPos += GameAssist.ReadString(binContent, readPos, out member.skills); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.id] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 3) { Ex.Logger.Log("SysTips.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Ex.Logger.Log("SysTips.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "CN") { Ex.Logger.Log("SysTips.csv中字段[CN]位置不对应"); return(false); } if (vecLine[2] != "EN") { Ex.Logger.Log("SysTips.csv中字段[EN]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { SysTipsElement member = new SysTipsElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadString(binContent, readPos, out member.CN); readPos += GameAssist.ReadString(binContent, readPos, out member.EN); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.ID] = member; } return(true); }
public void UpdateField(int Id, int Index, byte[] buff, int start, int len) { SyncIdE SyncId = (SyncIdE)Id; byte[] updateBuffer = new byte[len]; Array.Copy(buff, start, updateBuffer, 0, len); int iValue = 0; long lValue = 0; switch (SyncId) { case SyncIdE.STORYDUNGEON: if (Index < 0) { m_Instance.ClearStoryDungeon(); break; } if (Index >= m_Instance.SizeStoryDungeon()) { int Count = Index - m_Instance.SizeStoryDungeon() + 1; for (int i = 0; i < Count; i++) { m_Instance.AddStoryDungeon(new StoryDungeonStoryDungeonObjWraperV1()); } } m_Instance.GetStoryDungeon(Index).FromMemoryStream(new MemoryStream(updateBuffer)); break; case SyncIdE.CHALLENGENUM: GameAssist.ReadInt32Variant(updateBuffer, 0, out iValue); m_Instance.ChallengeNum = iValue; break; default: break; } try { if (NotifySyncValueChanged != null) { NotifySyncValueChanged(Id, Index); } } catch { Ex.Logger.Log("StoryDungeonData.NotifySyncValueChanged catch exception"); } updateBuffer.GetType(); iValue++; lValue++; }
public void UpdateField(int Id, int Index, byte[] buff, int start, int len) { SyncIdE SyncId = (SyncIdE)Id; byte[] updateBuffer = new byte[len]; Array.Copy(buff, start, updateBuffer, 0, len); int iValue = 0; long lValue = 0; switch (SyncId) { case SyncIdE.EQUIPDEBRIS: GameAssist.ReadInt32Variant(updateBuffer, 0, out iValue); m_Instance.EquipDebris = iValue; break; case SyncIdE.CAPSULEARRAY: if (Index < 0) { m_Instance.ClearCapsuleArray(); break; } if (Index >= m_Instance.SizeCapsuleArray()) { int Count = Index - m_Instance.SizeCapsuleArray() + 1; for (int i = 0; i < Count; i++) { m_Instance.AddCapsuleArray(new CapsuleCapsuleObjWraperV1()); } } m_Instance.GetCapsuleArray(Index).FromMemoryStream(new MemoryStream(updateBuffer)); break; default: break; } try { if (NotifySyncValueChanged != null) { NotifySyncValueChanged(Id, Index); } } catch { Debug.Log("CapsuleData.NotifySyncValueChanged catch exception"); } updateBuffer.GetType(); iValue++; lValue++; }
public void UpdateField(int Id, int Index, byte[] buff, int start, int len) { SyncIdE SyncId = (SyncIdE)Id; byte[] updateBuffer = new byte[len]; Array.Copy(buff, start, updateBuffer, 0, len); int iValue = 0; long lValue = 0; switch (SyncId) { case SyncIdE.VALUE: if (Index < 0) { m_Instance.ClearValue(); break; } if (Index >= m_Instance.SizeValue()) { int Count = Index - m_Instance.SizeValue() + 1; for (int i = 0; i < Count; i++) { m_Instance.AddValue(new ActivityScheduleActiveValueWraperV1()); } } m_Instance.GetValue(Index).FromMemoryStream(new MemoryStream(updateBuffer)); break; case SyncIdE.TIME: GameAssist.ReadInt32Variant(updateBuffer, 0, out iValue); m_Instance.Time = iValue; break; default: break; } try { if (NotifySyncValueChanged != null) { NotifySyncValueChanged(Id, Index); } } catch { Ex.Logger.Log("ActivityScheduleData.NotifySyncValueChanged catch exception"); } updateBuffer.GetType(); iValue++; lValue++; }
public void UpdateField(int Id, int Index, byte[] buff, int start, int len) { SyncIdE SyncId = (SyncIdE)Id; byte[] updateBuffer = new byte[len]; Array.Copy(buff, start, updateBuffer, 0, len); int iValue = 0; long lValue = 0; switch (SyncId) { case SyncIdE.EXP: GameAssist.ReadInt32Variant(updateBuffer, 0, out iValue); m_Instance.Exp = iValue; break; case SyncIdE.LEVEL: GameAssist.ReadInt32Variant(updateBuffer, 0, out iValue); m_Instance.Level = iValue; break; case SyncIdE.SERVERTIME: GameAssist.ReadInt32Variant(updateBuffer, 0, out iValue); m_Instance.ServerTime = iValue; break; case SyncIdE.ROLEID: GameAssist.ReadInt32Variant(updateBuffer, 0, out iValue); m_Instance.RoleId = iValue; break; default: break; } try { if (NotifySyncValueChanged != null) { NotifySyncValueChanged(Id, Index); } } catch { Ex.Logger.Log("BaseAttrData.NotifySyncValueChanged catch exception"); } updateBuffer.GetType(); iValue++; lValue++; }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 15) { Ex.Logger.Log("ShimenType.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Ex.Logger.Log("ShimenType.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "Lvl") { Ex.Logger.Log("ShimenType.csv中字段[Lvl]位置不对应"); return(false); } if (vecLine[2] != "Res") { Ex.Logger.Log("ShimenType.csv中字段[Res]位置不对应"); return(false); } if (vecLine[3] != "TypePro1") { Ex.Logger.Log("ShimenType.csv中字段[TypePro1]位置不对应"); return(false); } if (vecLine[4] != "Type1") { Ex.Logger.Log("ShimenType.csv中字段[Type1]位置不对应"); return(false); } if (vecLine[5] != "TypePro2") { Ex.Logger.Log("ShimenType.csv中字段[TypePro2]位置不对应"); return(false); } if (vecLine[6] != "Type2") { Ex.Logger.Log("ShimenType.csv中字段[Type2]位置不对应"); return(false); } if (vecLine[7] != "TypePro3") { Ex.Logger.Log("ShimenType.csv中字段[TypePro3]位置不对应"); return(false); } if (vecLine[8] != "Type3") { Ex.Logger.Log("ShimenType.csv中字段[Type3]位置不对应"); return(false); } if (vecLine[9] != "TypePro4") { Ex.Logger.Log("ShimenType.csv中字段[TypePro4]位置不对应"); return(false); } if (vecLine[10] != "Type4") { Ex.Logger.Log("ShimenType.csv中字段[Type4]位置不对应"); return(false); } if (vecLine[11] != "ExpReward") { Ex.Logger.Log("ShimenType.csv中字段[ExpReward]位置不对应"); return(false); } if (vecLine[12] != "MoneyReward") { Ex.Logger.Log("ShimenType.csv中字段[MoneyReward]位置不对应"); return(false); } if (vecLine[13] != "SpecialRewardId") { Ex.Logger.Log("ShimenType.csv中字段[SpecialRewardId]位置不对应"); return(false); } if (vecLine[14] != "SpecialRewardPro") { Ex.Logger.Log("ShimenType.csv中字段[SpecialRewardPro]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { ShimenTypeElement member = new ShimenTypeElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Lvl); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Res); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.TypePro1); readPos += GameAssist.ReadString(binContent, readPos, out member.Type1); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.TypePro2); readPos += GameAssist.ReadString(binContent, readPos, out member.Type2); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.TypePro3); readPos += GameAssist.ReadString(binContent, readPos, out member.Type3); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.TypePro4); readPos += GameAssist.ReadString(binContent, readPos, out member.Type4); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ExpReward); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MoneyReward); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SpecialRewardId); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SpecialRewardPro); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.ID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 9) { Ex.Logger.Log("BuffPool.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Ex.Logger.Log("BuffPool.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "POS") { Ex.Logger.Log("BuffPool.csv中字段[POS]位置不对应"); return(false); } if (vecLine[2] != "TriggerRange") { Ex.Logger.Log("BuffPool.csv中字段[TriggerRange]位置不对应"); return(false); } if (vecLine[3] != "RefreshType") { Ex.Logger.Log("BuffPool.csv中字段[RefreshType]位置不对应"); return(false); } if (vecLine[4] != "RefreshCD") { Ex.Logger.Log("BuffPool.csv中字段[RefreshCD]位置不对应"); return(false); } if (vecLine[5] != "GroupID") { Ex.Logger.Log("BuffPool.csv中字段[GroupID]位置不对应"); return(false); } if (vecLine[6] != "GroupMaxRefreshCount") { Ex.Logger.Log("BuffPool.csv中字段[GroupMaxRefreshCount]位置不对应"); return(false); } if (vecLine[7] != "BuffIDList") { Ex.Logger.Log("BuffPool.csv中字段[BuffIDList]位置不对应"); return(false); } if (vecLine[8] != "Res") { Ex.Logger.Log("BuffPool.csv中字段[Res]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { BuffPoolElement member = new BuffPoolElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadString(binContent, readPos, out member.POS); readPos += GameAssist.ReadFloat(binContent, readPos, out member.TriggerRange); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.RefreshType); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.RefreshCD); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.GroupID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.GroupMaxRefreshCount); readPos += GameAssist.ReadString(binContent, readPos, out member.BuffIDList); readPos += GameAssist.ReadString(binContent, readPos, out member.Res); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.ID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 6) { Ex.Logger.Log("QiangHua.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "LVID") { Ex.Logger.Log("QiangHua.csv中字段[LVID]位置不对应"); return(false); } if (vecLine[1] != "Num") { Ex.Logger.Log("QiangHua.csv中字段[Num]位置不对应"); return(false); } if (vecLine[2] != "GaiLv") { Ex.Logger.Log("QiangHua.csv中字段[GaiLv]位置不对应"); return(false); } if (vecLine[3] != "Item") { Ex.Logger.Log("QiangHua.csv中字段[Item]位置不对应"); return(false); } if (vecLine[4] != "ItemNum") { Ex.Logger.Log("QiangHua.csv中字段[ItemNum]位置不对应"); return(false); } if (vecLine[5] != "ZhuanYi") { Ex.Logger.Log("QiangHua.csv中字段[ZhuanYi]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { QiangHuaElement member = new QiangHuaElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LVID); readPos += GameAssist.ReadString(binContent, readPos, out member.Num); readPos += GameAssist.ReadString(binContent, readPos, out member.GaiLv); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Item); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ItemNum); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ZhuanYi); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.LVID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 13) { Ex.Logger.Log("SysIcon.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Ex.Logger.Log("SysIcon.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "Name") { Ex.Logger.Log("SysIcon.csv中字段[Name]位置不对应"); return(false); } if (vecLine[2] != "Desc") { Ex.Logger.Log("SysIcon.csv中字段[Desc]位置不对应"); return(false); } if (vecLine[3] != "Type") { Ex.Logger.Log("SysIcon.csv中字段[Type]位置不对应"); return(false); } if (vecLine[4] != "Order") { Ex.Logger.Log("SysIcon.csv中字段[Order]位置不对应"); return(false); } if (vecLine[5] != "Icon") { Ex.Logger.Log("SysIcon.csv中字段[Icon]位置不对应"); return(false); } if (vecLine[6] != "ShowLv") { Ex.Logger.Log("SysIcon.csv中字段[ShowLv]位置不对应"); return(false); } if (vecLine[7] != "ShowTaskRe") { Ex.Logger.Log("SysIcon.csv中字段[ShowTaskRe]位置不对应"); return(false); } if (vecLine[8] != "ShowTaskCo") { Ex.Logger.Log("SysIcon.csv中字段[ShowTaskCo]位置不对应"); return(false); } if (vecLine[9] != "OpenLv") { Ex.Logger.Log("SysIcon.csv中字段[OpenLv]位置不对应"); return(false); } if (vecLine[10] != "OpenTaskRe") { Ex.Logger.Log("SysIcon.csv中字段[OpenTaskRe]位置不对应"); return(false); } if (vecLine[11] != "OpenTaskCo") { Ex.Logger.Log("SysIcon.csv中字段[OpenTaskCo]位置不对应"); return(false); } if (vecLine[12] != "Prompt") { Ex.Logger.Log("SysIcon.csv中字段[Prompt]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { SysIconElement member = new SysIconElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadString(binContent, readPos, out member.Name); readPos += GameAssist.ReadString(binContent, readPos, out member.Desc); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Order); readPos += GameAssist.ReadString(binContent, readPos, out member.Icon); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ShowLv); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ShowTaskRe); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ShowTaskCo); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.OpenLv); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.OpenTaskRe); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.OpenTaskCo); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Prompt); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.ID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 9) { Ex.Logger.Log("CargoReward.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Ex.Logger.Log("CargoReward.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "Type") { Ex.Logger.Log("CargoReward.csv中字段[Type]位置不对应"); return(false); } if (vecLine[2] != "Lvl") { Ex.Logger.Log("CargoReward.csv中字段[Lvl]位置不对应"); return(false); } if (vecLine[3] != "EXP") { Ex.Logger.Log("CargoReward.csv中字段[EXP]位置不对应"); return(false); } if (vecLine[4] != "Contribution") { Ex.Logger.Log("CargoReward.csv中字段[Contribution]位置不对应"); return(false); } if (vecLine[5] != "Money") { Ex.Logger.Log("CargoReward.csv中字段[Money]位置不对应"); return(false); } if (vecLine[6] != "MEXP") { Ex.Logger.Log("CargoReward.csv中字段[MEXP]位置不对应"); return(false); } if (vecLine[7] != "MContribution") { Ex.Logger.Log("CargoReward.csv中字段[MContribution]位置不对应"); return(false); } if (vecLine[8] != "MMoney") { Ex.Logger.Log("CargoReward.csv中字段[MMoney]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { CargoRewardElement member = new CargoRewardElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Lvl); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.EXP); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Contribution); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Money); readPos += GameAssist.ReadString(binContent, readPos, out member.MEXP); readPos += GameAssist.ReadString(binContent, readPos, out member.MContribution); readPos += GameAssist.ReadString(binContent, readPos, out member.MMoney); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.ID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 6) { Ex.Logger.Log("SkillLimit.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "LimitID") { Ex.Logger.Log("SkillLimit.csv中字段[LimitID]位置不对应"); return(false); } if (vecLine[1] != "RoleLv") { Ex.Logger.Log("SkillLimit.csv中字段[RoleLv]位置不对应"); return(false); } if (vecLine[2] != "Book") { Ex.Logger.Log("SkillLimit.csv中字段[Book]位置不对应"); return(false); } if (vecLine[3] != "SkillLimit") { Ex.Logger.Log("SkillLimit.csv中字段[SkillLimit]位置不对应"); return(false); } if (vecLine[4] != "LvUpLimitSkillLv") { Ex.Logger.Log("SkillLimit.csv中字段[LvUpLimitSkillLv]位置不对应"); return(false); } if (vecLine[5] != "LvUpRoleLv") { Ex.Logger.Log("SkillLimit.csv中字段[LvUpRoleLv]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { SkillLimitElement member = new SkillLimitElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LimitID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.RoleLv); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Book); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SkillLimit); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LvUpLimitSkillLv); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LvUpRoleLv); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.LimitID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 10) { Debug.Log("GodWeaponTuPo.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Debug.Log("GodWeaponTuPo.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "ShenQiID") { Debug.Log("GodWeaponTuPo.csv中字段[ShenQiID]位置不对应"); return(false); } if (vecLine[2] != "TuPo") { Debug.Log("GodWeaponTuPo.csv中字段[TuPo]位置不对应"); return(false); } if (vecLine[3] != "HP") { Debug.Log("GodWeaponTuPo.csv中字段[HP]位置不对应"); return(false); } if (vecLine[4] != "Pattack") { Debug.Log("GodWeaponTuPo.csv中字段[Pattack]位置不对应"); return(false); } if (vecLine[5] != "Mattack") { Debug.Log("GodWeaponTuPo.csv中字段[Mattack]位置不对应"); return(false); } if (vecLine[6] != "PDefense") { Debug.Log("GodWeaponTuPo.csv中字段[PDefense]位置不对应"); return(false); } if (vecLine[7] != "MDefense") { Debug.Log("GodWeaponTuPo.csv中字段[MDefense]位置不对应"); return(false); } if (vecLine[8] != "JueXing") { Debug.Log("GodWeaponTuPo.csv中字段[JueXing]位置不对应"); return(false); } if (vecLine[9] != "Num") { Debug.Log("GodWeaponTuPo.csv中字段[Num]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { GodWeaponTuPoElement member = new GodWeaponTuPoElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ShenQiID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.TuPo); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HP); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Pattack); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Mattack); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.PDefense); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MDefense); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.JueXing); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Num); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.ID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 7) { Debug.Log("MissionShiYong.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "MissionID") { Debug.Log("MissionShiYong.csv中字段[MissionID]位置不对应"); return(false); } if (vecLine[1] != "Name") { Debug.Log("MissionShiYong.csv中字段[Name]位置不对应"); return(false); } if (vecLine[2] != "MuBiao") { Debug.Log("MissionShiYong.csv中字段[MuBiao]位置不对应"); return(false); } if (vecLine[3] != "ZuoBiao") { Debug.Log("MissionShiYong.csv中字段[ZuoBiao]位置不对应"); return(false); } if (vecLine[4] != "IsTiShi") { Debug.Log("MissionShiYong.csv中字段[IsTiShi]位置不对应"); return(false); } if (vecLine[5] != "Time") { Debug.Log("MissionShiYong.csv中字段[Time]位置不对应"); return(false); } if (vecLine[6] != "DaoHang") { Debug.Log("MissionShiYong.csv中字段[DaoHang]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { MissionShiYongElement member = new MissionShiYongElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MissionID); readPos += GameAssist.ReadString(binContent, readPos, out member.Name); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MuBiao); readPos += GameAssist.ReadString(binContent, readPos, out member.ZuoBiao); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.IsTiShi); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Time); readPos += GameAssist.ReadString(binContent, readPos, out member.DaoHang); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.MissionID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 30) { Ex.Logger.Log("Item.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ItemID") { Ex.Logger.Log("Item.csv中字段[ItemID]位置不对应"); return(false); } if (vecLine[1] != "Name") { Ex.Logger.Log("Item.csv中字段[Name]位置不对应"); return(false); } if (vecLine[2] != "Type") { Ex.Logger.Log("Item.csv中字段[Type]位置不对应"); return(false); } if (vecLine[3] != "FenLei") { Ex.Logger.Log("Item.csv中字段[FenLei]位置不对应"); return(false); } if (vecLine[4] != "FenLeiParameter") { Ex.Logger.Log("Item.csv中字段[FenLeiParameter]位置不对应"); return(false); } if (vecLine[5] != "Cishu") { Ex.Logger.Log("Item.csv中字段[Cishu]位置不对应"); return(false); } if (vecLine[6] != "Time") { Ex.Logger.Log("Item.csv中字段[Time]位置不对应"); return(false); } if (vecLine[7] != "Timeliness") { Ex.Logger.Log("Item.csv中字段[Timeliness]位置不对应"); return(false); } if (vecLine[8] != "SourceID") { Ex.Logger.Log("Item.csv中字段[SourceID]位置不对应"); return(false); } if (vecLine[9] != "LV") { Ex.Logger.Log("Item.csv中字段[LV]位置不对应"); return(false); } if (vecLine[10] != "Colour") { Ex.Logger.Log("Item.csv中字段[Colour]位置不对应"); return(false); } if (vecLine[11] != "ShiYong") { Ex.Logger.Log("Item.csv中字段[ShiYong]位置不对应"); return(false); } if (vecLine[12] != "HeCheng") { Ex.Logger.Log("Item.csv中字段[HeCheng]位置不对应"); return(false); } if (vecLine[13] != "IsSell") { Ex.Logger.Log("Item.csv中字段[IsSell]位置不对应"); return(false); } if (vecLine[14] != "ZiDong") { Ex.Logger.Log("Item.csv中字段[ZiDong]位置不对应"); return(false); } if (vecLine[15] != "IsBind") { Ex.Logger.Log("Item.csv中字段[IsBind]位置不对应"); return(false); } if (vecLine[16] != "IsAdd") { Ex.Logger.Log("Item.csv中字段[IsAdd]位置不对应"); return(false); } if (vecLine[17] != "AddNum") { Ex.Logger.Log("Item.csv中字段[AddNum]位置不对应"); return(false); } if (vecLine[18] != "Price") { Ex.Logger.Log("Item.csv中字段[Price]位置不对应"); return(false); } if (vecLine[19] != "IsDel") { Ex.Logger.Log("Item.csv中字段[IsDel]位置不对应"); return(false); } if (vecLine[20] != "DelPrice") { Ex.Logger.Log("Item.csv中字段[DelPrice]位置不对应"); return(false); } if (vecLine[21] != "BuyPrick") { Ex.Logger.Log("Item.csv中字段[BuyPrick]位置不对应"); return(false); } if (vecLine[22] != "MiaoShu") { Ex.Logger.Log("Item.csv中字段[MiaoShu]位置不对应"); return(false); } if (vecLine[23] != "BeiZhu") { Ex.Logger.Log("Item.csv中字段[BeiZhu]位置不对应"); return(false); } if (vecLine[24] != " Valuabl") { Ex.Logger.Log("Item.csv中字段[ Valuabl]位置不对应"); return(false); } if (vecLine[25] != "ModelId") { Ex.Logger.Log("Item.csv中字段[ModelId]位置不对应"); return(false); } if (vecLine[26] != "EffectID") { Ex.Logger.Log("Item.csv中字段[EffectID]位置不对应"); return(false); } if (vecLine[27] != "Mission") { Ex.Logger.Log("Item.csv中字段[Mission]位置不对应"); return(false); } if (vecLine[28] != "Skill") { Ex.Logger.Log("Item.csv中字段[Skill]位置不对应"); return(false); } if (vecLine[29] != "ItenR") { Ex.Logger.Log("Item.csv中字段[ItenR]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { ItemElement member = new ItemElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ItemID); readPos += GameAssist.ReadString(binContent, readPos, out member.Name); readPos += GameAssist.ReadString(binContent, readPos, out member.Type); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.FenLei); readPos += GameAssist.ReadString(binContent, readPos, out member.FenLeiParameter); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Cishu); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Time); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Timeliness); readPos += GameAssist.ReadString(binContent, readPos, out member.SourceID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LV); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Colour); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ShiYong); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HeCheng); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.IsSell); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ZiDong); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.IsBind); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.IsAdd); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.AddNum); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Price); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.IsDel); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.DelPrice); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.BuyPrick); readPos += GameAssist.ReadString(binContent, readPos, out member.MiaoShu); readPos += GameAssist.ReadString(binContent, readPos, out member.BeiZhu); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Valuabl); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ModelId); readPos += GameAssist.ReadString(binContent, readPos, out member.EffectID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Mission); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill); readPos += GameAssist.ReadFloat(binContent, readPos, out member.ItenR); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.ItemID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 8) { Ex.Logger.Log("JuLing.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Ex.Logger.Log("JuLing.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "ItemID") { Ex.Logger.Log("JuLing.csv中字段[ItemID]位置不对应"); return(false); } if (vecLine[2] != "SkillID") { Ex.Logger.Log("JuLing.csv中字段[SkillID]位置不对应"); return(false); } if (vecLine[3] != "Type") { Ex.Logger.Log("JuLing.csv中字段[Type]位置不对应"); return(false); } if (vecLine[4] != "Lv") { Ex.Logger.Log("JuLing.csv中字段[Lv]位置不对应"); return(false); } if (vecLine[5] != "NextID") { Ex.Logger.Log("JuLing.csv中字段[NextID]位置不对应"); return(false); } if (vecLine[6] != "Money") { Ex.Logger.Log("JuLing.csv中字段[Money]位置不对应"); return(false); } if (vecLine[7] != "ItemNum") { Ex.Logger.Log("JuLing.csv中字段[ItemNum]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { JuLingElement member = new JuLingElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ItemID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SkillID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Lv); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.NextID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Money); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ItemNum); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.ID] = member; } return(true); }
public bool LoadBin(byte[] binContent) { m_mapElements.Clear(); m_vecAllElements.Clear(); int nCol, nRow; int readPos = 0; readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow); List <string> vecLine = new List <string>(nCol); List <int> vecHeadType = new List <int>(nCol); string tmpStr; int tmpInt; for (int i = 0; i < nCol; i++) { readPos += GameAssist.ReadString(binContent, readPos, out tmpStr); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt); vecLine.Add(tmpStr); vecHeadType.Add(tmpInt); } if (vecLine.Count != 13) { Ex.Logger.Log("AttackBehavior.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "Id") { Ex.Logger.Log("AttackBehavior.csv中字段[Id]位置不对应"); return(false); } if (vecLine[1] != "AttackerType") { Ex.Logger.Log("AttackBehavior.csv中字段[AttackerType]位置不对应"); return(false); } if (vecLine[2] != "HitterType") { Ex.Logger.Log("AttackBehavior.csv中字段[HitterType]位置不对应"); return(false); } if (vecLine[3] != "SkillType") { Ex.Logger.Log("AttackBehavior.csv中字段[SkillType]位置不对应"); return(false); } if (vecLine[4] != "AttackFlash") { Ex.Logger.Log("AttackBehavior.csv中字段[AttackFlash]位置不对应"); return(false); } if (vecLine[5] != "ShakeCamera") { Ex.Logger.Log("AttackBehavior.csv中字段[ShakeCamera]位置不对应"); return(false); } if (vecLine[6] != "HitIdleAnim") { Ex.Logger.Log("AttackBehavior.csv中字段[HitIdleAnim]位置不对应"); return(false); } if (vecLine[7] != "HitMoveAnim") { Ex.Logger.Log("AttackBehavior.csv中字段[HitMoveAnim]位置不对应"); return(false); } if (vecLine[8] != "HitAnim") { Ex.Logger.Log("AttackBehavior.csv中字段[HitAnim]位置不对应"); return(false); } if (vecLine[9] != "AttackBack") { Ex.Logger.Log("AttackBehavior.csv中字段[AttackBack]位置不对应"); return(false); } if (vecLine[10] != "AttackAir") { Ex.Logger.Log("AttackBehavior.csv中字段[AttackAir]位置不对应"); return(false); } if (vecLine[11] != "AttackWaggle") { Ex.Logger.Log("AttackBehavior.csv中字段[AttackWaggle]位置不对应"); return(false); } if (vecLine[12] != "AttackTumble") { Ex.Logger.Log("AttackBehavior.csv中字段[AttackTumble]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { AttackBehaviorElement member = new AttackBehaviorElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Id); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.AttackerType); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HitterType); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SkillType); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.AttackFlash); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ShakeCamera); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HitIdleAnim); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HitMoveAnim); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HitAnim); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.AttackBack); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.AttackAir); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.AttackWaggle); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.AttackTumble); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.Id] = member; } return(true); }