Exemple #1
0
    public void Load()
    {
        CVSReader reader = new CVSReader();

        reader.LoadText("Data/Config/Map_map.txt", 1);
        int rows = reader.GetRowCount();

        for (int r = 0; r < rows; ++r)
        {
            string[]     row = reader.GetRow(r);
            MapMapConfig ac  = ConfigProcess(row) as MapMapConfig;
            configs.Add(ac.mapId, ac);
        }
    }
Exemple #2
0
    public object ConfigProcess(string[] row)
    {
        if (row.Length < 16)
        {
            return(null);
        }
        RowHelper    rh  = new RowHelper(row);
        MapMapConfig rec = new MapMapConfig();

        rec.mapId = Utility.ToInt(rh.Read());          //地图id

        rec.mapWide = Utility.ToInt(rh.Read());        //地图宽度

        rec.mapHeight = Utility.ToInt(rh.Read());      //地图高度

        rec.mapType = Utility.ToInt(rh.Read());        //地图类型

        rec.mapSubType = Utility.ToInt(rh.Read());     //地图子类型

        rec.openLv = Utility.ToInt(rh.Read());         //地图进入等级

        rec.openVip = Utility.ToInt(rh.Read());        //地图进入需VIP等级

        rec.openRace = Utility.ToInt(rh.Read());       //地图进入种族限制

        rec.mapPk = Utility.ToInt(rh.Read());          //PK规则

        rec.deadPunish = Utility.ToInt(rh.Read());     //是否有死亡掉落装备物品

        rec.useShoes = Utility.ToInt(rh.Read());       //是否可使用飞鞋传送

        rec.canSupply = Utility.ToInt(rh.Read());      //是否可喝药

        rec.isDirectRevive = Utility.ToInt(rh.Read()); //是否允许原地复活

        rec.mapResources = rh.Read();                  //地图资源

        rec.resMonster = Utility.ToInt(rh.Read());     //怪物资源层

        rec.monsterRoad = rh.Read();                   //怪物寻路点层


        return(rec);
    }