Exemplo n.º 1
0
    public bool LoadBin(byte[] binContent)
    {
        m_mapElements.Clear();
        m_vecAllElements.Clear();
        int nCol, nRow;
        int readPos = 0;

        readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol);
        readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow);
        List <string> vecLine     = new List <string>(nCol);
        List <int>    vecHeadType = new List <int>(nCol);
        string        tmpStr;
        int           tmpInt;

        for (int i = 0; i < nCol; i++)
        {
            readPos += GameAssist.ReadString(binContent, readPos, out tmpStr);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt);
            vecLine.Add(tmpStr);
            vecHeadType.Add(tmpInt);
        }
        if (vecLine.Count != 6)
        {
            Ex.Logger.Log("LvUp.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "LvID")
        {
            Ex.Logger.Log("LvUp.csv中字段[LvID]位置不对应"); return(false);
        }
        if (vecLine[1] != "Exp")
        {
            Ex.Logger.Log("LvUp.csv中字段[Exp]位置不对应"); return(false);
        }
        if (vecLine[2] != "Spirit")
        {
            Ex.Logger.Log("LvUp.csv中字段[Spirit]位置不对应"); return(false);
        }
        if (vecLine[3] != "SkillLvUp")
        {
            Ex.Logger.Log("LvUp.csv中字段[SkillLvUp]位置不对应"); return(false);
        }
        if (vecLine[4] != "SkillLvUpMoney")
        {
            Ex.Logger.Log("LvUp.csv中字段[SkillLvUpMoney]位置不对应"); return(false);
        }
        if (vecLine[5] != "XiuWei")
        {
            Ex.Logger.Log("LvUp.csv中字段[XiuWei]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            LvUpElement member = new LvUpElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LvID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Exp);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Spirit);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SkillLvUp);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SkillLvUpMoney);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.XiuWei);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.LvID] = member;
        }
        return(true);
    }
Exemplo n.º 2
0
    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("LifeSkills.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "ID")
        {
            Ex.Logger.Log("LifeSkills.csv中字段[ID]位置不对应"); return(false);
        }
        if (vecLine[1] != "LifeSkills")
        {
            Ex.Logger.Log("LifeSkills.csv中字段[LifeSkills]位置不对应"); return(false);
        }
        if (vecLine[2] != "LvID")
        {
            Ex.Logger.Log("LifeSkills.csv中字段[LvID]位置不对应"); return(false);
        }
        if (vecLine[3] != "Exp")
        {
            Ex.Logger.Log("LifeSkills.csv中字段[Exp]位置不对应"); return(false);
        }
        if (vecLine[4] != "Money")
        {
            Ex.Logger.Log("LifeSkills.csv中字段[Money]位置不对应"); return(false);
        }
        if (vecLine[5] != "SourceIcon")
        {
            Ex.Logger.Log("LifeSkills.csv中字段[SourceIcon]位置不对应"); return(false);
        }
        if (vecLine[6] != "ButtonName")
        {
            Ex.Logger.Log("LifeSkills.csv中字段[ButtonName]位置不对应"); return(false);
        }
        if (vecLine[7] != "LifeSkillsName")
        {
            Ex.Logger.Log("LifeSkills.csv中字段[LifeSkillsName]位置不对应"); return(false);
        }
        if (vecLine[8] != "describe")
        {
            Ex.Logger.Log("LifeSkills.csv中字段[describe]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            LifeSkillsElement member = new LifeSkillsElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LifeSkills);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LvID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Exp);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Money);
            readPos += GameAssist.ReadString(binContent, readPos, out member.SourceIcon);
            readPos += GameAssist.ReadString(binContent, readPos, out member.ButtonName);
            readPos += GameAssist.ReadString(binContent, readPos, out member.LifeSkillsName);
            readPos += GameAssist.ReadString(binContent, readPos, out member.describe);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.ID] = member;
        }
        return(true);
    }
Exemplo n.º 3
0
    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("Section.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "SectionID")
        {
            Ex.Logger.Log("Section.csv中字段[SectionID]位置不对应"); return(false);
        }
        if (vecLine[1] != "Name")
        {
            Ex.Logger.Log("Section.csv中字段[Name]位置不对应"); return(false);
        }
        if (vecLine[2] != "SystemID")
        {
            Ex.Logger.Log("Section.csv中字段[SystemID]位置不对应"); return(false);
        }
        if (vecLine[3] != "Team")
        {
            Ex.Logger.Log("Section.csv中字段[Team]位置不对应"); return(false);
        }
        if (vecLine[4] != "BackGround")
        {
            Ex.Logger.Log("Section.csv中字段[BackGround]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            SectionElement member = new SectionElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SectionID);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Name);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SystemID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Team);
            readPos += GameAssist.ReadString(binContent, readPos, out member.BackGround);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.SectionID] = member;
        }
        return(true);
    }
Exemplo n.º 4
0
    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("OneVSOneFlushTop.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "ID")
        {
            Ex.Logger.Log("OneVSOneFlushTop.csv中字段[ID]位置不对应"); return(false);
        }
        if (vecLine[1] != "StartTop")
        {
            Ex.Logger.Log("OneVSOneFlushTop.csv中字段[StartTop]位置不对应"); return(false);
        }
        if (vecLine[2] != "EndTop")
        {
            Ex.Logger.Log("OneVSOneFlushTop.csv中字段[EndTop]位置不对应"); return(false);
        }
        if (vecLine[3] != "Type")
        {
            Ex.Logger.Log("OneVSOneFlushTop.csv中字段[Type]位置不对应"); return(false);
        }
        if (vecLine[4] != "StartFront")
        {
            Ex.Logger.Log("OneVSOneFlushTop.csv中字段[StartFront]位置不对应"); return(false);
        }
        if (vecLine[5] != "EndFront")
        {
            Ex.Logger.Log("OneVSOneFlushTop.csv中字段[EndFront]位置不对应"); return(false);
        }
        if (vecLine[6] != "StartBack")
        {
            Ex.Logger.Log("OneVSOneFlushTop.csv中字段[StartBack]位置不对应"); return(false);
        }
        if (vecLine[7] != "Endback")
        {
            Ex.Logger.Log("OneVSOneFlushTop.csv中字段[Endback]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            OneVSOneFlushTopElement member = new OneVSOneFlushTopElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.StartTop);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.EndTop);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.StartFront);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.EndFront);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.StartBack);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Endback);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.ID] = member;
        }
        return(true);
    }
Exemplo n.º 5
0
    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("CiTiao.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "ID")
        {
            Ex.Logger.Log("CiTiao.csv中字段[ID]位置不对应"); return(false);
        }
        if (vecLine[1] != "Name")
        {
            Ex.Logger.Log("CiTiao.csv中字段[Name]位置不对应"); return(false);
        }
        if (vecLine[2] != "Type")
        {
            Ex.Logger.Log("CiTiao.csv中字段[Type]位置不对应"); return(false);
        }
        if (vecLine[3] != "Attr1")
        {
            Ex.Logger.Log("CiTiao.csv中字段[Attr1]位置不对应"); return(false);
        }
        if (vecLine[4] != "MiaoShu1")
        {
            Ex.Logger.Log("CiTiao.csv中字段[MiaoShu1]位置不对应"); return(false);
        }
        if (vecLine[5] != "FuHao1")
        {
            Ex.Logger.Log("CiTiao.csv中字段[FuHao1]位置不对应"); return(false);
        }
        if (vecLine[6] != "Attr2")
        {
            Ex.Logger.Log("CiTiao.csv中字段[Attr2]位置不对应"); return(false);
        }
        if (vecLine[7] != "MiaoShu2")
        {
            Ex.Logger.Log("CiTiao.csv中字段[MiaoShu2]位置不对应"); return(false);
        }
        if (vecLine[8] != "FuHao2")
        {
            Ex.Logger.Log("CiTiao.csv中字段[FuHao2]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            CiTiaoElement member = new CiTiaoElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Name);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Attr1);
            readPos += GameAssist.ReadString(binContent, readPos, out member.MiaoShu1);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.FuHao1);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Attr2);
            readPos += GameAssist.ReadString(binContent, readPos, out member.MiaoShu2);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.FuHao2);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.ID] = member;
        }
        return(true);
    }
Exemplo n.º 6
0
    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);
    }
Exemplo n.º 7
0
    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);
    }
Exemplo n.º 8
0
    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 != 19)
        {
            Ex.Logger.Log("FaBaoStar.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "ID")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[ID]位置不对应"); return(false);
        }
        if (vecLine[1] != "SuiPian1")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[SuiPian1]位置不对应"); return(false);
        }
        if (vecLine[2] != "Money1")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[Money1]位置不对应"); return(false);
        }
        if (vecLine[3] != "Rate1")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[Rate1]位置不对应"); return(false);
        }
        if (vecLine[4] != "SuiPian2")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[SuiPian2]位置不对应"); return(false);
        }
        if (vecLine[5] != "Money2")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[Money2]位置不对应"); return(false);
        }
        if (vecLine[6] != "Rate2")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[Rate2]位置不对应"); return(false);
        }
        if (vecLine[7] != "SuiPian3")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[SuiPian3]位置不对应"); return(false);
        }
        if (vecLine[8] != "Money3")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[Money3]位置不对应"); return(false);
        }
        if (vecLine[9] != "Rate3")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[Rate3]位置不对应"); return(false);
        }
        if (vecLine[10] != "SuiPian4")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[SuiPian4]位置不对应"); return(false);
        }
        if (vecLine[11] != "Money4")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[Money4]位置不对应"); return(false);
        }
        if (vecLine[12] != "Rate4")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[Rate4]位置不对应"); return(false);
        }
        if (vecLine[13] != "SuiPian5")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[SuiPian5]位置不对应"); return(false);
        }
        if (vecLine[14] != "Money5")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[Money5]位置不对应"); return(false);
        }
        if (vecLine[15] != "Rate5")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[Rate5]位置不对应"); return(false);
        }
        if (vecLine[16] != "SuiPian6")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[SuiPian6]位置不对应"); return(false);
        }
        if (vecLine[17] != "Money6")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[Money6]位置不对应"); return(false);
        }
        if (vecLine[18] != "Rate6")
        {
            Ex.Logger.Log("FaBaoStar.csv中字段[Rate6]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            FaBaoStarElement member = new FaBaoStarElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SuiPian1);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Money1);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Rate1);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SuiPian2);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Money2);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Rate2);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SuiPian3);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Money3);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Rate3);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SuiPian4);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Money4);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Rate4);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SuiPian5);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Money5);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Rate5);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SuiPian6);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Money6);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Rate6);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.ID] = member;
        }
        return(true);
    }
Exemplo n.º 9
0
    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("MailMsg.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "ID")
        {
            Ex.Logger.Log("MailMsg.csv中字段[ID]位置不对应"); return(false);
        }
        if (vecLine[1] != "MailType")
        {
            Ex.Logger.Log("MailMsg.csv中字段[MailType]位置不对应"); return(false);
        }
        if (vecLine[2] != "IconType")
        {
            Ex.Logger.Log("MailMsg.csv中字段[IconType]位置不对应"); return(false);
        }
        if (vecLine[3] != "MailTitle")
        {
            Ex.Logger.Log("MailMsg.csv中字段[MailTitle]位置不对应"); return(false);
        }
        if (vecLine[4] != "MailText")
        {
            Ex.Logger.Log("MailMsg.csv中字段[MailText]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            MailMsgElement member = new MailMsgElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MailType);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.IconType);
            readPos += GameAssist.ReadString(binContent, readPos, out member.MailTitle);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MailText);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.ID] = member;
        }
        return(true);
    }
Exemplo n.º 10
0
    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("OneVSOneNumReward.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "ID")
        {
            Ex.Logger.Log("OneVSOneNumReward.csv中字段[ID]位置不对应"); return(false);
        }
        if (vecLine[1] != "LV")
        {
            Ex.Logger.Log("OneVSOneNumReward.csv中字段[LV]位置不对应"); return(false);
        }
        if (vecLine[2] != "StartNum")
        {
            Ex.Logger.Log("OneVSOneNumReward.csv中字段[StartNum]位置不对应"); return(false);
        }
        if (vecLine[3] != "EndNum")
        {
            Ex.Logger.Log("OneVSOneNumReward.csv中字段[EndNum]位置不对应"); return(false);
        }
        if (vecLine[4] != "Score")
        {
            Ex.Logger.Log("OneVSOneNumReward.csv中字段[Score]位置不对应"); return(false);
        }
        if (vecLine[5] != "Experience")
        {
            Ex.Logger.Log("OneVSOneNumReward.csv中字段[Experience]位置不对应"); return(false);
        }
        if (vecLine[6] != "ItemID")
        {
            Ex.Logger.Log("OneVSOneNumReward.csv中字段[ItemID]位置不对应"); return(false);
        }
        if (vecLine[7] != "ItemNum")
        {
            Ex.Logger.Log("OneVSOneNumReward.csv中字段[ItemNum]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            OneVSOneNumRewardElement member = new OneVSOneNumRewardElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LV);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.StartNum);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.EndNum);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Score);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Experience);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ItemID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ItemNum);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.ID] = member;
        }
        return(true);
    }
Exemplo n.º 11
0
    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("BangHuiLvUp.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "ID")
        {
            Ex.Logger.Log("BangHuiLvUp.csv中字段[ID]位置不对应"); return(false);
        }
        if (vecLine[1] != "Name")
        {
            Ex.Logger.Log("BangHuiLvUp.csv中字段[Name]位置不对应"); return(false);
        }
        if (vecLine[2] != "Type")
        {
            Ex.Logger.Log("BangHuiLvUp.csv中字段[Type]位置不对应"); return(false);
        }
        if (vecLine[3] != "MAX")
        {
            Ex.Logger.Log("BangHuiLvUp.csv中字段[MAX]位置不对应"); return(false);
        }
        if (vecLine[4] != "Lv")
        {
            Ex.Logger.Log("BangHuiLvUp.csv中字段[Lv]位置不对应"); return(false);
        }
        if (vecLine[5] != "Res")
        {
            Ex.Logger.Log("BangHuiLvUp.csv中字段[Res]位置不对应"); return(false);
        }
        if (vecLine[6] != "Money")
        {
            Ex.Logger.Log("BangHuiLvUp.csv中字段[Money]位置不对应"); return(false);
        }
        if (vecLine[7] != "Limit1")
        {
            Ex.Logger.Log("BangHuiLvUp.csv中字段[Limit1]位置不对应"); return(false);
        }
        if (vecLine[8] != "Limit2")
        {
            Ex.Logger.Log("BangHuiLvUp.csv中字段[Limit2]位置不对应"); return(false);
        }
        if (vecLine[9] != "XiaoHao")
        {
            Ex.Logger.Log("BangHuiLvUp.csv中字段[XiaoHao]位置不对应"); return(false);
        }
        if (vecLine[10] != "Function")
        {
            Ex.Logger.Log("BangHuiLvUp.csv中字段[Function]位置不对应"); return(false);
        }
        if (vecLine[11] != "CanShu")
        {
            Ex.Logger.Log("BangHuiLvUp.csv中字段[CanShu]位置不对应"); return(false);
        }
        if (vecLine[12] != "Time")
        {
            Ex.Logger.Log("BangHuiLvUp.csv中字段[Time]位置不对应"); return(false);
        }
        if (vecLine[13] != "FuliTips")
        {
            Ex.Logger.Log("BangHuiLvUp.csv中字段[FuliTips]位置不对应"); return(false);
        }
        if (vecLine[14] != "LvUpTips")
        {
            Ex.Logger.Log("BangHuiLvUp.csv中字段[LvUpTips]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            BangHuiLvUpElement member = new BangHuiLvUpElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Name);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MAX);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Lv);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Res);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Money);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Limit1);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Limit2);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.XiaoHao);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Function);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.CanShu);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Time);
            readPos += GameAssist.ReadString(binContent, readPos, out member.FuliTips);
            readPos += GameAssist.ReadString(binContent, readPos, out member.LvUpTips);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.ID] = member;
        }
        return(true);
    }
Exemplo n.º 12
0
    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);
    }
Exemplo n.º 13
0
    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);
    }
Exemplo n.º 14
0
    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);
    }
Exemplo n.º 15
0
    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 != 60)
        {
            Ex.Logger.Log("LVAttr.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "LV")
        {
            Ex.Logger.Log("LVAttr.csv中字段[LV]位置不对应"); return(false);
        }
        if (vecLine[1] != "STA")
        {
            Ex.Logger.Log("LVAttr.csv中字段[STA]位置不对应"); return(false);
        }
        if (vecLine[2] != "SPI")
        {
            Ex.Logger.Log("LVAttr.csv中字段[SPI]位置不对应"); return(false);
        }
        if (vecLine[3] != "STR")
        {
            Ex.Logger.Log("LVAttr.csv中字段[STR]位置不对应"); return(false);
        }
        if (vecLine[4] != "INT")
        {
            Ex.Logger.Log("LVAttr.csv中字段[INT]位置不对应"); return(false);
        }
        if (vecLine[5] != "AGI")
        {
            Ex.Logger.Log("LVAttr.csv中字段[AGI]位置不对应"); return(false);
        }
        if (vecLine[6] != "HP")
        {
            Ex.Logger.Log("LVAttr.csv中字段[HP]位置不对应"); return(false);
        }
        if (vecLine[7] != "reHP")
        {
            Ex.Logger.Log("LVAttr.csv中字段[reHP]位置不对应"); return(false);
        }
        if (vecLine[8] != "MP")
        {
            Ex.Logger.Log("LVAttr.csv中字段[MP]位置不对应"); return(false);
        }
        if (vecLine[9] != "reMP")
        {
            Ex.Logger.Log("LVAttr.csv中字段[reMP]位置不对应"); return(false);
        }
        if (vecLine[10] != "minPA")
        {
            Ex.Logger.Log("LVAttr.csv中字段[minPA]位置不对应"); return(false);
        }
        if (vecLine[11] != "maxPA")
        {
            Ex.Logger.Log("LVAttr.csv中字段[maxPA]位置不对应"); return(false);
        }
        if (vecLine[12] != "minMA")
        {
            Ex.Logger.Log("LVAttr.csv中字段[minMA]位置不对应"); return(false);
        }
        if (vecLine[13] != "maxMA")
        {
            Ex.Logger.Log("LVAttr.csv中字段[maxMA]位置不对应"); return(false);
        }
        if (vecLine[14] != "PD")
        {
            Ex.Logger.Log("LVAttr.csv中字段[PD]位置不对应"); return(false);
        }
        if (vecLine[15] != "MD")
        {
            Ex.Logger.Log("LVAttr.csv中字段[MD]位置不对应"); return(false);
        }
        if (vecLine[16] != "igPhi")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igPhi]位置不对应"); return(false);
        }
        if (vecLine[17] != "igMdo")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igMdo]位置不对应"); return(false);
        }
        if (vecLine[18] != "Pdo")
        {
            Ex.Logger.Log("LVAttr.csv中字段[Pdo]位置不对应"); return(false);
        }
        if (vecLine[19] != "Mdo")
        {
            Ex.Logger.Log("LVAttr.csv中字段[Mdo]位置不对应"); return(false);
        }
        if (vecLine[20] != "igPcr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igPcr]位置不对应"); return(false);
        }
        if (vecLine[21] != "igMcr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igMcr]位置不对应"); return(false);
        }
        if (vecLine[22] != "Pcr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[Pcr]位置不对应"); return(false);
        }
        if (vecLine[23] != "Mcr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[Mcr]位置不对应"); return(false);
        }
        if (vecLine[24] != "igPrd")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igPrd]位置不对应"); return(false);
        }
        if (vecLine[25] != "igMrd")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igMrd]位置不对应"); return(false);
        }
        if (vecLine[26] != "Prd")
        {
            Ex.Logger.Log("LVAttr.csv中字段[Prd]位置不对应"); return(false);
        }
        if (vecLine[27] != "Mrd")
        {
            Ex.Logger.Log("LVAttr.csv中字段[Mrd]位置不对应"); return(false);
        }
        if (vecLine[28] != "igBlo")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igBlo]位置不对应"); return(false);
        }
        if (vecLine[29] != "Blo")
        {
            Ex.Logger.Log("LVAttr.csv中字段[Blo]位置不对应"); return(false);
        }
        if (vecLine[30] != "igBrd")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igBrd]位置不对应"); return(false);
        }
        if (vecLine[31] != "Brd")
        {
            Ex.Logger.Log("LVAttr.csv中字段[Brd]位置不对应"); return(false);
        }
        if (vecLine[32] != "igVEr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igVEr]位置不对应"); return(false);
        }
        if (vecLine[33] != "igSLr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igSLr]位置不对应"); return(false);
        }
        if (vecLine[34] != "igCHr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igCHr]位置不对应"); return(false);
        }
        if (vecLine[35] != "igABr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igABr]位置不对应"); return(false);
        }
        if (vecLine[36] != "igSIr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igSIr]位置不对应"); return(false);
        }
        if (vecLine[37] != "igGRr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igGRr]位置不对应"); return(false);
        }
        if (vecLine[38] != "igPEr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igPEr]位置不对应"); return(false);
        }
        if (vecLine[39] != "VEr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[VEr]位置不对应"); return(false);
        }
        if (vecLine[40] != "SLr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[SLr]位置不对应"); return(false);
        }
        if (vecLine[41] != "CHr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[CHr]位置不对应"); return(false);
        }
        if (vecLine[42] != "ABr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[ABr]位置不对应"); return(false);
        }
        if (vecLine[43] != "SIr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[SIr]位置不对应"); return(false);
        }
        if (vecLine[44] != "GRr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[GRr]位置不对应"); return(false);
        }
        if (vecLine[45] != "PEr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[PEr]位置不对应"); return(false);
        }
        if (vecLine[46] != "igFr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igFr]位置不对应"); return(false);
        }
        if (vecLine[47] != "igEr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igEr]位置不对应"); return(false);
        }
        if (vecLine[48] != "igWr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igWr]位置不对应"); return(false);
        }
        if (vecLine[49] != "igCr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igCr]位置不对应"); return(false);
        }
        if (vecLine[50] != "igPr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igPr]位置不对应"); return(false);
        }
        if (vecLine[51] != "igLr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igLr]位置不对应"); return(false);
        }
        if (vecLine[52] != "igDr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[igDr]位置不对应"); return(false);
        }
        if (vecLine[53] != "Fr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[Fr]位置不对应"); return(false);
        }
        if (vecLine[54] != "Er")
        {
            Ex.Logger.Log("LVAttr.csv中字段[Er]位置不对应"); return(false);
        }
        if (vecLine[55] != "Wr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[Wr]位置不对应"); return(false);
        }
        if (vecLine[56] != "Cr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[Cr]位置不对应"); return(false);
        }
        if (vecLine[57] != "Pr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[Pr]位置不对应"); return(false);
        }
        if (vecLine[58] != "Lr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[Lr]位置不对应"); return(false);
        }
        if (vecLine[59] != "Dr")
        {
            Ex.Logger.Log("LVAttr.csv中字段[Dr]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            LVAttrElement member = new LVAttrElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LV);
            readPos += GameAssist.ReadString(binContent, readPos, out member.STA);
            readPos += GameAssist.ReadString(binContent, readPos, out member.SPI);
            readPos += GameAssist.ReadString(binContent, readPos, out member.STR);
            readPos += GameAssist.ReadString(binContent, readPos, out member.INT);
            readPos += GameAssist.ReadString(binContent, readPos, out member.AGI);
            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.ReadString(binContent, readPos, out member.igPcr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igMcr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Pcr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Mcr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igPrd);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igMrd);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Prd);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Mrd);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igBlo);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Blo);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igBrd);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Brd);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igVEr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igSLr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igCHr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igABr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igSIr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igGRr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igPEr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.VEr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.SLr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.CHr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.ABr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.SIr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.GRr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.PEr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igFr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igEr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igWr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igCr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igPr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igLr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.igDr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Fr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Er);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Wr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Cr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Pr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Lr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Dr);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.LV] = member;
        }
        return(true);
    }
Exemplo n.º 16
0
    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);
    }
Exemplo n.º 17
0
    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 != 16)
        {
            Debug.Log("Equiptupo.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "TupoID")
        {
            Debug.Log("Equiptupo.csv中字段[TupoID]位置不对应"); return(false);
        }
        if (vecLine[1] != "Grade")
        {
            Debug.Log("Equiptupo.csv中字段[Grade]位置不对应"); return(false);
        }
        if (vecLine[2] != "Item")
        {
            Debug.Log("Equiptupo.csv中字段[Item]位置不对应"); return(false);
        }
        if (vecLine[3] != "Num")
        {
            Debug.Log("Equiptupo.csv中字段[Num]位置不对应"); return(false);
        }
        if (vecLine[4] != "Pattack")
        {
            Debug.Log("Equiptupo.csv中字段[Pattack]位置不对应"); return(false);
        }
        if (vecLine[5] != "Mattack")
        {
            Debug.Log("Equiptupo.csv中字段[Mattack]位置不对应"); return(false);
        }
        if (vecLine[6] != "PDefense")
        {
            Debug.Log("Equiptupo.csv中字段[PDefense]位置不对应"); return(false);
        }
        if (vecLine[7] != "MDefense")
        {
            Debug.Log("Equiptupo.csv中字段[MDefense]位置不对应"); return(false);
        }
        if (vecLine[8] != "HP")
        {
            Debug.Log("Equiptupo.csv中字段[HP]位置不对应"); return(false);
        }
        if (vecLine[9] != "Baoji")
        {
            Debug.Log("Equiptupo.csv中字段[Baoji]位置不对应"); return(false);
        }
        if (vecLine[10] != "Bisha")
        {
            Debug.Log("Equiptupo.csv中字段[Bisha]位置不对应"); return(false);
        }
        if (vecLine[11] != "MP")
        {
            Debug.Log("Equiptupo.csv中字段[MP]位置不对应"); return(false);
        }
        if (vecLine[12] != "MpHuifu")
        {
            Debug.Log("Equiptupo.csv中字段[MpHuifu]位置不对应"); return(false);
        }
        if (vecLine[13] != "Renxing")
        {
            Debug.Log("Equiptupo.csv中字段[Renxing]位置不对应"); return(false);
        }
        if (vecLine[14] != "Shouhu")
        {
            Debug.Log("Equiptupo.csv中字段[Shouhu]位置不对应"); return(false);
        }
        if (vecLine[15] != "HpHuifu")
        {
            Debug.Log("Equiptupo.csv中字段[HpHuifu]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            EquiptupoElement member = new EquiptupoElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.TupoID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Grade);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Item);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Num);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Pattack);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Mattack);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.PDefense);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MDefense);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HP);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Baoji);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Bisha);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MP);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MpHuifu);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Renxing);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Shouhu);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HpHuifu);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.TupoID] = member;
        }
        return(true);
    }
Exemplo n.º 18
0
    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("EquipStarRank.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "StarRankID")
        {
            Debug.Log("EquipStarRank.csv中字段[StarRankID]位置不对应"); return(false);
        }
        if (vecLine[1] != "Rank")
        {
            Debug.Log("EquipStarRank.csv中字段[Rank]位置不对应"); return(false);
        }
        if (vecLine[2] != "Grade")
        {
            Debug.Log("EquipStarRank.csv中字段[Grade]位置不对应"); return(false);
        }
        if (vecLine[3] != "Pattack")
        {
            Debug.Log("EquipStarRank.csv中字段[Pattack]位置不对应"); return(false);
        }
        if (vecLine[4] != "Mattack")
        {
            Debug.Log("EquipStarRank.csv中字段[Mattack]位置不对应"); return(false);
        }
        if (vecLine[5] != "PDefense")
        {
            Debug.Log("EquipStarRank.csv中字段[PDefense]位置不对应"); return(false);
        }
        if (vecLine[6] != "MDefense")
        {
            Debug.Log("EquipStarRank.csv中字段[MDefense]位置不对应"); return(false);
        }
        if (vecLine[7] != "HP")
        {
            Debug.Log("EquipStarRank.csv中字段[HP]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            EquipStarRankElement member = new EquipStarRankElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.StarRankID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Rank);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Grade);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Pattack);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Mattack);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.PDefense);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MDefense);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HP);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.StarRankID] = member;
        }
        return(true);
    }
Exemplo n.º 19
0
    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);
    }
Exemplo n.º 20
0
    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("Talent.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "LvID")
        {
            Ex.Logger.Log("Talent.csv中字段[LvID]位置不对应"); return(false);
        }
        if (vecLine[1] != "Name")
        {
            Ex.Logger.Log("Talent.csv中字段[Name]位置不对应"); return(false);
        }
        if (vecLine[2] != "Desc")
        {
            Ex.Logger.Log("Talent.csv中字段[Desc]位置不对应"); return(false);
        }
        if (vecLine[3] != "Type")
        {
            Ex.Logger.Log("Talent.csv中字段[Type]位置不对应"); return(false);
        }
        if (vecLine[4] != "Parameter")
        {
            Ex.Logger.Log("Talent.csv中字段[Parameter]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            TalentElement member = new TalentElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.LvID);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Name);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Desc);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Parameter);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.LvID] = member;
        }
        return(true);
    }
Exemplo n.º 21
0
    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);
    }
Exemplo n.º 22
0
    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);
    }
Exemplo n.º 23
0
    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);
    }
Exemplo n.º 24
0
    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);
    }
Exemplo n.º 25
0
    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("BaoShi.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "ID")
        {
            Debug.Log("BaoShi.csv中字段[ID]位置不对应"); return(false);
        }
        if (vecLine[1] != "Name")
        {
            Debug.Log("BaoShi.csv中字段[Name]位置不对应"); return(false);
        }
        if (vecLine[2] != "SourceID")
        {
            Debug.Log("BaoShi.csv中字段[SourceID]位置不对应"); return(false);
        }
        if (vecLine[3] != "Type")
        {
            Debug.Log("BaoShi.csv中字段[Type]位置不对应"); return(false);
        }
        if (vecLine[4] != "Lv")
        {
            Debug.Log("BaoShi.csv中字段[Lv]位置不对应"); return(false);
        }
        if (vecLine[5] != "Set")
        {
            Debug.Log("BaoShi.csv中字段[Set]位置不对应"); return(false);
        }
        if (vecLine[6] != "Attr")
        {
            Debug.Log("BaoShi.csv中字段[Attr]位置不对应"); return(false);
        }
        if (vecLine[7] != "Num")
        {
            Debug.Log("BaoShi.csv中字段[Num]位置不对应"); return(false);
        }
        if (vecLine[8] != "HeCheng")
        {
            Debug.Log("BaoShi.csv中字段[HeCheng]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            BaoShiElement member = new BaoShiElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Name);
            readPos += GameAssist.ReadString(binContent, readPos, out member.SourceID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Lv);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Set);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Attr);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Num);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HeCheng);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.ID] = member;
        }
        return(true);
    }
Exemplo n.º 26
0
    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("Revive.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "ID")
        {
            Ex.Logger.Log("Revive.csv中字段[ID]位置不对应"); return(false);
        }
        if (vecLine[1] != "Name")
        {
            Ex.Logger.Log("Revive.csv中字段[Name]位置不对应"); return(false);
        }
        if (vecLine[2] != "Desc")
        {
            Ex.Logger.Log("Revive.csv中字段[Desc]位置不对应"); return(false);
        }
        if (vecLine[3] != "Type")
        {
            Ex.Logger.Log("Revive.csv中字段[Type]位置不对应"); return(false);
        }
        if (vecLine[4] != "Set")
        {
            Ex.Logger.Log("Revive.csv中字段[Set]位置不对应"); return(false);
        }
        if (vecLine[5] != "HoldTime")
        {
            Ex.Logger.Log("Revive.csv中字段[HoldTime]位置不对应"); return(false);
        }
        if (vecLine[6] != "Time")
        {
            Ex.Logger.Log("Revive.csv中字段[Time]位置不对应"); return(false);
        }
        if (vecLine[7] != "MoneyType")
        {
            Ex.Logger.Log("Revive.csv中字段[MoneyType]位置不对应"); return(false);
        }
        if (vecLine[8] != "XiaoHao")
        {
            Ex.Logger.Log("Revive.csv中字段[XiaoHao]位置不对应"); return(false);
        }
        if (vecLine[9] != "FreeTimes")
        {
            Ex.Logger.Log("Revive.csv中字段[FreeTimes]位置不对应"); return(false);
        }
        if (vecLine[10] != "BuffID")
        {
            Ex.Logger.Log("Revive.csv中字段[BuffID]位置不对应"); return(false);
        }
        if (vecLine[11] != "TeamSharing")
        {
            Ex.Logger.Log("Revive.csv中字段[TeamSharing]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            ReviveElement member = new ReviveElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Name);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Desc);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Set);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.HoldTime);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Time);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MoneyType);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.XiaoHao);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.FreeTimes);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.BuffID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.TeamSharing);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.ID] = member;
        }
        return(true);
    }
Exemplo n.º 27
0
    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);
    }
Exemplo n.º 28
0
    public bool LoadBin(byte[] binContent)
    {
        m_mapElements.Clear();
        m_vecAllElements.Clear();
        int nCol, nRow;
        int readPos = 0;

        readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol);
        readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow);
        List <string> vecLine     = new List <string>(nCol);
        List <int>    vecHeadType = new List <int>(nCol);
        string        tmpStr;
        int           tmpInt;

        for (int i = 0; i < nCol; i++)
        {
            readPos += GameAssist.ReadString(binContent, readPos, out tmpStr);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt);
            vecLine.Add(tmpStr);
            vecHeadType.Add(tmpInt);
        }
        if (vecLine.Count != 7)
        {
            Debug.Log("ShimenReward.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "ID")
        {
            Debug.Log("ShimenReward.csv中字段[ID]位置不对应"); return(false);
        }
        if (vecLine[1] != "Lvl")
        {
            Debug.Log("ShimenReward.csv中字段[Lvl]位置不对应"); return(false);
        }
        if (vecLine[2] != "Res")
        {
            Debug.Log("ShimenReward.csv中字段[Res]位置不对应"); return(false);
        }
        if (vecLine[3] != "ExpReward")
        {
            Debug.Log("ShimenReward.csv中字段[ExpReward]位置不对应"); return(false);
        }
        if (vecLine[4] != "MoneyReward")
        {
            Debug.Log("ShimenReward.csv中字段[MoneyReward]位置不对应"); return(false);
        }
        if (vecLine[5] != "SpecialRewardId")
        {
            Debug.Log("ShimenReward.csv中字段[SpecialRewardId]位置不对应"); return(false);
        }
        if (vecLine[6] != "SpecialRewardPro")
        {
            Debug.Log("ShimenReward.csv中字段[SpecialRewardPro]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            ShimenRewardElement member = new ShimenRewardElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Lvl);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Res);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ExpReward);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MoneyReward);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SpecialRewardId);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.SpecialRewardPro);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.ID] = member;
        }
        return(true);
    }
Exemplo n.º 29
0
    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 != 25)
        {
            Ex.Logger.Log("Mission.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "MissionID")
        {
            Ex.Logger.Log("Mission.csv中字段[MissionID]位置不对应"); return(false);
        }
        if (vecLine[1] != "Name")
        {
            Ex.Logger.Log("Mission.csv中字段[Name]位置不对应"); return(false);
        }
        if (vecLine[2] != "Type")
        {
            Ex.Logger.Log("Mission.csv中字段[Type]位置不对应"); return(false);
        }
        if (vecLine[3] != "Title")
        {
            Ex.Logger.Log("Mission.csv中字段[Title]位置不对应"); return(false);
        }
        if (vecLine[4] != "Lv")
        {
            Ex.Logger.Log("Mission.csv中字段[Lv]位置不对应"); return(false);
        }
        if (vecLine[5] != "Reward")
        {
            Ex.Logger.Log("Mission.csv中字段[Reward]位置不对应"); return(false);
        }
        if (vecLine[6] != "TiaoJian")
        {
            Ex.Logger.Log("Mission.csv中字段[TiaoJian]位置不对应"); return(false);
        }
        if (vecLine[7] != "JieNpc")
        {
            Ex.Logger.Log("Mission.csv中字段[JieNpc]位置不对应"); return(false);
        }
        if (vecLine[8] != "JiaoNpc")
        {
            Ex.Logger.Log("Mission.csv中字段[JiaoNpc]位置不对应"); return(false);
        }
        if (vecLine[9] != "Dialog1")
        {
            Ex.Logger.Log("Mission.csv中字段[Dialog1]位置不对应"); return(false);
        }
        if (vecLine[10] != "Dialog2")
        {
            Ex.Logger.Log("Mission.csv中字段[Dialog2]位置不对应"); return(false);
        }
        if (vecLine[11] != "Dialog3")
        {
            Ex.Logger.Log("Mission.csv中字段[Dialog3]位置不对应"); return(false);
        }
        if (vecLine[12] != "IngDialog")
        {
            Ex.Logger.Log("Mission.csv中字段[IngDialog]位置不对应"); return(false);
        }
        if (vecLine[13] != "Tips")
        {
            Ex.Logger.Log("Mission.csv中字段[Tips]位置不对应"); return(false);
        }
        if (vecLine[14] != "Time")
        {
            Ex.Logger.Log("Mission.csv中字段[Time]位置不对应"); return(false);
        }
        if (vecLine[15] != "Index")
        {
            Ex.Logger.Log("Mission.csv中字段[Index]位置不对应"); return(false);
        }
        if (vecLine[16] != "QianZhi")
        {
            Ex.Logger.Log("Mission.csv中字段[QianZhi]位置不对应"); return(false);
        }
        if (vecLine[17] != "Monster")
        {
            Ex.Logger.Log("Mission.csv中字段[Monster]位置不对应"); return(false);
        }
        if (vecLine[18] != "Plant")
        {
            Ex.Logger.Log("Mission.csv中字段[Plant]位置不对应"); return(false);
        }
        if (vecLine[19] != "Npc")
        {
            Ex.Logger.Log("Mission.csv中字段[Npc]位置不对应"); return(false);
        }
        if (vecLine[20] != "FuBen")
        {
            Ex.Logger.Log("Mission.csv中字段[FuBen]位置不对应"); return(false);
        }
        if (vecLine[21] != "FuBenLimit")
        {
            Ex.Logger.Log("Mission.csv中字段[FuBenLimit]位置不对应"); return(false);
        }
        if (vecLine[22] != "Target")
        {
            Ex.Logger.Log("Mission.csv中字段[Target]位置不对应"); return(false);
        }
        if (vecLine[23] != "ZiDong")
        {
            Ex.Logger.Log("Mission.csv中字段[ZiDong]位置不对应"); return(false);
        }
        if (vecLine[24] != "TiJiao")
        {
            Ex.Logger.Log("Mission.csv中字段[TiJiao]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            MissionElement member = new MissionElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.MissionID);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Name);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Type);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Title);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Lv);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Reward);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.TiaoJian);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.JieNpc);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.JiaoNpc);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Dialog1);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Dialog2);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Dialog3);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.IngDialog);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Tips);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Time);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Index);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.QianZhi);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Monster);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Plant);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Npc);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.FuBen);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.FuBenLimit);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Target);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ZiDong);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.TiJiao);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.MissionID] = member;
        }
        return(true);
    }
Exemplo n.º 30
0
    public bool LoadBin(byte[] binContent)
    {
        m_mapElements.Clear();
        m_vecAllElements.Clear();
        int nCol, nRow;
        int readPos = 0;

        readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nCol);
        readPos += GameAssist.ReadInt32Variant(binContent, readPos, out nRow);
        List <string> vecLine     = new List <string>(nCol);
        List <int>    vecHeadType = new List <int>(nCol);
        string        tmpStr;
        int           tmpInt;

        for (int i = 0; i < nCol; i++)
        {
            readPos += GameAssist.ReadString(binContent, readPos, out tmpStr);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out tmpInt);
            vecLine.Add(tmpStr);
            vecHeadType.Add(tmpInt);
        }
        if (vecLine.Count != 7)
        {
            Debug.Log("ShopSuipian.csv中列数量与生成的代码不匹配!");
            return(false);
        }
        if (vecLine[0] != "ID")
        {
            Debug.Log("ShopSuipian.csv中字段[ID]位置不对应"); return(false);
        }
        if (vecLine[1] != "ItemID")
        {
            Debug.Log("ShopSuipian.csv中字段[ItemID]位置不对应"); return(false);
        }
        if (vecLine[2] != "Name")
        {
            Debug.Log("ShopSuipian.csv中字段[Name]位置不对应"); return(false);
        }
        if (vecLine[3] != "Res")
        {
            Debug.Log("ShopSuipian.csv中字段[Res]位置不对应"); return(false);
        }
        if (vecLine[4] != "Money")
        {
            Debug.Log("ShopSuipian.csv中字段[Money]位置不对应"); return(false);
        }
        if (vecLine[5] != "Price")
        {
            Debug.Log("ShopSuipian.csv中字段[Price]位置不对应"); return(false);
        }
        if (vecLine[6] != "Set")
        {
            Debug.Log("ShopSuipian.csv中字段[Set]位置不对应"); return(false);
        }

        for (int i = 0; i < nRow; i++)
        {
            ShopSuipianElement member = new ShopSuipianElement();
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ID);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.ItemID);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Name);
            readPos += GameAssist.ReadString(binContent, readPos, out member.Res);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Money);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Price);
            readPos += GameAssist.ReadInt32Variant(binContent, readPos, out member.Set);

            member.IsValidate = true;
            m_vecAllElements.Add(member);
            m_mapElements[member.ID] = member;
        }
        return(true);
    }