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 != 84) { Ex.Logger.Log("Monster.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "MonsterID") { Ex.Logger.Log("Monster.csv中字段[MonsterID]位置不对应"); return(false); } if (vecLine[1] != "ModelID") { Ex.Logger.Log("Monster.csv中字段[ModelID]位置不对应"); return(false); } if (vecLine[2] != "ModelScaling") { Ex.Logger.Log("Monster.csv中字段[ModelScaling]位置不对应"); return(false); } if (vecLine[3] != "AttType") { Ex.Logger.Log("Monster.csv中字段[AttType]位置不对应"); return(false); } if (vecLine[4] != "Name") { Ex.Logger.Log("Monster.csv中字段[Name]位置不对应"); return(false); } if (vecLine[5] != "HeadIcon") { Ex.Logger.Log("Monster.csv中字段[HeadIcon]位置不对应"); return(false); } if (vecLine[6] != "Title") { Ex.Logger.Log("Monster.csv中字段[Title]位置不对应"); return(false); } if (vecLine[7] != "Level") { Ex.Logger.Log("Monster.csv中字段[Level]位置不对应"); return(false); } if (vecLine[8] != "Group") { Ex.Logger.Log("Monster.csv中字段[Group]位置不对应"); return(false); } if (vecLine[9] != "Type") { Ex.Logger.Log("Monster.csv中字段[Type]位置不对应"); return(false); } if (vecLine[10] != "BaseAI") { Ex.Logger.Log("Monster.csv中字段[BaseAI]位置不对应"); return(false); } if (vecLine[11] != "MonsterR") { Ex.Logger.Log("Monster.csv中字段[MonsterR]位置不对应"); return(false); } if (vecLine[12] != "PingPong") { Ex.Logger.Log("Monster.csv中字段[PingPong]位置不对应"); return(false); } if (vecLine[13] != "MonsterExp") { Ex.Logger.Log("Monster.csv中字段[MonsterExp]位置不对应"); return(false); } if (vecLine[14] != "DropID") { Ex.Logger.Log("Monster.csv中字段[DropID]位置不对应"); return(false); } if (vecLine[15] != "Skill1") { Ex.Logger.Log("Monster.csv中字段[Skill1]位置不对应"); return(false); } if (vecLine[16] != "Skill2") { Ex.Logger.Log("Monster.csv中字段[Skill2]位置不对应"); return(false); } if (vecLine[17] != "Skill3") { Ex.Logger.Log("Monster.csv中字段[Skill3]位置不对应"); return(false); } if (vecLine[18] != "Skill4") { Ex.Logger.Log("Monster.csv中字段[Skill4]位置不对应"); return(false); } if (vecLine[19] != "Skill5") { Ex.Logger.Log("Monster.csv中字段[Skill5]位置不对应"); return(false); } if (vecLine[20] != "Skill6") { Ex.Logger.Log("Monster.csv中字段[Skill6]位置不对应"); return(false); } if (vecLine[21] != "Skill7") { Ex.Logger.Log("Monster.csv中字段[Skill7]位置不对应"); return(false); } if (vecLine[22] != "Skill8") { Ex.Logger.Log("Monster.csv中字段[Skill8]位置不对应"); return(false); } if (vecLine[23] != "Skill9") { Ex.Logger.Log("Monster.csv中字段[Skill9]位置不对应"); return(false); } if (vecLine[24] != "Skill") { Ex.Logger.Log("Monster.csv中字段[Skill]位置不对应"); return(false); } if (vecLine[25] != "movSP") { Ex.Logger.Log("Monster.csv中字段[movSP]位置不对应"); return(false); } if (vecLine[26] != "attSP") { Ex.Logger.Log("Monster.csv中字段[attSP]位置不对应"); return(false); } if (vecLine[27] != "AllowMove") { Ex.Logger.Log("Monster.csv中字段[AllowMove]位置不对应"); return(false); } if (vecLine[28] != "HP") { Ex.Logger.Log("Monster.csv中字段[HP]位置不对应"); return(false); } if (vecLine[29] != "reHP") { Ex.Logger.Log("Monster.csv中字段[reHP]位置不对应"); return(false); } if (vecLine[30] != "MP") { Ex.Logger.Log("Monster.csv中字段[MP]位置不对应"); return(false); } if (vecLine[31] != "reMP") { Ex.Logger.Log("Monster.csv中字段[reMP]位置不对应"); return(false); } if (vecLine[32] != "minPA") { Ex.Logger.Log("Monster.csv中字段[minPA]位置不对应"); return(false); } if (vecLine[33] != "maxPA") { Ex.Logger.Log("Monster.csv中字段[maxPA]位置不对应"); return(false); } if (vecLine[34] != "minMA") { Ex.Logger.Log("Monster.csv中字段[minMA]位置不对应"); return(false); } if (vecLine[35] != "maxMA") { Ex.Logger.Log("Monster.csv中字段[maxMA]位置不对应"); return(false); } if (vecLine[36] != "PD") { Ex.Logger.Log("Monster.csv中字段[PD]位置不对应"); return(false); } if (vecLine[37] != "MD") { Ex.Logger.Log("Monster.csv中字段[MD]位置不对应"); return(false); } if (vecLine[38] != "igPhi") { Ex.Logger.Log("Monster.csv中字段[igPhi]位置不对应"); return(false); } if (vecLine[39] != "igMdo") { Ex.Logger.Log("Monster.csv中字段[igMdo]位置不对应"); return(false); } if (vecLine[40] != "Pdo") { Ex.Logger.Log("Monster.csv中字段[Pdo]位置不对应"); return(false); } if (vecLine[41] != "Mdo") { Ex.Logger.Log("Monster.csv中字段[Mdo]位置不对应"); return(false); } if (vecLine[42] != "HitRate") { Ex.Logger.Log("Monster.csv中字段[HitRate]位置不对应"); return(false); } if (vecLine[43] != "CritRate") { Ex.Logger.Log("Monster.csv中字段[CritRate]位置不对应"); return(false); } if (vecLine[44] != "igPcr") { Ex.Logger.Log("Monster.csv中字段[igPcr]位置不对应"); return(false); } if (vecLine[45] != "igMcr") { Ex.Logger.Log("Monster.csv中字段[igMcr]位置不对应"); return(false); } if (vecLine[46] != "Pcr") { Ex.Logger.Log("Monster.csv中字段[Pcr]位置不对应"); return(false); } if (vecLine[47] != "Mcr") { Ex.Logger.Log("Monster.csv中字段[Mcr]位置不对应"); return(false); } if (vecLine[48] != "igPrd") { Ex.Logger.Log("Monster.csv中字段[igPrd]位置不对应"); return(false); } if (vecLine[49] != "igMrd") { Ex.Logger.Log("Monster.csv中字段[igMrd]位置不对应"); return(false); } if (vecLine[50] != "Prd") { Ex.Logger.Log("Monster.csv中字段[Prd]位置不对应"); return(false); } if (vecLine[51] != "Mrd") { Ex.Logger.Log("Monster.csv中字段[Mrd]位置不对应"); return(false); } if (vecLine[52] != "igBlo") { Ex.Logger.Log("Monster.csv中字段[igBlo]位置不对应"); return(false); } if (vecLine[53] != "Blo") { Ex.Logger.Log("Monster.csv中字段[Blo]位置不对应"); return(false); } if (vecLine[54] != "igBrd") { Ex.Logger.Log("Monster.csv中字段[igBrd]位置不对应"); return(false); } if (vecLine[55] != "Brd") { Ex.Logger.Log("Monster.csv中字段[Brd]位置不对应"); return(false); } if (vecLine[56] != "igVEr") { Ex.Logger.Log("Monster.csv中字段[igVEr]位置不对应"); return(false); } if (vecLine[57] != "igSLr") { Ex.Logger.Log("Monster.csv中字段[igSLr]位置不对应"); return(false); } if (vecLine[58] != "igCHr") { Ex.Logger.Log("Monster.csv中字段[igCHr]位置不对应"); return(false); } if (vecLine[59] != "igABr") { Ex.Logger.Log("Monster.csv中字段[igABr]位置不对应"); return(false); } if (vecLine[60] != "igSIr") { Ex.Logger.Log("Monster.csv中字段[igSIr]位置不对应"); return(false); } if (vecLine[61] != "igGRr") { Ex.Logger.Log("Monster.csv中字段[igGRr]位置不对应"); return(false); } if (vecLine[62] != "igPEr") { Ex.Logger.Log("Monster.csv中字段[igPEr]位置不对应"); return(false); } if (vecLine[63] != "VEr") { Ex.Logger.Log("Monster.csv中字段[VEr]位置不对应"); return(false); } if (vecLine[64] != "SLr") { Ex.Logger.Log("Monster.csv中字段[SLr]位置不对应"); return(false); } if (vecLine[65] != "CHr") { Ex.Logger.Log("Monster.csv中字段[CHr]位置不对应"); return(false); } if (vecLine[66] != "ABr") { Ex.Logger.Log("Monster.csv中字段[ABr]位置不对应"); return(false); } if (vecLine[67] != "SIr") { Ex.Logger.Log("Monster.csv中字段[SIr]位置不对应"); return(false); } if (vecLine[68] != "GRr") { Ex.Logger.Log("Monster.csv中字段[GRr]位置不对应"); return(false); } if (vecLine[69] != "PEr") { Ex.Logger.Log("Monster.csv中字段[PEr]位置不对应"); return(false); } if (vecLine[70] != "igFr") { Ex.Logger.Log("Monster.csv中字段[igFr]位置不对应"); return(false); } if (vecLine[71] != "igEr") { Ex.Logger.Log("Monster.csv中字段[igEr]位置不对应"); return(false); } if (vecLine[72] != "igWr") { Ex.Logger.Log("Monster.csv中字段[igWr]位置不对应"); return(false); } if (vecLine[73] != "igCr") { Ex.Logger.Log("Monster.csv中字段[igCr]位置不对应"); return(false); } if (vecLine[74] != "igPr") { Ex.Logger.Log("Monster.csv中字段[igPr]位置不对应"); return(false); } if (vecLine[75] != "igLr") { Ex.Logger.Log("Monster.csv中字段[igLr]位置不对应"); return(false); } if (vecLine[76] != "igDr") { Ex.Logger.Log("Monster.csv中字段[igDr]位置不对应"); return(false); } if (vecLine[77] != "Fr") { Ex.Logger.Log("Monster.csv中字段[Fr]位置不对应"); return(false); } if (vecLine[78] != "Er") { Ex.Logger.Log("Monster.csv中字段[Er]位置不对应"); return(false); } if (vecLine[79] != "Wr") { Ex.Logger.Log("Monster.csv中字段[Wr]位置不对应"); return(false); } if (vecLine[80] != "Cr") { Ex.Logger.Log("Monster.csv中字段[Cr]位置不对应"); return(false); } if (vecLine[81] != "Pr") { Ex.Logger.Log("Monster.csv中字段[Pr]位置不对应"); return(false); } if (vecLine[82] != "Lr") { Ex.Logger.Log("Monster.csv中字段[Lr]位置不对应"); return(false); } if (vecLine[83] != "Dr") { Ex.Logger.Log("Monster.csv中字段[Dr]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { MonsterElement member = new MonsterElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MonsterID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ModelID); readPos += GameAssist.ReadFloat(binContent, readPos, out member.ModelScaling); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.AttType); readPos += GameAssist.ReadString(binContent, readPos, out member.Name); readPos += GameAssist.ReadString(binContent, readPos, out member.HeadIcon); readPos += GameAssist.ReadString(binContent, readPos, out member.Title); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Level); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Group); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.BaseAI); readPos += GameAssist.ReadFloat(binContent, readPos, out member.MonsterR); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.PingPong); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MonsterExp); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.DropID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill1); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill2); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill3); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill4); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill5); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill6); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill7); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill8); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill9); readPos += GameAssist.ReadString(binContent, readPos, out member.Skill); readPos += GameAssist.ReadFloat(binContent, readPos, out member.movSP); readPos += GameAssist.ReadFloat(binContent, readPos, out member.attSP); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.AllowMove); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HP); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.reHP); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MP); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.reMP); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.minPA); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.maxPA); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.minMA); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.maxMA); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.PD); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MD); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.igPhi); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.igMdo); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Pdo); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Mdo); readPos += GameAssist.ReadFloat(binContent, readPos, out member.HitRate); readPos += GameAssist.ReadFloat(binContent, readPos, out member.CritRate); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igPcr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igMcr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Pcr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Mcr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igPrd); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igMrd); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Prd); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Mrd); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igBlo); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Blo); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igBrd); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Brd); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igVEr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igSLr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igCHr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igABr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igSIr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igGRr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igPEr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.VEr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.SLr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.CHr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.ABr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.SIr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.GRr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.PEr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igFr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igEr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igWr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igCr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igPr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igLr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.igDr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Fr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Er); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Wr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Cr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Pr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Lr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Dr); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.MonsterID] = 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 != 14) { Debug.Log("HeroColour.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "HeroColourID") { Debug.Log("HeroColour.csv中字段[HeroColourID]位置不对应"); return(false); } if (vecLine[1] != "StarLV") { Debug.Log("HeroColour.csv中字段[StarLV]位置不对应"); return(false); } if (vecLine[2] != "ID") { Debug.Log("HeroColour.csv中字段[ID]位置不对应"); return(false); } if (vecLine[3] != "Money") { Debug.Log("HeroColour.csv中字段[Money]位置不对应"); return(false); } if (vecLine[4] != "SuiPian") { Debug.Log("HeroColour.csv中字段[SuiPian]位置不对应"); return(false); } if (vecLine[5] != "Num") { Debug.Log("HeroColour.csv中字段[Num]位置不对应"); return(false); } if (vecLine[6] != "Str") { Debug.Log("HeroColour.csv中字段[Str]位置不对应"); return(false); } if (vecLine[7] != "Dex") { Debug.Log("HeroColour.csv中字段[Dex]位置不对应"); return(false); } if (vecLine[8] != "IQ") { Debug.Log("HeroColour.csv中字段[IQ]位置不对应"); return(false); } if (vecLine[9] != "HP") { Debug.Log("HeroColour.csv中字段[HP]位置不对应"); return(false); } if (vecLine[10] != "Pattack") { Debug.Log("HeroColour.csv中字段[Pattack]位置不对应"); return(false); } if (vecLine[11] != "Mattack") { Debug.Log("HeroColour.csv中字段[Mattack]位置不对应"); return(false); } if (vecLine[12] != "PDefense") { Debug.Log("HeroColour.csv中字段[PDefense]位置不对应"); return(false); } if (vecLine[13] != "MDefense") { Debug.Log("HeroColour.csv中字段[MDefense]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { HeroColourElement member = new HeroColourElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HeroColourID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.StarLV); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Money); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SuiPian); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Num); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Str); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Dex); readPos += GameAssist.ReadFloat(binContent, readPos, out member.IQ); readPos += GameAssist.ReadFloat(binContent, readPos, out member.HP); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Pattack); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Mattack); readPos += GameAssist.ReadFloat(binContent, readPos, out member.PDefense); readPos += GameAssist.ReadFloat(binContent, readPos, out member.MDefense); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.HeroColourID] = 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 != 17) { Ex.Logger.Log("ModelBase.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ModelID") { Ex.Logger.Log("ModelBase.csv中字段[ModelID]位置不对应"); return(false); } if (vecLine[1] != "Res") { Ex.Logger.Log("ModelBase.csv中字段[Res]位置不对应"); return(false); } if (vecLine[2] != "Height") { Ex.Logger.Log("ModelBase.csv中字段[Height]位置不对应"); return(false); } if (vecLine[3] != "ModelR") { Ex.Logger.Log("ModelBase.csv中字段[ModelR]位置不对应"); return(false); } if (vecLine[4] != "BanShen") { Ex.Logger.Log("ModelBase.csv中字段[BanShen]位置不对应"); return(false); } if (vecLine[5] != "QuanShen") { Ex.Logger.Log("ModelBase.csv中字段[QuanShen]位置不对应"); return(false); } if (vecLine[6] != "Blood") { Ex.Logger.Log("ModelBase.csv中字段[Blood]位置不对应"); return(false); } if (vecLine[7] != "Progress") { Ex.Logger.Log("ModelBase.csv中字段[Progress]位置不对应"); return(false); } if (vecLine[8] != "Damage") { Ex.Logger.Log("ModelBase.csv中字段[Damage]位置不对应"); return(false); } if (vecLine[9] != "Exp") { Ex.Logger.Log("ModelBase.csv中字段[Exp]位置不对应"); return(false); } if (vecLine[10] != "Tips") { Ex.Logger.Log("ModelBase.csv中字段[Tips]位置不对应"); return(false); } if (vecLine[11] != "Nickname") { Ex.Logger.Log("ModelBase.csv中字段[Nickname]位置不对应"); return(false); } if (vecLine[12] != "NicknameSize") { Ex.Logger.Log("ModelBase.csv中字段[NicknameSize]位置不对应"); return(false); } if (vecLine[13] != "Title") { Ex.Logger.Log("ModelBase.csv中字段[Title]位置不对应"); return(false); } if (vecLine[14] != "TitleSize") { Ex.Logger.Log("ModelBase.csv中字段[TitleSize]位置不对应"); return(false); } if (vecLine[15] != "CityNickname") { Ex.Logger.Log("ModelBase.csv中字段[CityNickname]位置不对应"); return(false); } if (vecLine[16] != "CityNicknameSize") { Ex.Logger.Log("ModelBase.csv中字段[CityNicknameSize]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { ModelBaseElement member = new ModelBaseElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ModelID); readPos += GameAssist.ReadString(binContent, readPos, out member.Res); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Height); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ModelR); readPos += GameAssist.ReadString(binContent, readPos, out member.BanShen); readPos += GameAssist.ReadString(binContent, readPos, out member.QuanShen); readPos += GameAssist.ReadString(binContent, readPos, out member.Blood); readPos += GameAssist.ReadString(binContent, readPos, out member.Progress); readPos += GameAssist.ReadString(binContent, readPos, out member.Damage); readPos += GameAssist.ReadString(binContent, readPos, out member.Exp); readPos += GameAssist.ReadString(binContent, readPos, out member.Tips); readPos += GameAssist.ReadString(binContent, readPos, out member.Nickname); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.NicknameSize); readPos += GameAssist.ReadString(binContent, readPos, out member.Title); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.TitleSize); readPos += GameAssist.ReadString(binContent, readPos, out member.CityNickname); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.CityNicknameSize); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.ModelID] = 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 != 12) { Ex.Logger.Log("MainCity.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Ex.Logger.Log("MainCity.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "X") { Ex.Logger.Log("MainCity.csv中字段[X]位置不对应"); return(false); } if (vecLine[2] != "Y") { Ex.Logger.Log("MainCity.csv中字段[Y]位置不对应"); return(false); } if (vecLine[3] != "Z") { Ex.Logger.Log("MainCity.csv中字段[Z]位置不对应"); return(false); } if (vecLine[4] != "Rx") { Ex.Logger.Log("MainCity.csv中字段[Rx]位置不对应"); return(false); } if (vecLine[5] != "Ry") { Ex.Logger.Log("MainCity.csv中字段[Ry]位置不对应"); return(false); } if (vecLine[6] != "Rz") { Ex.Logger.Log("MainCity.csv中字段[Rz]位置不对应"); return(false); } if (vecLine[7] != "Type") { Ex.Logger.Log("MainCity.csv中字段[Type]位置不对应"); return(false); } if (vecLine[8] != "NpcID") { Ex.Logger.Log("MainCity.csv中字段[NpcID]位置不对应"); return(false); } if (vecLine[9] != "X2") { Ex.Logger.Log("MainCity.csv中字段[X2]位置不对应"); return(false); } if (vecLine[10] != "Y2") { Ex.Logger.Log("MainCity.csv中字段[Y2]位置不对应"); return(false); } if (vecLine[11] != "Z2") { Ex.Logger.Log("MainCity.csv中字段[Z2]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { MainCityElement member = new MainCityElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadFloat(binContent, readPos, out member.X); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Y); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Z); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Rx); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Ry); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Rz); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.NpcID); readPos += GameAssist.ReadFloat(binContent, readPos, out member.X2); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Y2); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Z2); 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 != 56) { Ex.Logger.Log("Hero.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "Hero") { Ex.Logger.Log("Hero.csv中字段[Hero]位置不对应"); return(false); } if (vecLine[1] != "Name") { Ex.Logger.Log("Hero.csv中字段[Name]位置不对应"); return(false); } if (vecLine[2] != "ModelID") { Ex.Logger.Log("Hero.csv中字段[ModelID]位置不对应"); return(false); } if (vecLine[3] != "Sex") { Ex.Logger.Log("Hero.csv中字段[Sex]位置不对应"); return(false); } if (vecLine[4] != "HeadID") { Ex.Logger.Log("Hero.csv中字段[HeadID]位置不对应"); return(false); } if (vecLine[5] != "Zhu_HeadID") { Ex.Logger.Log("Hero.csv中字段[Zhu_HeadID]位置不对应"); return(false); } if (vecLine[6] != "FB_HeadID") { Ex.Logger.Log("Hero.csv中字段[FB_HeadID]位置不对应"); return(false); } if (vecLine[7] != "Career_Icon") { Ex.Logger.Log("Hero.csv中字段[Career_Icon]位置不对应"); return(false); } if (vecLine[8] != "ZhiYeIcon") { Ex.Logger.Log("Hero.csv中字段[ZhiYeIcon]位置不对应"); return(false); } if (vecLine[9] != "XingJi") { Ex.Logger.Log("Hero.csv中字段[XingJi]位置不对应"); return(false); } if (vecLine[10] != "AttType") { Ex.Logger.Log("Hero.csv中字段[AttType]位置不对应"); return(false); } if (vecLine[11] != "HeroR") { Ex.Logger.Log("Hero.csv中字段[HeroR]位置不对应"); return(false); } if (vecLine[12] != "Type") { Ex.Logger.Log("Hero.csv中字段[Type]位置不对应"); return(false); } if (vecLine[13] != "SpeedFuben") { Ex.Logger.Log("Hero.csv中字段[SpeedFuben]位置不对应"); return(false); } if (vecLine[14] != "SpeedZhucheng") { Ex.Logger.Log("Hero.csv中字段[SpeedZhucheng]位置不对应"); return(false); } if (vecLine[15] != "Colour") { Ex.Logger.Log("Hero.csv中字段[Colour]位置不对应"); return(false); } if (vecLine[16] != "Star") { Ex.Logger.Log("Hero.csv中字段[Star]位置不对应"); return(false); } if (vecLine[17] != "Suipian") { Ex.Logger.Log("Hero.csv中字段[Suipian]位置不对应"); return(false); } if (vecLine[18] != "Num") { Ex.Logger.Log("Hero.csv中字段[Num]位置不对应"); return(false); } if (vecLine[19] != "Skill") { Ex.Logger.Log("Hero.csv中字段[Skill]位置不对应"); return(false); } if (vecLine[20] != "Skill1") { Ex.Logger.Log("Hero.csv中字段[Skill1]位置不对应"); return(false); } if (vecLine[21] != "Skill2") { Ex.Logger.Log("Hero.csv中字段[Skill2]位置不对应"); return(false); } if (vecLine[22] != "Skill3") { Ex.Logger.Log("Hero.csv中字段[Skill3]位置不对应"); return(false); } if (vecLine[23] != "Skill4") { Ex.Logger.Log("Hero.csv中字段[Skill4]位置不对应"); return(false); } if (vecLine[24] != "Skill5") { Ex.Logger.Log("Hero.csv中字段[Skill5]位置不对应"); return(false); } if (vecLine[25] != "Skill6") { Ex.Logger.Log("Hero.csv中字段[Skill6]位置不对应"); return(false); } if (vecLine[26] != "Skill7") { Ex.Logger.Log("Hero.csv中字段[Skill7]位置不对应"); return(false); } if (vecLine[27] != "Skill8") { Ex.Logger.Log("Hero.csv中字段[Skill8]位置不对应"); return(false); } if (vecLine[28] != "Skill9") { Ex.Logger.Log("Hero.csv中字段[Skill9]位置不对应"); return(false); } if (vecLine[29] != "AllowMove") { Ex.Logger.Log("Hero.csv中字段[AllowMove]位置不对应"); return(false); } if (vecLine[30] != "STA") { Ex.Logger.Log("Hero.csv中字段[STA]位置不对应"); return(false); } if (vecLine[31] != "SPI") { Ex.Logger.Log("Hero.csv中字段[SPI]位置不对应"); return(false); } if (vecLine[32] != "STR") { Ex.Logger.Log("Hero.csv中字段[STR]位置不对应"); return(false); } if (vecLine[33] != "INT") { Ex.Logger.Log("Hero.csv中字段[INT]位置不对应"); return(false); } if (vecLine[34] != "AGI") { Ex.Logger.Log("Hero.csv中字段[AGI]位置不对应"); return(false); } if (vecLine[35] != "STALVUP") { Ex.Logger.Log("Hero.csv中字段[STALVUP]位置不对应"); return(false); } if (vecLine[36] != "SPILVUP") { Ex.Logger.Log("Hero.csv中字段[SPILVUP]位置不对应"); return(false); } if (vecLine[37] != "STRLVUP") { Ex.Logger.Log("Hero.csv中字段[STRLVUP]位置不对应"); return(false); } if (vecLine[38] != "INTLVUP") { Ex.Logger.Log("Hero.csv中字段[INTLVUP]位置不对应"); return(false); } if (vecLine[39] != "AGILVUP") { Ex.Logger.Log("Hero.csv中字段[AGILVUP]位置不对应"); return(false); } if (vecLine[40] != "HP") { Ex.Logger.Log("Hero.csv中字段[HP]位置不对应"); return(false); } if (vecLine[41] != "reHP") { Ex.Logger.Log("Hero.csv中字段[reHP]位置不对应"); return(false); } if (vecLine[42] != "MP") { Ex.Logger.Log("Hero.csv中字段[MP]位置不对应"); return(false); } if (vecLine[43] != "reMP") { Ex.Logger.Log("Hero.csv中字段[reMP]位置不对应"); return(false); } if (vecLine[44] != "minPA") { Ex.Logger.Log("Hero.csv中字段[minPA]位置不对应"); return(false); } if (vecLine[45] != "maxPA") { Ex.Logger.Log("Hero.csv中字段[maxPA]位置不对应"); return(false); } if (vecLine[46] != "minMA") { Ex.Logger.Log("Hero.csv中字段[minMA]位置不对应"); return(false); } if (vecLine[47] != "maxMA") { Ex.Logger.Log("Hero.csv中字段[maxMA]位置不对应"); return(false); } if (vecLine[48] != "PD") { Ex.Logger.Log("Hero.csv中字段[PD]位置不对应"); return(false); } if (vecLine[49] != "MD") { Ex.Logger.Log("Hero.csv中字段[MD]位置不对应"); return(false); } if (vecLine[50] != "igPhi") { Ex.Logger.Log("Hero.csv中字段[igPhi]位置不对应"); return(false); } if (vecLine[51] != "igMdo") { Ex.Logger.Log("Hero.csv中字段[igMdo]位置不对应"); return(false); } if (vecLine[52] != "Pdo") { Ex.Logger.Log("Hero.csv中字段[Pdo]位置不对应"); return(false); } if (vecLine[53] != "Mdo") { Ex.Logger.Log("Hero.csv中字段[Mdo]位置不对应"); return(false); } if (vecLine[54] != "HitRate") { Ex.Logger.Log("Hero.csv中字段[HitRate]位置不对应"); return(false); } if (vecLine[55] != "CritRate") { Ex.Logger.Log("Hero.csv中字段[CritRate]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { HeroElement member = new HeroElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Hero); readPos += GameAssist.ReadString(binContent, readPos, out member.Name); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ModelID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Sex); readPos += GameAssist.ReadString(binContent, readPos, out member.HeadID); readPos += GameAssist.ReadString(binContent, readPos, out member.Zhu_HeadID); readPos += GameAssist.ReadString(binContent, readPos, out member.FB_HeadID); readPos += GameAssist.ReadString(binContent, readPos, out member.Career_Icon); readPos += GameAssist.ReadString(binContent, readPos, out member.ZhiYeIcon); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.XingJi); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.AttType); readPos += GameAssist.ReadFloat(binContent, readPos, out member.HeroR); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type); readPos += GameAssist.ReadFloat(binContent, readPos, out member.SpeedFuben); readPos += GameAssist.ReadFloat(binContent, readPos, out member.SpeedZhucheng); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Colour); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Star); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Suipian); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Num); readPos += GameAssist.ReadString(binContent, readPos, out member.Skill); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill1); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill2); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill3); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill4); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill5); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill6); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill7); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill8); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill9); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.AllowMove); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.STA); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SPI); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.STR); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.INT); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.AGI); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.STALVUP); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SPILVUP); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.STRLVUP); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.INTLVUP); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.AGILVUP); readPos += GameAssist.ReadString(binContent, readPos, out member.HP); readPos += GameAssist.ReadString(binContent, readPos, out member.reHP); readPos += GameAssist.ReadString(binContent, readPos, out member.MP); readPos += GameAssist.ReadString(binContent, readPos, out member.reMP); readPos += GameAssist.ReadString(binContent, readPos, out member.minPA); readPos += GameAssist.ReadString(binContent, readPos, out member.maxPA); readPos += GameAssist.ReadString(binContent, readPos, out member.minMA); readPos += GameAssist.ReadString(binContent, readPos, out member.maxMA); readPos += GameAssist.ReadString(binContent, readPos, out member.PD); readPos += GameAssist.ReadString(binContent, readPos, out member.MD); readPos += GameAssist.ReadString(binContent, readPos, out member.igPhi); readPos += GameAssist.ReadString(binContent, readPos, out member.igMdo); readPos += GameAssist.ReadString(binContent, readPos, out member.Pdo); readPos += GameAssist.ReadString(binContent, readPos, out member.Mdo); readPos += GameAssist.ReadFloat(binContent, readPos, out member.HitRate); readPos += GameAssist.ReadFloat(binContent, readPos, out member.CritRate); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.Hero] = 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) { Debug.Log("WuSheng.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Debug.Log("WuSheng.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "LvLimit") { Debug.Log("WuSheng.csv中字段[LvLimit]位置不对应"); return(false); } if (vecLine[2] != "EXP") { Debug.Log("WuSheng.csv中字段[EXP]位置不对应"); return(false); } if (vecLine[3] != "CanShu") { Debug.Log("WuSheng.csv中字段[CanShu]位置不对应"); return(false); } if (vecLine[4] != "Pattack") { Debug.Log("WuSheng.csv中字段[Pattack]位置不对应"); return(false); } if (vecLine[5] != "Mattack") { Debug.Log("WuSheng.csv中字段[Mattack]位置不对应"); return(false); } if (vecLine[6] != "PDefense") { Debug.Log("WuSheng.csv中字段[PDefense]位置不对应"); return(false); } if (vecLine[7] != "MDefense") { Debug.Log("WuSheng.csv中字段[MDefense]位置不对应"); return(false); } if (vecLine[8] != "HP") { Debug.Log("WuSheng.csv中字段[HP]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { WuShengElement member = new WuShengElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LvLimit); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.EXP); readPos += GameAssist.ReadFloat(binContent, readPos, out member.CanShu); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Pattack); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Mattack); readPos += GameAssist.ReadFloat(binContent, readPos, out member.PDefense); readPos += GameAssist.ReadFloat(binContent, readPos, out member.MDefense); readPos += GameAssist.ReadFloat(binContent, readPos, out member.HP); 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 != 49) { Ex.Logger.Log("Role.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "id") { Ex.Logger.Log("Role.csv中字段[id]位置不对应"); return(false); } if (vecLine[1] != "comment") { Ex.Logger.Log("Role.csv中字段[comment]位置不对应"); return(false); } if (vecLine[2] != "race") { Ex.Logger.Log("Role.csv中字段[race]位置不对应"); return(false); } if (vecLine[3] != "occupation") { Ex.Logger.Log("Role.csv中字段[occupation]位置不对应"); return(false); } if (vecLine[4] != "gender") { Ex.Logger.Log("Role.csv中字段[gender]位置不对应"); return(false); } if (vecLine[5] != "race_icon") { Ex.Logger.Log("Role.csv中字段[race_icon]位置不对应"); return(false); } if (vecLine[6] != "race_name") { Ex.Logger.Log("Role.csv中字段[race_name]位置不对应"); return(false); } if (vecLine[7] != "race_desc") { Ex.Logger.Log("Role.csv中字段[race_desc]位置不对应"); return(false); } if (vecLine[8] != "occu_icon") { Ex.Logger.Log("Role.csv中字段[occu_icon]位置不对应"); return(false); } if (vecLine[9] != "create_occu_icon") { Ex.Logger.Log("Role.csv中字段[create_occu_icon]位置不对应"); return(false); } if (vecLine[10] != "occu_name") { Ex.Logger.Log("Role.csv中字段[occu_name]位置不对应"); return(false); } if (vecLine[11] != "occu_desc") { Ex.Logger.Log("Role.csv中字段[occu_desc]位置不对应"); return(false); } if (vecLine[12] != "occu_evaluate") { Ex.Logger.Log("Role.csv中字段[occu_evaluate]位置不对应"); return(false); } if (vecLine[13] != "model_id") { Ex.Logger.Log("Role.csv中字段[model_id]位置不对应"); return(false); } if (vecLine[14] != "strength") { Ex.Logger.Log("Role.csv中字段[strength]位置不对应"); return(false); } if (vecLine[15] != "speed ") { Ex.Logger.Log("Role.csv中字段[speed ]位置不对应"); return(false); } if (vecLine[16] != "agile") { Ex.Logger.Log("Role.csv中字段[agile]位置不对应"); return(false); } if (vecLine[17] != "stamina") { Ex.Logger.Log("Role.csv中字段[stamina]位置不对应"); return(false); } if (vecLine[18] != "spirit") { Ex.Logger.Log("Role.csv中字段[spirit]位置不对应"); return(false); } if (vecLine[19] != "maxhp") { Ex.Logger.Log("Role.csv中字段[maxhp]位置不对应"); return(false); } if (vecLine[20] != "maxmp") { Ex.Logger.Log("Role.csv中字段[maxmp]位置不对应"); return(false); } if (vecLine[21] != "physic_attack") { Ex.Logger.Log("Role.csv中字段[physic_attack]位置不对应"); return(false); } if (vecLine[22] != "physic_defense") { Ex.Logger.Log("Role.csv中字段[physic_defense]位置不对应"); return(false); } if (vecLine[23] != "magic_attack") { Ex.Logger.Log("Role.csv中字段[magic_attack]位置不对应"); return(false); } if (vecLine[24] != "magic_defense") { Ex.Logger.Log("Role.csv中字段[magic_defense]位置不对应"); return(false); } if (vecLine[25] != "hit_value") { Ex.Logger.Log("Role.csv中字段[hit_value]位置不对应"); return(false); } if (vecLine[26] != "hit_rate") { Ex.Logger.Log("Role.csv中字段[hit_rate]位置不对应"); return(false); } if (vecLine[27] != "miss_value") { Ex.Logger.Log("Role.csv中字段[miss_value]位置不对应"); return(false); } if (vecLine[28] != "miss_rate") { Ex.Logger.Log("Role.csv中字段[miss_rate]位置不对应"); return(false); } if (vecLine[29] != "critical_value") { Ex.Logger.Log("Role.csv中字段[critical_value]位置不对应"); return(false); } if (vecLine[30] != "critical_rate") { Ex.Logger.Log("Role.csv中字段[critical_rate]位置不对应"); return(false); } if (vecLine[31] != "tenacity_value") { Ex.Logger.Log("Role.csv中字段[tenacity_value]位置不对应"); return(false); } if (vecLine[32] != "tenacity_rate") { Ex.Logger.Log("Role.csv中字段[tenacity_rate]位置不对应"); return(false); } if (vecLine[33] != "dodge_value") { Ex.Logger.Log("Role.csv中字段[dodge_value]位置不对应"); return(false); } if (vecLine[34] != "dodge_rate") { Ex.Logger.Log("Role.csv中字段[dodge_rate]位置不对应"); return(false); } if (vecLine[35] != "penetrate_value") { Ex.Logger.Log("Role.csv中字段[penetrate_value]位置不对应"); return(false); } if (vecLine[36] != "penetrate_rate") { Ex.Logger.Log("Role.csv中字段[penetrate_rate]位置不对应"); return(false); } if (vecLine[37] != "miss_level") { Ex.Logger.Log("Role.csv中字段[miss_level]位置不对应"); return(false); } if (vecLine[38] != "critical_level") { Ex.Logger.Log("Role.csv中字段[critical_level]位置不对应"); return(false); } if (vecLine[39] != "dodge_level") { Ex.Logger.Log("Role.csv中字段[dodge_level]位置不对应"); return(false); } if (vecLine[40] != "move_speed") { Ex.Logger.Log("Role.csv中字段[move_speed]位置不对应"); return(false); } if (vecLine[41] != "physic_oppose") { Ex.Logger.Log("Role.csv中字段[physic_oppose]位置不对应"); return(false); } if (vecLine[42] != "magic_oppose") { Ex.Logger.Log("Role.csv中字段[magic_oppose]位置不对应"); return(false); } if (vecLine[43] != "physic_add") { Ex.Logger.Log("Role.csv中字段[physic_add]位置不对应"); return(false); } if (vecLine[44] != "magic_add") { Ex.Logger.Log("Role.csv中字段[magic_add]位置不对应"); return(false); } if (vecLine[45] != "scene_id") { Ex.Logger.Log("Role.csv中字段[scene_id]位置不对应"); return(false); } if (vecLine[46] != "posx") { Ex.Logger.Log("Role.csv中字段[posx]位置不对应"); return(false); } if (vecLine[47] != "posz") { Ex.Logger.Log("Role.csv中字段[posz]位置不对应"); return(false); } if (vecLine[48] != "direct") { Ex.Logger.Log("Role.csv中字段[direct]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { RoleElement member = new RoleElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.id); readPos += GameAssist.ReadString(binContent, readPos, out member.comment); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.race); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.occupation); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.gender); readPos += GameAssist.ReadString(binContent, readPos, out member.race_icon); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.race_name); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.race_desc); readPos += GameAssist.ReadString(binContent, readPos, out member.occu_icon); readPos += GameAssist.ReadString(binContent, readPos, out member.create_occu_icon); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.occu_name); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.occu_desc); readPos += GameAssist.ReadString(binContent, readPos, out member.occu_evaluate); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.model_id); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.strength); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.speed); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.agile); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.stamina); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.spirit); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.maxhp); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.maxmp); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.physic_attack); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.physic_defense); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.magic_attack); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.magic_defense); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.hit_value); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.hit_rate); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.miss_value); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.miss_rate); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.critical_value); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.critical_rate); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.tenacity_value); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.tenacity_rate); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.dodge_value); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.dodge_rate); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.penetrate_value); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.penetrate_rate); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.miss_level); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.critical_level); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.dodge_level); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.move_speed); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.physic_oppose); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.magic_oppose); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.physic_add); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.magic_add); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.scene_id); readPos += GameAssist.ReadFloat(binContent, readPos, out member.posx); readPos += GameAssist.ReadFloat(binContent, readPos, out member.posz); readPos += GameAssist.ReadFloat(binContent, readPos, out member.direct); 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 != 14) { Debug.Log("Military.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Debug.Log("Military.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "Pattack") { Debug.Log("Military.csv中字段[Pattack]位置不对应"); return(false); } if (vecLine[2] != "Mattack") { Debug.Log("Military.csv中字段[Mattack]位置不对应"); return(false); } if (vecLine[3] != "PDefense") { Debug.Log("Military.csv中字段[PDefense]位置不对应"); return(false); } if (vecLine[4] != "MDefense") { Debug.Log("Military.csv中字段[MDefense]位置不对应"); return(false); } if (vecLine[5] != "HP") { Debug.Log("Military.csv中字段[HP]位置不对应"); return(false); } if (vecLine[6] != "Baoji") { Debug.Log("Military.csv中字段[Baoji]位置不对应"); return(false); } if (vecLine[7] != "Bisha") { Debug.Log("Military.csv中字段[Bisha]位置不对应"); return(false); } if (vecLine[8] != "MP") { Debug.Log("Military.csv中字段[MP]位置不对应"); return(false); } if (vecLine[9] != "MpHuifu") { Debug.Log("Military.csv中字段[MpHuifu]位置不对应"); return(false); } if (vecLine[10] != "Renxing") { Debug.Log("Military.csv中字段[Renxing]位置不对应"); return(false); } if (vecLine[11] != "Shouhu") { Debug.Log("Military.csv中字段[Shouhu]位置不对应"); return(false); } if (vecLine[12] != "HpHuifu") { Debug.Log("Military.csv中字段[HpHuifu]位置不对应"); return(false); } if (vecLine[13] != "Skilllevel") { Debug.Log("Military.csv中字段[Skilllevel]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { MilitaryElement member = new MilitaryElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Pattack); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Mattack); readPos += GameAssist.ReadFloat(binContent, readPos, out member.PDefense); readPos += GameAssist.ReadFloat(binContent, readPos, out member.MDefense); readPos += GameAssist.ReadFloat(binContent, readPos, out member.HP); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Baoji); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Bisha); readPos += GameAssist.ReadFloat(binContent, readPos, out member.MP); readPos += GameAssist.ReadFloat(binContent, readPos, out member.MpHuifu); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Renxing); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Shouhu); readPos += GameAssist.ReadFloat(binContent, readPos, out member.HpHuifu); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Skilllevel); 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 != 17) { Ex.Logger.Log("ExpandAI.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "expendAiId") { Ex.Logger.Log("ExpandAI.csv中字段[expendAiId]位置不对应"); return(false); } if (vecLine[1] != "Comment") { Ex.Logger.Log("ExpandAI.csv中字段[Comment]位置不对应"); return(false); } if (vecLine[2] != "aiGroup") { Ex.Logger.Log("ExpandAI.csv中字段[aiGroup]位置不对应"); return(false); } if (vecLine[3] != "TriggerType") { Ex.Logger.Log("ExpandAI.csv中字段[TriggerType]位置不对应"); return(false); } if (vecLine[4] != "TriggerParameter") { Ex.Logger.Log("ExpandAI.csv中字段[TriggerParameter]位置不对应"); return(false); } if (vecLine[5] != "times") { Ex.Logger.Log("ExpandAI.csv中字段[times]位置不对应"); return(false); } if (vecLine[6] != "eventRange") { Ex.Logger.Log("ExpandAI.csv中字段[eventRange]位置不对应"); return(false); } if (vecLine[7] != "dialogId") { Ex.Logger.Log("ExpandAI.csv中字段[dialogId]位置不对应"); return(false); } if (vecLine[8] != "HelpScope") { Ex.Logger.Log("ExpandAI.csv中字段[HelpScope]位置不对应"); return(false); } if (vecLine[9] != "HelpMonster") { Ex.Logger.Log("ExpandAI.csv中字段[HelpMonster]位置不对应"); return(false); } if (vecLine[10] != "Order") { Ex.Logger.Log("ExpandAI.csv中字段[Order]位置不对应"); return(false); } if (vecLine[11] != "UseSkill") { Ex.Logger.Log("ExpandAI.csv中字段[UseSkill]位置不对应"); return(false); } if (vecLine[12] != "JumpAI") { Ex.Logger.Log("ExpandAI.csv中字段[JumpAI]位置不对应"); return(false); } if (vecLine[13] != "JumpNPC") { Ex.Logger.Log("ExpandAI.csv中字段[JumpNPC]位置不对应"); return(false); } if (vecLine[14] != "SpecialEvent") { Ex.Logger.Log("ExpandAI.csv中字段[SpecialEvent]位置不对应"); return(false); } if (vecLine[15] != "EventProbability") { Ex.Logger.Log("ExpandAI.csv中字段[EventProbability]位置不对应"); return(false); } if (vecLine[16] != "FleeSpeed") { Ex.Logger.Log("ExpandAI.csv中字段[FleeSpeed]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { ExpandAIElement member = new ExpandAIElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.expendAiId); readPos += GameAssist.ReadString(binContent, readPos, out member.Comment); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.aiGroup); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.TriggerType); readPos += GameAssist.ReadString(binContent, readPos, out member.TriggerParameter); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.times); readPos += GameAssist.ReadFloat(binContent, readPos, out member.eventRange); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.dialogId); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HelpScope); readPos += GameAssist.ReadString(binContent, readPos, out member.HelpMonster); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Order); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.UseSkill); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.JumpAI); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.JumpNPC); readPos += GameAssist.ReadString(binContent, readPos, out member.SpecialEvent); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.EventProbability); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.FleeSpeed); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.expendAiId] = 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("Npc.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "NpcID") { Ex.Logger.Log("Npc.csv中字段[NpcID]位置不对应"); return(false); } if (vecLine[1] != "ModelID") { Ex.Logger.Log("Npc.csv中字段[ModelID]位置不对应"); return(false); } if (vecLine[2] != "ModelScaling") { Ex.Logger.Log("Npc.csv中字段[ModelScaling]位置不对应"); return(false); } if (vecLine[3] != "Name") { Ex.Logger.Log("Npc.csv中字段[Name]位置不对应"); return(false); } if (vecLine[4] != "Title") { Ex.Logger.Log("Npc.csv中字段[Title]位置不对应"); return(false); } if (vecLine[5] != "HeadIcon") { Ex.Logger.Log("Npc.csv中字段[HeadIcon]位置不对应"); return(false); } if (vecLine[6] != "Level") { Ex.Logger.Log("Npc.csv中字段[Level]位置不对应"); return(false); } if (vecLine[7] != "NpcR") { Ex.Logger.Log("Npc.csv中字段[NpcR]位置不对应"); return(false); } if (vecLine[8] != "DialogID") { Ex.Logger.Log("Npc.csv中字段[DialogID]位置不对应"); return(false); } if (vecLine[9] != "FunctionID") { Ex.Logger.Log("Npc.csv中字段[FunctionID]位置不对应"); return(false); } if (vecLine[10] != "DungeonsID") { Ex.Logger.Log("Npc.csv中字段[DungeonsID]位置不对应"); return(false); } if (vecLine[11] != "Dialog") { Ex.Logger.Log("Npc.csv中字段[Dialog]位置不对应"); return(false); } if (vecLine[12] != "banjing") { Ex.Logger.Log("Npc.csv中字段[banjing]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { NpcElement member = new NpcElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.NpcID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ModelID); readPos += GameAssist.ReadFloat(binContent, readPos, out member.ModelScaling); readPos += GameAssist.ReadString(binContent, readPos, out member.Name); readPos += GameAssist.ReadString(binContent, readPos, out member.Title); readPos += GameAssist.ReadString(binContent, readPos, out member.HeadIcon); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Level); readPos += GameAssist.ReadFloat(binContent, readPos, out member.NpcR); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.DialogID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.FunctionID); readPos += GameAssist.ReadString(binContent, readPos, out member.DungeonsID); readPos += GameAssist.ReadString(binContent, readPos, out member.Dialog); readPos += GameAssist.ReadFloat(binContent, readPos, out member.banjing); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.NpcID] = 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 != 12) { Ex.Logger.Log("CreatureDummy.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "dummy_id") { Ex.Logger.Log("CreatureDummy.csv中字段[dummy_id]位置不对应"); return(false); } if (vecLine[1] != "spawn_map_id") { Ex.Logger.Log("CreatureDummy.csv中字段[spawn_map_id]位置不对应"); return(false); } if (vecLine[2] != "spawn_x") { Ex.Logger.Log("CreatureDummy.csv中字段[spawn_x]位置不对应"); return(false); } if (vecLine[3] != "spawn_y") { Ex.Logger.Log("CreatureDummy.csv中字段[spawn_y]位置不对应"); return(false); } if (vecLine[4] != "spawn_z") { Ex.Logger.Log("CreatureDummy.csv中字段[spawn_z]位置不对应"); return(false); } if (vecLine[5] != "move_speed") { Ex.Logger.Log("CreatureDummy.csv中字段[move_speed]位置不对应"); return(false); } if (vecLine[6] != "attached_npc_01") { Ex.Logger.Log("CreatureDummy.csv中字段[attached_npc_01]位置不对应"); return(false); } if (vecLine[7] != "attached_npc_02") { Ex.Logger.Log("CreatureDummy.csv中字段[attached_npc_02]位置不对应"); return(false); } if (vecLine[8] != "attached_npc_03") { Ex.Logger.Log("CreatureDummy.csv中字段[attached_npc_03]位置不对应"); return(false); } if (vecLine[9] != "attached_npc_04") { Ex.Logger.Log("CreatureDummy.csv中字段[attached_npc_04]位置不对应"); return(false); } if (vecLine[10] != "attached_npc_05") { Ex.Logger.Log("CreatureDummy.csv中字段[attached_npc_05]位置不对应"); return(false); } if (vecLine[11] != "waypoint_start") { Ex.Logger.Log("CreatureDummy.csv中字段[waypoint_start]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { CreatureDummyElement member = new CreatureDummyElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.dummy_id); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.spawn_map_id); readPos += GameAssist.ReadFloat(binContent, readPos, out member.spawn_x); readPos += GameAssist.ReadFloat(binContent, readPos, out member.spawn_y); readPos += GameAssist.ReadFloat(binContent, readPos, out member.spawn_z); readPos += GameAssist.ReadFloat(binContent, readPos, out member.move_speed); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.attached_npc_01); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.attached_npc_02); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.attached_npc_03); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.attached_npc_04); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.attached_npc_05); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.waypoint_start); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.dummy_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) { Ex.Logger.Log("FBDialog.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "DialogID") { Ex.Logger.Log("FBDialog.csv中字段[DialogID]位置不对应"); return(false); } if (vecLine[1] != "Name1") { Ex.Logger.Log("FBDialog.csv中字段[Name1]位置不对应"); return(false); } if (vecLine[2] != "Dialog1") { Ex.Logger.Log("FBDialog.csv中字段[Dialog1]位置不对应"); return(false); } if (vecLine[3] != "BanShen") { Ex.Logger.Log("FBDialog.csv中字段[BanShen]位置不对应"); return(false); } if (vecLine[4] != "Set") { Ex.Logger.Log("FBDialog.csv中字段[Set]位置不对应"); return(false); } if (vecLine[5] != "Next") { Ex.Logger.Log("FBDialog.csv中字段[Next]位置不对应"); return(false); } if (vecLine[6] != "Time") { Ex.Logger.Log("FBDialog.csv中字段[Time]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { FBDialogElement member = new FBDialogElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.DialogID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Name1); readPos += GameAssist.ReadString(binContent, readPos, out member.Dialog1); readPos += GameAssist.ReadString(binContent, readPos, out member.BanShen); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Set); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Next); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Time); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.DialogID] = 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 != 18) { Ex.Logger.Log("Scene.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "id") { Ex.Logger.Log("Scene.csv中字段[id]位置不对应"); return(false); } if (vecLine[1] != "comment") { Ex.Logger.Log("Scene.csv中字段[comment]位置不对应"); return(false); } if (vecLine[2] != "name") { Ex.Logger.Log("Scene.csv中字段[name]位置不对应"); return(false); } if (vecLine[3] != "description") { Ex.Logger.Log("Scene.csv中字段[description]位置不对应"); return(false); } if (vecLine[4] != "background_pic") { Ex.Logger.Log("Scene.csv中字段[background_pic]位置不对应"); return(false); } if (vecLine[5] != "loading_pic") { Ex.Logger.Log("Scene.csv中字段[loading_pic]位置不对应"); return(false); } if (vecLine[6] != "thread_id") { Ex.Logger.Log("Scene.csv中字段[thread_id]位置不对应"); return(false); } if (vecLine[7] != "scene_type") { Ex.Logger.Log("Scene.csv中字段[scene_type]位置不对应"); return(false); } if (vecLine[8] != "valid_pos_x") { Ex.Logger.Log("Scene.csv中字段[valid_pos_x]位置不对应"); return(false); } if (vecLine[9] != "valid_pos_z") { Ex.Logger.Log("Scene.csv中字段[valid_pos_z]位置不对应"); return(false); } if (vecLine[10] != "scene_resource") { Ex.Logger.Log("Scene.csv中字段[scene_resource]位置不对应"); return(false); } if (vecLine[11] != "required_level") { Ex.Logger.Log("Scene.csv中字段[required_level]位置不对应"); return(false); } if (vecLine[12] != "required_score") { Ex.Logger.Log("Scene.csv中字段[required_score]位置不对应"); return(false); } if (vecLine[13] != "pre_quest") { Ex.Logger.Log("Scene.csv中字段[pre_quest]位置不对应"); return(false); } if (vecLine[14] != "teleport_id") { Ex.Logger.Log("Scene.csv中字段[teleport_id]位置不对应"); return(false); } if (vecLine[15] != "camera_type") { Ex.Logger.Log("Scene.csv中字段[camera_type]位置不对应"); return(false); } if (vecLine[16] != "pre_music") { Ex.Logger.Log("Scene.csv中字段[pre_music]位置不对应"); return(false); } if (vecLine[17] != "loop_music") { Ex.Logger.Log("Scene.csv中字段[loop_music]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { SceneElement member = new SceneElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.id); readPos += GameAssist.ReadString(binContent, readPos, out member.comment); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.name); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.description); readPos += GameAssist.ReadString(binContent, readPos, out member.background_pic); readPos += GameAssist.ReadString(binContent, readPos, out member.loading_pic); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.thread_id); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.scene_type); readPos += GameAssist.ReadFloat(binContent, readPos, out member.valid_pos_x); readPos += GameAssist.ReadFloat(binContent, readPos, out member.valid_pos_z); readPos += GameAssist.ReadString(binContent, readPos, out member.scene_resource); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.required_level); readPos += GameAssist.ReadFloat(binContent, readPos, out member.required_score); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.pre_quest); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.teleport_id); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.camera_type); readPos += GameAssist.ReadString(binContent, readPos, out member.pre_music); readPos += GameAssist.ReadString(binContent, readPos, out member.loop_music); 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 != 57) { Ex.Logger.Log("Skill.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "SkillID") { Ex.Logger.Log("Skill.csv中字段[SkillID]位置不对应"); return(false); } if (vecLine[1] != "Name") { Ex.Logger.Log("Skill.csv中字段[Name]位置不对应"); return(false); } if (vecLine[2] != "SourceIcon") { Ex.Logger.Log("Skill.csv中字段[SourceIcon]位置不对应"); return(false); } if (vecLine[3] != "Hero") { Ex.Logger.Log("Skill.csv中字段[Hero]位置不对应"); return(false); } if (vecLine[4] != "Type") { Ex.Logger.Log("Skill.csv中字段[Type]位置不对应"); return(false); } if (vecLine[5] != "SkillType") { Ex.Logger.Log("Skill.csv中字段[SkillType]位置不对应"); return(false); } if (vecLine[6] != "FenDuan") { Ex.Logger.Log("Skill.csv中字段[FenDuan]位置不对应"); return(false); } if (vecLine[7] != "XuLiStart") { Ex.Logger.Log("Skill.csv中字段[XuLiStart]位置不对应"); return(false); } if (vecLine[8] != "XuLiXunHuan") { Ex.Logger.Log("Skill.csv中字段[XuLiXunHuan]位置不对应"); return(false); } if (vecLine[9] != "XuLiSkill") { Ex.Logger.Log("Skill.csv中字段[XuLiSkill]位置不对应"); return(false); } if (vecLine[10] != "YinChangTime") { Ex.Logger.Log("Skill.csv中字段[YinChangTime]位置不对应"); return(false); } if (vecLine[11] != "YinChangSkill") { Ex.Logger.Log("Skill.csv中字段[YinChangSkill]位置不对应"); return(false); } if (vecLine[12] != "YinDaoTime") { Ex.Logger.Log("Skill.csv中字段[YinDaoTime]位置不对应"); return(false); } if (vecLine[13] != "YinDaoSkill") { Ex.Logger.Log("Skill.csv中字段[YinDaoSkill]位置不对应"); return(false); } if (vecLine[14] != "HitType") { Ex.Logger.Log("Skill.csv中字段[HitType]位置不对应"); return(false); } if (vecLine[15] != "SkillMana") { Ex.Logger.Log("Skill.csv中字段[SkillMana]位置不对应"); return(false); } if (vecLine[16] != "CD") { Ex.Logger.Log("Skill.csv中字段[CD]位置不对应"); return(false); } if (vecLine[17] != "AttackRange") { Ex.Logger.Log("Skill.csv中字段[AttackRange]位置不对应"); return(false); } if (vecLine[18] != "HitRange") { Ex.Logger.Log("Skill.csv中字段[HitRange]位置不对应"); return(false); } if (vecLine[19] != "Tips") { Ex.Logger.Log("Skill.csv中字段[Tips]位置不对应"); return(false); } if (vecLine[20] != "Set") { Ex.Logger.Log("Skill.csv中字段[Set]位置不对应"); return(false); } if (vecLine[21] != "LVMAX") { Ex.Logger.Log("Skill.csv中字段[LVMAX]位置不对应"); return(false); } if (vecLine[22] != "LvUp") { Ex.Logger.Log("Skill.csv中字段[LvUp]位置不对应"); return(false); } if (vecLine[23] != "LvUpMoney") { Ex.Logger.Log("Skill.csv中字段[LvUpMoney]位置不对应"); return(false); } if (vecLine[24] != "Attributes") { Ex.Logger.Log("Skill.csv中字段[Attributes]位置不对应"); return(false); } if (vecLine[25] != "Limit") { Ex.Logger.Log("Skill.csv中字段[Limit]位置不对应"); return(false); } if (vecLine[26] != "UnderAttack") { Ex.Logger.Log("Skill.csv中字段[UnderAttack]位置不对应"); return(false); } if (vecLine[27] != "AblityID") { Ex.Logger.Log("Skill.csv中字段[AblityID]位置不对应"); return(false); } if (vecLine[28] != "FriendNum") { Ex.Logger.Log("Skill.csv中字段[FriendNum]位置不对应"); return(false); } if (vecLine[29] != "FriendBuffID") { Ex.Logger.Log("Skill.csv中字段[FriendBuffID]位置不对应"); return(false); } if (vecLine[30] != "BuffID") { Ex.Logger.Log("Skill.csv中字段[BuffID]位置不对应"); return(false); } if (vecLine[31] != "BuffRate") { Ex.Logger.Log("Skill.csv中字段[BuffRate]位置不对应"); return(false); } if (vecLine[32] != "AttBuffEle") { Ex.Logger.Log("Skill.csv中字段[AttBuffEle]位置不对应"); return(false); } if (vecLine[33] != "DefBuffEle") { Ex.Logger.Log("Skill.csv中字段[DefBuffEle]位置不对应"); return(false); } if (vecLine[34] != "TrapID") { Ex.Logger.Log("Skill.csv中字段[TrapID]位置不对应"); return(false); } if (vecLine[35] != "HatredCoefficient") { Ex.Logger.Log("Skill.csv中字段[HatredCoefficient]位置不对应"); return(false); } if (vecLine[36] != "SkillHatred") { Ex.Logger.Log("Skill.csv中字段[SkillHatred]位置不对应"); return(false); } if (vecLine[37] != "DamageRuduce") { Ex.Logger.Log("Skill.csv中字段[DamageRuduce]位置不对应"); return(false); } if (vecLine[38] != "DamageNum") { Ex.Logger.Log("Skill.csv中字段[DamageNum]位置不对应"); return(false); } if (vecLine[39] != "AttSpcialEle") { Ex.Logger.Log("Skill.csv中字段[AttSpcialEle]位置不对应"); return(false); } if (vecLine[40] != "DefSpcialEle") { Ex.Logger.Log("Skill.csv中字段[DefSpcialEle]位置不对应"); return(false); } if (vecLine[41] != "SpcialDamageNum") { Ex.Logger.Log("Skill.csv中字段[SpcialDamageNum]位置不对应"); return(false); } if (vecLine[42] != "SkillDistance") { Ex.Logger.Log("Skill.csv中字段[SkillDistance]位置不对应"); return(false); } if (vecLine[43] != "TargetOpt") { Ex.Logger.Log("Skill.csv中字段[TargetOpt]位置不对应"); return(false); } if (vecLine[44] != "TargetNum") { Ex.Logger.Log("Skill.csv中字段[TargetNum]位置不对应"); return(false); } if (vecLine[45] != "ParameterType") { Ex.Logger.Log("Skill.csv中字段[ParameterType]位置不对应"); return(false); } if (vecLine[46] != "ParameterNum") { Ex.Logger.Log("Skill.csv中字段[ParameterNum]位置不对应"); return(false); } if (vecLine[47] != "TargetGroup") { Ex.Logger.Log("Skill.csv中字段[TargetGroup]位置不对应"); return(false); } if (vecLine[48] != "DamageAmend") { Ex.Logger.Log("Skill.csv中字段[DamageAmend]位置不对应"); return(false); } if (vecLine[49] != "IsFanXiang") { Ex.Logger.Log("Skill.csv中字段[IsFanXiang]位置不对应"); return(false); } if (vecLine[50] != "IsYiDong") { Ex.Logger.Log("Skill.csv中字段[IsYiDong]位置不对应"); return(false); } if (vecLine[51] != "HandleType") { Ex.Logger.Log("Skill.csv中字段[HandleType]位置不对应"); return(false); } if (vecLine[52] != "Special") { Ex.Logger.Log("Skill.csv中字段[Special]位置不对应"); return(false); } if (vecLine[53] != "TargetArea") { Ex.Logger.Log("Skill.csv中字段[TargetArea]位置不对应"); return(false); } if (vecLine[54] != "DaoDi") { Ex.Logger.Log("Skill.csv中字段[DaoDi]位置不对应"); return(false); } if (vecLine[55] != "HitBack") { Ex.Logger.Log("Skill.csv中字段[HitBack]位置不对应"); return(false); } if (vecLine[56] != "ZiDong") { Ex.Logger.Log("Skill.csv中字段[ZiDong]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { SkillElement member = new SkillElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SkillID); readPos += GameAssist.ReadString(binContent, readPos, out member.Name); readPos += GameAssist.ReadString(binContent, readPos, out member.SourceIcon); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Hero); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SkillType); readPos += GameAssist.ReadString(binContent, readPos, out member.FenDuan); readPos += GameAssist.ReadString(binContent, readPos, out member.XuLiStart); readPos += GameAssist.ReadString(binContent, readPos, out member.XuLiXunHuan); readPos += GameAssist.ReadString(binContent, readPos, out member.XuLiSkill); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.YinChangTime); readPos += GameAssist.ReadString(binContent, readPos, out member.YinChangSkill); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.YinDaoTime); readPos += GameAssist.ReadString(binContent, readPos, out member.YinDaoSkill); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HitType); readPos += GameAssist.ReadString(binContent, readPos, out member.SkillMana); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.CD); readPos += GameAssist.ReadFloat(binContent, readPos, out member.AttackRange); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HitRange); readPos += GameAssist.ReadString(binContent, readPos, out member.Tips); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Set); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LVMAX); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LvUp); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LvUpMoney); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Attributes); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Limit); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.UnderAttack); readPos += GameAssist.ReadString(binContent, readPos, out member.AblityID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.FriendNum); readPos += GameAssist.ReadString(binContent, readPos, out member.FriendBuffID); readPos += GameAssist.ReadString(binContent, readPos, out member.BuffID); readPos += GameAssist.ReadString(binContent, readPos, out member.BuffRate); readPos += GameAssist.ReadString(binContent, readPos, out member.AttBuffEle); readPos += GameAssist.ReadString(binContent, readPos, out member.DefBuffEle); readPos += GameAssist.ReadString(binContent, readPos, out member.TrapID); readPos += GameAssist.ReadFloat(binContent, readPos, out member.HatredCoefficient); readPos += GameAssist.ReadFloat(binContent, readPos, out member.SkillHatred); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.DamageRuduce); readPos += GameAssist.ReadString(binContent, readPos, out member.DamageNum); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.AttSpcialEle); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.DefSpcialEle); readPos += GameAssist.ReadString(binContent, readPos, out member.SpcialDamageNum); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SkillDistance); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.TargetOpt); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.TargetNum); readPos += GameAssist.ReadString(binContent, readPos, out member.ParameterType); readPos += GameAssist.ReadString(binContent, readPos, out member.ParameterNum); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.TargetGroup); readPos += GameAssist.ReadString(binContent, readPos, out member.DamageAmend); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.IsFanXiang); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.IsYiDong); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HandleType); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Special); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.TargetArea); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.DaoDi); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HitBack); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ZiDong); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.SkillID] = 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) { Debug.Log("HeroJiBan.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "JBID") { Debug.Log("HeroJiBan.csv中字段[JBID]位置不对应"); return(false); } if (vecLine[1] != "Name") { Debug.Log("HeroJiBan.csv中字段[Name]位置不对应"); return(false); } if (vecLine[2] != "Hero") { Debug.Log("HeroJiBan.csv中字段[Hero]位置不对应"); return(false); } if (vecLine[3] != "Des") { Debug.Log("HeroJiBan.csv中字段[Des]位置不对应"); return(false); } if (vecLine[4] != "Type") { Debug.Log("HeroJiBan.csv中字段[Type]位置不对应"); return(false); } if (vecLine[5] != "Cond") { Debug.Log("HeroJiBan.csv中字段[Cond]位置不对应"); return(false); } if (vecLine[6] != "Attr") { Debug.Log("HeroJiBan.csv中字段[Attr]位置不对应"); return(false); } if (vecLine[7] != "Num") { Debug.Log("HeroJiBan.csv中字段[Num]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { HeroJiBanElement member = new HeroJiBanElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.JBID); readPos += GameAssist.ReadString(binContent, readPos, out member.Name); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Hero); readPos += GameAssist.ReadString(binContent, readPos, out member.Des); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type); readPos += GameAssist.ReadString(binContent, readPos, out member.Cond); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Attr); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Num); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.JBID] = 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("WayPoint.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "waypoint_id") { Ex.Logger.Log("WayPoint.csv中字段[waypoint_id]位置不对应"); return(false); } if (vecLine[1] != " spawn_map_id") { Ex.Logger.Log("WayPoint.csv中字段[ spawn_map_id]位置不对应"); return(false); } if (vecLine[2] != "spawn_x") { Ex.Logger.Log("WayPoint.csv中字段[spawn_x]位置不对应"); return(false); } if (vecLine[3] != "spawn_y") { Ex.Logger.Log("WayPoint.csv中字段[spawn_y]位置不对应"); return(false); } if (vecLine[4] != "spawn_z") { Ex.Logger.Log("WayPoint.csv中字段[spawn_z]位置不对应"); return(false); } if (vecLine[5] != "waypoint_next_id") { Ex.Logger.Log("WayPoint.csv中字段[waypoint_next_id]位置不对应"); return(false); } if (vecLine[6] != "waypoint_animation") { Ex.Logger.Log("WayPoint.csv中字段[waypoint_animation]位置不对应"); return(false); } if (vecLine[7] != "waypoint_delay") { Ex.Logger.Log("WayPoint.csv中字段[waypoint_delay]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { WayPointElement member = new WayPointElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.waypoint_id); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.spawn_map_id); readPos += GameAssist.ReadFloat(binContent, readPos, out member.spawn_x); readPos += GameAssist.ReadFloat(binContent, readPos, out member.spawn_y); readPos += GameAssist.ReadFloat(binContent, readPos, out member.spawn_z); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.waypoint_next_id); readPos += GameAssist.ReadString(binContent, readPos, out member.waypoint_animation); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.waypoint_delay); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.waypoint_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 != 28) { Debug.Log("Monster.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "MonsterID") { Debug.Log("Monster.csv中字段[MonsterID]位置不对应"); return(false); } if (vecLine[1] != "ModelID") { Debug.Log("Monster.csv中字段[ModelID]位置不对应"); return(false); } if (vecLine[2] != "ModelScaling") { Debug.Log("Monster.csv中字段[ModelScaling]位置不对应"); return(false); } if (vecLine[3] != "Name") { Debug.Log("Monster.csv中字段[Name]位置不对应"); return(false); } if (vecLine[4] != "Title") { Debug.Log("Monster.csv中字段[Title]位置不对应"); return(false); } if (vecLine[5] != "Level") { Debug.Log("Monster.csv中字段[Level]位置不对应"); return(false); } if (vecLine[6] != "BaseAI") { Debug.Log("Monster.csv中字段[BaseAI]位置不对应"); return(false); } if (vecLine[7] != "Skill1") { Debug.Log("Monster.csv中字段[Skill1]位置不对应"); return(false); } if (vecLine[8] != "Skill2") { Debug.Log("Monster.csv中字段[Skill2]位置不对应"); return(false); } if (vecLine[9] != "Skill3") { Debug.Log("Monster.csv中字段[Skill3]位置不对应"); return(false); } if (vecLine[10] != "Skill4") { Debug.Log("Monster.csv中字段[Skill4]位置不对应"); return(false); } if (vecLine[11] != "Skill5") { Debug.Log("Monster.csv中字段[Skill5]位置不对应"); return(false); } if (vecLine[12] != "Skill6") { Debug.Log("Monster.csv中字段[Skill6]位置不对应"); return(false); } if (vecLine[13] != "Skill7") { Debug.Log("Monster.csv中字段[Skill7]位置不对应"); return(false); } if (vecLine[14] != "Skill8") { Debug.Log("Monster.csv中字段[Skill8]位置不对应"); return(false); } if (vecLine[15] != "Skill9") { Debug.Log("Monster.csv中字段[Skill9]位置不对应"); return(false); } if (vecLine[16] != "MaxHP") { Debug.Log("Monster.csv中字段[MaxHP]位置不对应"); return(false); } if (vecLine[17] != "PhysicalAtk") { Debug.Log("Monster.csv中字段[PhysicalAtk]位置不对应"); return(false); } if (vecLine[18] != "MagicalAtk") { Debug.Log("Monster.csv中字段[MagicalAtk]位置不对应"); return(false); } if (vecLine[19] != "PhysicalDef") { Debug.Log("Monster.csv中字段[PhysicalDef]位置不对应"); return(false); } if (vecLine[20] != "MagicalDef") { Debug.Log("Monster.csv中字段[MagicalDef]位置不对应"); return(false); } if (vecLine[21] != "CritLevel") { Debug.Log("Monster.csv中字段[CritLevel]位置不对应"); return(false); } if (vecLine[22] != "CritDef") { Debug.Log("Monster.csv中字段[CritDef]位置不对应"); return(false); } if (vecLine[23] != "CritDamage") { Debug.Log("Monster.csv中字段[CritDamage]位置不对应"); return(false); } if (vecLine[24] != "CritReduce") { Debug.Log("Monster.csv中字段[CritReduce]位置不对应"); return(false); } if (vecLine[25] != "Regain") { Debug.Log("Monster.csv中字段[Regain]位置不对应"); return(false); } if (vecLine[26] != "MoveSpeed") { Debug.Log("Monster.csv中字段[MoveSpeed]位置不对应"); return(false); } if (vecLine[27] != "AttackRate") { Debug.Log("Monster.csv中字段[AttackRate]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { MonsterElement member = new MonsterElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MonsterID); readPos += GameAssist.ReadString(binContent, readPos, out member.ModelID); readPos += GameAssist.ReadFloat(binContent, readPos, out member.ModelScaling); readPos += GameAssist.ReadString(binContent, readPos, out member.Name); readPos += GameAssist.ReadString(binContent, readPos, out member.Title); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Level); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.BaseAI); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill1); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill2); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill3); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill4); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill5); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill6); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill7); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill8); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill9); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MaxHP); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.PhysicalAtk); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MagicalAtk); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.PhysicalDef); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MagicalDef); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.CritLevel); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.CritDef); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.CritDamage); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.CritReduce); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Regain); readPos += GameAssist.ReadFloat(binContent, readPos, out member.MoveSpeed); readPos += GameAssist.ReadFloat(binContent, readPos, out member.AttackRate); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.MonsterID] = 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 != 15) { Ex.Logger.Log("Gather.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "GatherID") { Ex.Logger.Log("Gather.csv中字段[GatherID]位置不对应"); return(false); } if (vecLine[1] != "Name") { Ex.Logger.Log("Gather.csv中字段[Name]位置不对应"); return(false); } if (vecLine[2] != "Title") { Ex.Logger.Log("Gather.csv中字段[Title]位置不对应"); return(false); } if (vecLine[3] != "Type") { Ex.Logger.Log("Gather.csv中字段[Type]位置不对应"); return(false); } if (vecLine[4] != "ModelID") { Ex.Logger.Log("Gather.csv中字段[ModelID]位置不对应"); return(false); } if (vecLine[5] != "ModelScaling") { Ex.Logger.Log("Gather.csv中字段[ModelScaling]位置不对应"); return(false); } if (vecLine[6] != "Condition") { Ex.Logger.Log("Gather.csv中字段[Condition]位置不对应"); return(false); } if (vecLine[7] != "Item") { Ex.Logger.Log("Gather.csv中字段[Item]位置不对应"); return(false); } if (vecLine[8] != "Duration") { Ex.Logger.Log("Gather.csv中字段[Duration]位置不对应"); return(false); } if (vecLine[9] != "Break") { Ex.Logger.Log("Gather.csv中字段[Break]位置不对应"); return(false); } if (vecLine[10] != "Times") { Ex.Logger.Log("Gather.csv中字段[Times]位置不对应"); return(false); } if (vecLine[11] != "Relive") { Ex.Logger.Log("Gather.csv中字段[Relive]位置不对应"); return(false); } if (vecLine[12] != "GatherR") { Ex.Logger.Log("Gather.csv中字段[GatherR]位置不对应"); return(false); } if (vecLine[13] != "ChangJing") { Ex.Logger.Log("Gather.csv中字段[ChangJing]位置不对应"); return(false); } if (vecLine[14] != "Skill") { Ex.Logger.Log("Gather.csv中字段[Skill]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { GatherElement member = new GatherElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.GatherID); readPos += GameAssist.ReadString(binContent, readPos, out member.Name); readPos += GameAssist.ReadString(binContent, readPos, out member.Title); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ModelID); readPos += GameAssist.ReadFloat(binContent, readPos, out member.ModelScaling); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Condition); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Item); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Duration); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Break); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Times); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Relive); readPos += GameAssist.ReadFloat(binContent, readPos, out member.GatherR); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ChangJing); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Skill); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.GatherID] = 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) { Ex.Logger.Log("CreatureSpawn.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "spawn_id") { Ex.Logger.Log("CreatureSpawn.csv中字段[spawn_id]位置不对应"); return(false); } if (vecLine[1] != "npc_entry_id") { Ex.Logger.Log("CreatureSpawn.csv中字段[npc_entry_id]位置不对应"); return(false); } if (vecLine[2] != "spawn_map_id") { Ex.Logger.Log("CreatureSpawn.csv中字段[spawn_map_id]位置不对应"); return(false); } if (vecLine[3] != "spawn_x") { Ex.Logger.Log("CreatureSpawn.csv中字段[spawn_x]位置不对应"); return(false); } if (vecLine[4] != "spawn_y") { Ex.Logger.Log("CreatureSpawn.csv中字段[spawn_y]位置不对应"); return(false); } if (vecLine[5] != "spawn_z") { Ex.Logger.Log("CreatureSpawn.csv中字段[spawn_z]位置不对应"); return(false); } if (vecLine[6] != "refresh_time") { Ex.Logger.Log("CreatureSpawn.csv中字段[refresh_time]位置不对应"); return(false); } if (vecLine[7] != "refresh_type") { Ex.Logger.Log("CreatureSpawn.csv中字段[refresh_type]位置不对应"); return(false); } if (vecLine[8] != "animation_default") { Ex.Logger.Log("CreatureSpawn.csv中字段[animation_default]位置不对应"); return(false); } if (vecLine[9] != "animation_delay") { Ex.Logger.Log("CreatureSpawn.csv中字段[animation_delay]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { CreatureSpawnElement member = new CreatureSpawnElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.spawn_id); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.npc_entry_id); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.spawn_map_id); readPos += GameAssist.ReadFloat(binContent, readPos, out member.spawn_x); readPos += GameAssist.ReadFloat(binContent, readPos, out member.spawn_y); readPos += GameAssist.ReadFloat(binContent, readPos, out member.spawn_z); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.refresh_time); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.refresh_type); readPos += GameAssist.ReadString(binContent, readPos, out member.animation_default); readPos += GameAssist.ReadString(binContent, readPos, out member.animation_delay); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.spawn_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 != 5) { Ex.Logger.Log("YiTiaoLong.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Ex.Logger.Log("YiTiaoLong.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "ExpReward") { Ex.Logger.Log("YiTiaoLong.csv中字段[ExpReward]位置不对应"); return(false); } if (vecLine[2] != "SpecialRewardId") { Ex.Logger.Log("YiTiaoLong.csv中字段[SpecialRewardId]位置不对应"); return(false); } if (vecLine[3] != "Num") { Ex.Logger.Log("YiTiaoLong.csv中字段[Num]位置不对应"); return(false); } if (vecLine[4] != "SpecialRewardPro") { Ex.Logger.Log("YiTiaoLong.csv中字段[SpecialRewardPro]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { YiTiaoLongElement member = new YiTiaoLongElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadFloat(binContent, readPos, out member.ExpReward); readPos += GameAssist.ReadString(binContent, readPos, out member.SpecialRewardId); readPos += GameAssist.ReadString(binContent, readPos, out member.Num); readPos += GameAssist.ReadString(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 != 32) { Ex.Logger.Log("Creature.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "entry_id") { Ex.Logger.Log("Creature.csv中字段[entry_id]位置不对应"); return(false); } if (vecLine[1] != "combat_coe_id") { Ex.Logger.Log("Creature.csv中字段[combat_coe_id]位置不对应"); return(false); } if (vecLine[2] != "gd_comment") { Ex.Logger.Log("Creature.csv中字段[gd_comment]位置不对应"); return(false); } if (vecLine[3] != "name_id") { Ex.Logger.Log("Creature.csv中字段[name_id]位置不对应"); return(false); } if (vecLine[4] != "sub_name_id") { Ex.Logger.Log("Creature.csv中字段[sub_name_id]位置不对应"); return(false); } if (vecLine[5] != "model_id") { Ex.Logger.Log("Creature.csv中字段[model_id]位置不对应"); return(false); } if (vecLine[6] != "mapping_path") { Ex.Logger.Log("Creature.csv中字段[mapping_path]位置不对应"); return(false); } if (vecLine[7] != "scale") { Ex.Logger.Log("Creature.csv中字段[scale]位置不对应"); return(false); } if (vecLine[8] != "opacity") { Ex.Logger.Log("Creature.csv中字段[opacity]位置不对应"); return(false); } if (vecLine[9] != "icon") { Ex.Logger.Log("Creature.csv中字段[icon]位置不对应"); return(false); } if (vecLine[10] != "health_bar_display") { Ex.Logger.Log("Creature.csv中字段[health_bar_display]位置不对应"); return(false); } if (vecLine[11] != "name_bar_display") { Ex.Logger.Log("Creature.csv中字段[name_bar_display]位置不对应"); return(false); } if (vecLine[12] != "creature_level") { Ex.Logger.Log("Creature.csv中字段[creature_level]位置不对应"); return(false); } if (vecLine[13] != "creature_type") { Ex.Logger.Log("Creature.csv中字段[creature_type]位置不对应"); return(false); } if (vecLine[14] != "faction") { Ex.Logger.Log("Creature.csv中字段[faction]位置不对应"); return(false); } if (vecLine[15] != "race") { Ex.Logger.Log("Creature.csv中字段[race]位置不对应"); return(false); } if (vecLine[16] != "boundary_length") { Ex.Logger.Log("Creature.csv中字段[boundary_length]位置不对应"); return(false); } if (vecLine[17] != "boundary_width") { Ex.Logger.Log("Creature.csv中字段[boundary_width]位置不对应"); return(false); } if (vecLine[18] != "boundary_height") { Ex.Logger.Log("Creature.csv中字段[boundary_height]位置不对应"); return(false); } if (vecLine[19] != "walk_speed") { Ex.Logger.Log("Creature.csv中字段[walk_speed]位置不对应"); return(false); } if (vecLine[20] != "run_speed") { Ex.Logger.Log("Creature.csv中字段[run_speed]位置不对应"); return(false); } if (vecLine[21] != "script_location") { Ex.Logger.Log("Creature.csv中字段[script_location]位置不对应"); return(false); } if (vecLine[22] != "can_be_targeted") { Ex.Logger.Log("Creature.csv中字段[can_be_targeted]位置不对应"); return(false); } if (vecLine[23] != "can_attack") { Ex.Logger.Log("Creature.csv中字段[can_attack]位置不对应"); return(false); } if (vecLine[24] != "pool_skill_num") { Ex.Logger.Log("Creature.csv中字段[pool_skill_num]位置不对应"); return(false); } if (vecLine[25] != "selected_sound") { Ex.Logger.Log("Creature.csv中字段[selected_sound]位置不对应"); return(false); } if (vecLine[26] != "death_sound") { Ex.Logger.Log("Creature.csv中字段[death_sound]位置不对应"); return(false); } if (vecLine[27] != "skill_1") { Ex.Logger.Log("Creature.csv中字段[skill_1]位置不对应"); return(false); } if (vecLine[28] != "skill_2") { Ex.Logger.Log("Creature.csv中字段[skill_2]位置不对应"); return(false); } if (vecLine[29] != "skill_3") { Ex.Logger.Log("Creature.csv中字段[skill_3]位置不对应"); return(false); } if (vecLine[30] != "skill_4") { Ex.Logger.Log("Creature.csv中字段[skill_4]位置不对应"); return(false); } if (vecLine[31] != "skill_5") { Ex.Logger.Log("Creature.csv中字段[skill_5]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { CreatureElement member = new CreatureElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.entry_id); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.combat_coe_id); readPos += GameAssist.ReadString(binContent, readPos, out member.gd_comment); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.name_id); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.sub_name_id); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.model_id); readPos += GameAssist.ReadString(binContent, readPos, out member.mapping_path); readPos += GameAssist.ReadFloat(binContent, readPos, out member.scale); readPos += GameAssist.ReadFloat(binContent, readPos, out member.opacity); readPos += GameAssist.ReadString(binContent, readPos, out member.icon); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.health_bar_display); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.name_bar_display); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.creature_level); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.creature_type); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.faction); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.race); readPos += GameAssist.ReadFloat(binContent, readPos, out member.boundary_length); readPos += GameAssist.ReadFloat(binContent, readPos, out member.boundary_width); readPos += GameAssist.ReadFloat(binContent, readPos, out member.boundary_height); readPos += GameAssist.ReadFloat(binContent, readPos, out member.walk_speed); readPos += GameAssist.ReadFloat(binContent, readPos, out member.run_speed); readPos += GameAssist.ReadString(binContent, readPos, out member.script_location); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.can_be_targeted); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.can_attack); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.pool_skill_num); readPos += GameAssist.ReadString(binContent, readPos, out member.selected_sound); readPos += GameAssist.ReadString(binContent, readPos, out member.death_sound); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.skill_1); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.skill_2); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.skill_3); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.skill_4); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.skill_5); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.entry_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 != 31) { Ex.Logger.Log("CreatureCombatBasic.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "id") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[id]位置不对应"); return(false); } if (vecLine[1] != "note") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[note]位置不对应"); return(false); } if (vecLine[2] != "hp_min") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[hp_min]位置不对应"); return(false); } if (vecLine[3] != "hp_max") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[hp_max]位置不对应"); return(false); } if (vecLine[4] != "p_atk_min") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[p_atk_min]位置不对应"); return(false); } if (vecLine[5] != "p_atk_max") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[p_atk_max]位置不对应"); return(false); } if (vecLine[6] != "p_def") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[p_def]位置不对应"); return(false); } if (vecLine[7] != "s_atk_min") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[s_atk_min]位置不对应"); return(false); } if (vecLine[8] != "s_atk_max") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[s_atk_max]位置不对应"); return(false); } if (vecLine[9] != "s_def") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[s_def]位置不对应"); return(false); } if (vecLine[10] != "hit_value") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[hit_value]位置不对应"); return(false); } if (vecLine[11] != "dodge_value") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[dodge_value]位置不对应"); return(false); } if (vecLine[12] != "crit_value") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[crit_value]位置不对应"); return(false); } if (vecLine[13] != "resilience_value") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[resilience_value]位置不对应"); return(false); } if (vecLine[14] != "penetrate_value") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[penetrate_value]位置不对应"); return(false); } if (vecLine[15] != "block_value") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[block_value]位置不对应"); return(false); } if (vecLine[16] != "life_per_sec") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[life_per_sec]位置不对应"); return(false); } if (vecLine[17] != "life_steal_chance") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[life_steal_chance]位置不对应"); return(false); } if (vecLine[18] != "life_steal_rate") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[life_steal_rate]位置不对应"); return(false); } if (vecLine[19] != "thorns_chance") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[thorns_chance]位置不对应"); return(false); } if (vecLine[20] != "thorns_amount") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[thorns_amount]位置不对应"); return(false); } if (vecLine[21] != "exp") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[exp]位置不对应"); return(false); } if (vecLine[22] != "knockback_res") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[knockback_res]位置不对应"); return(false); } if (vecLine[23] != "hit") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[hit]位置不对应"); return(false); } if (vecLine[24] != "dodge") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[dodge]位置不对应"); return(false); } if (vecLine[25] != "crit") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[crit]位置不对应"); return(false); } if (vecLine[26] != "resilience") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[resilience]位置不对应"); return(false); } if (vecLine[27] != "penetrate") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[penetrate]位置不对应"); return(false); } if (vecLine[28] != "block") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[block]位置不对应"); return(false); } if (vecLine[29] != "crit_dmg") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[crit_dmg]位置不对应"); return(false); } if (vecLine[30] != "crit_res") { Ex.Logger.Log("CreatureCombatBasic.csv中字段[crit_res]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { CreatureCombatBasicElement member = new CreatureCombatBasicElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.id); readPos += GameAssist.ReadString(binContent, readPos, out member.note); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.hp_min); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.hp_max); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.p_atk_min); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.p_atk_max); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.p_def); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.s_atk_min); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.s_atk_max); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.s_def); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.hit_value); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.dodge_value); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.crit_value); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.resilience_value); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.penetrate_value); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.block_value); readPos += GameAssist.ReadFloat(binContent, readPos, out member.life_per_sec); readPos += GameAssist.ReadFloat(binContent, readPos, out member.life_steal_chance); readPos += GameAssist.ReadFloat(binContent, readPos, out member.life_steal_rate); readPos += GameAssist.ReadFloat(binContent, readPos, out member.thorns_chance); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.thorns_amount); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.exp); readPos += GameAssist.ReadFloat(binContent, readPos, out member.knockback_res); readPos += GameAssist.ReadFloat(binContent, readPos, out member.hit); readPos += GameAssist.ReadFloat(binContent, readPos, out member.dodge); readPos += GameAssist.ReadFloat(binContent, readPos, out member.crit); readPos += GameAssist.ReadFloat(binContent, readPos, out member.resilience); readPos += GameAssist.ReadFloat(binContent, readPos, out member.penetrate); readPos += GameAssist.ReadFloat(binContent, readPos, out member.block); readPos += GameAssist.ReadFloat(binContent, readPos, out member.crit_dmg); readPos += GameAssist.ReadFloat(binContent, readPos, out member.crit_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 != 9) { Ex.Logger.Log("CreatureCombatCoe.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "id") { Ex.Logger.Log("CreatureCombatCoe.csv中字段[id]位置不对应"); return(false); } if (vecLine[1] != "note") { Ex.Logger.Log("CreatureCombatCoe.csv中字段[note]位置不对应"); return(false); } if (vecLine[2] != "template_id") { Ex.Logger.Log("CreatureCombatCoe.csv中字段[template_id]位置不对应"); return(false); } if (vecLine[3] != "hp_rate") { Ex.Logger.Log("CreatureCombatCoe.csv中字段[hp_rate]位置不对应"); return(false); } if (vecLine[4] != "p_atk_rate") { Ex.Logger.Log("CreatureCombatCoe.csv中字段[p_atk_rate]位置不对应"); return(false); } if (vecLine[5] != "p_def_rate") { Ex.Logger.Log("CreatureCombatCoe.csv中字段[p_def_rate]位置不对应"); return(false); } if (vecLine[6] != "s_atk_rate") { Ex.Logger.Log("CreatureCombatCoe.csv中字段[s_atk_rate]位置不对应"); return(false); } if (vecLine[7] != "s_def_rate") { Ex.Logger.Log("CreatureCombatCoe.csv中字段[s_def_rate]位置不对应"); return(false); } if (vecLine[8] != "exp_rate") { Ex.Logger.Log("CreatureCombatCoe.csv中字段[exp_rate]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { CreatureCombatCoeElement member = new CreatureCombatCoeElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.id); readPos += GameAssist.ReadString(binContent, readPos, out member.note); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.template_id); readPos += GameAssist.ReadFloat(binContent, readPos, out member.hp_rate); readPos += GameAssist.ReadFloat(binContent, readPos, out member.p_atk_rate); readPos += GameAssist.ReadFloat(binContent, readPos, out member.p_def_rate); readPos += GameAssist.ReadFloat(binContent, readPos, out member.s_atk_rate); readPos += GameAssist.ReadFloat(binContent, readPos, out member.s_def_rate); readPos += GameAssist.ReadFloat(binContent, readPos, out member.exp_rate); 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 != 5) { Ex.Logger.Log("WanFaConfig.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "ID") { Ex.Logger.Log("WanFaConfig.csv中字段[ID]位置不对应"); return(false); } if (vecLine[1] != "Name") { Ex.Logger.Log("WanFaConfig.csv中字段[Name]位置不对应"); return(false); } if (vecLine[2] != "Args1") { Ex.Logger.Log("WanFaConfig.csv中字段[Args1]位置不对应"); return(false); } if (vecLine[3] != "Args2") { Ex.Logger.Log("WanFaConfig.csv中字段[Args2]位置不对应"); return(false); } if (vecLine[4] != "WanFa") { Ex.Logger.Log("WanFaConfig.csv中字段[WanFa]位置不对应"); return(false); } for (int i = 0; i < nRow; i++) { WanFaConfigElement member = new WanFaConfigElement(); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID); readPos += GameAssist.ReadString(binContent, readPos, out member.Name); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Args1); readPos += GameAssist.ReadFloat(binContent, readPos, out member.Args2); readPos += GameAssist.ReadString(binContent, readPos, out member.WanFa); 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 != 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 != 35) { Ex.Logger.Log("Equip.csv中列数量与生成的代码不匹配!"); return(false); } if (vecLine[0] != "EquipID") { Ex.Logger.Log("Equip.csv中字段[EquipID]位置不对应"); return(false); } if (vecLine[1] != "Type") { Ex.Logger.Log("Equip.csv中字段[Type]位置不对应"); return(false); } if (vecLine[2] != "Name") { Ex.Logger.Log("Equip.csv中字段[Name]位置不对应"); return(false); } if (vecLine[3] != "LV") { Ex.Logger.Log("Equip.csv中字段[LV]位置不对应"); return(false); } if (vecLine[4] != "ZhiYe") { Ex.Logger.Log("Equip.csv中字段[ZhiYe]位置不对应"); return(false); } if (vecLine[5] != "Res") { Ex.Logger.Log("Equip.csv中字段[Res]位置不对应"); return(false); } if (vecLine[6] != "Colour") { Ex.Logger.Log("Equip.csv中字段[Colour]位置不对应"); return(false); } if (vecLine[7] != "XiangQian") { Ex.Logger.Log("Equip.csv中字段[XiangQian]位置不对应"); return(false); } if (vecLine[8] != "DaKong") { Ex.Logger.Log("Equip.csv中字段[DaKong]位置不对应"); return(false); } if (vecLine[9] != "XiLian") { Ex.Logger.Log("Equip.csv中字段[XiLian]位置不对应"); return(false); } if (vecLine[10] != "XiaoHao") { Ex.Logger.Log("Equip.csv中字段[XiaoHao]位置不对应"); return(false); } if (vecLine[11] != "JiChuXiLian") { Ex.Logger.Log("Equip.csv中字段[JiChuXiLian]位置不对应"); return(false); } if (vecLine[12] != "XiLianXiaoHao") { Ex.Logger.Log("Equip.csv中字段[XiLianXiaoHao]位置不对应"); return(false); } if (vecLine[13] != "ISGaiZao") { Ex.Logger.Log("Equip.csv中字段[ISGaiZao]位置不对应"); return(false); } if (vecLine[14] != "GaiZao") { Ex.Logger.Log("Equip.csv中字段[GaiZao]位置不对应"); return(false); } if (vecLine[15] != "GaiZaoXiaoHao") { Ex.Logger.Log("Equip.csv中字段[GaiZaoXiaoHao]位置不对应"); return(false); } if (vecLine[16] != "Attribute") { Ex.Logger.Log("Equip.csv中字段[Attribute]位置不对应"); return(false); } if (vecLine[17] != "Num1") { Ex.Logger.Log("Equip.csv中字段[Num1]位置不对应"); return(false); } if (vecLine[18] != "Num2") { Ex.Logger.Log("Equip.csv中字段[Num2]位置不对应"); return(false); } if (vecLine[19] != "Num3") { Ex.Logger.Log("Equip.csv中字段[Num3]位置不对应"); return(false); } if (vecLine[20] != "Num4") { Ex.Logger.Log("Equip.csv中字段[Num4]位置不对应"); return(false); } if (vecLine[21] != "JinHua") { Ex.Logger.Log("Equip.csv中字段[JinHua]位置不对应"); return(false); } if (vecLine[22] != "FuJia") { Ex.Logger.Log("Equip.csv中字段[FuJia]位置不对应"); return(false); } if (vecLine[23] != "MAX") { Ex.Logger.Log("Equip.csv中字段[MAX]位置不对应"); return(false); } if (vecLine[24] != "GuDing") { Ex.Logger.Log("Equip.csv中字段[GuDing]位置不对应"); return(false); } if (vecLine[25] != "FuJiaNum") { Ex.Logger.Log("Equip.csv中字段[FuJiaNum]位置不对应"); return(false); } if (vecLine[26] != "Decompose") { Ex.Logger.Log("Equip.csv中字段[Decompose]位置不对应"); return(false); } if (vecLine[27] != "DecomposeID") { Ex.Logger.Log("Equip.csv中字段[DecomposeID]位置不对应"); return(false); } if (vecLine[28] != "Nummin") { Ex.Logger.Log("Equip.csv中字段[Nummin]位置不对应"); return(false); } if (vecLine[29] != "Price") { Ex.Logger.Log("Equip.csv中字段[Price]位置不对应"); return(false); } if (vecLine[30] != "DelPrice") { Ex.Logger.Log("Equip.csv中字段[DelPrice]位置不对应"); return(false); } if (vecLine[31] != "BuyPrick") { Ex.Logger.Log("Equip.csv中字段[BuyPrick]位置不对应"); return(false); } if (vecLine[32] != " Valuabl") { Ex.Logger.Log("Equip.csv中字段[ Valuabl]位置不对应"); return(false); } if (vecLine[33] != "ModelId") { Ex.Logger.Log("Equip.csv中字段[ModelId]位置不对应"); return(false); } if (vecLine[34] != "EffectID") { Ex.Logger.Log("Equip.csv中字段[EffectID]位置不对应"); 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.Name); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LV); readPos += GameAssist.ReadString(binContent, readPos, out member.ZhiYe); readPos += GameAssist.ReadString(binContent, readPos, out member.Res); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Colour); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.XiangQian); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.DaKong); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.XiLian); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.XiaoHao); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.JiChuXiLian); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.XiLianXiaoHao); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ISGaiZao); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.GaiZao); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.GaiZaoXiaoHao); readPos += GameAssist.ReadString(binContent, readPos, out member.Attribute); readPos += GameAssist.ReadString(binContent, readPos, out member.Num1); readPos += GameAssist.ReadString(binContent, readPos, out member.Num2); readPos += GameAssist.ReadString(binContent, readPos, out member.Num3); readPos += GameAssist.ReadString(binContent, readPos, out member.Num4); readPos += GameAssist.ReadFloat(binContent, readPos, out member.JinHua); readPos += GameAssist.ReadString(binContent, readPos, out member.FuJia); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MAX); readPos += GameAssist.ReadString(binContent, readPos, out member.GuDing); readPos += GameAssist.ReadString(binContent, readPos, out member.FuJiaNum); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Decompose); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.DecomposeID); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Nummin); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Price); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.DelPrice); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.BuyPrick); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Valuabl); readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ModelId); readPos += GameAssist.ReadString(binContent, readPos, out member.EffectID); member.IsValidate = true; m_vecAllElements.Add(member); m_mapElements[member.EquipID] = member; } return(true); }