private void Split(BuildingManager.Building building)
    {
        while (building.HasBuildingBlocks())
        {
            BuildingBlock          buildingBlock = building.buildingBlocks.get_Item(0);
            uint                   newID         = BuildingManager.server.NewBuildingID();
            Action <BuildingBlock> action        = (Action <BuildingBlock>)(b => b.AttachToBuilding(newID));
            buildingBlock.EntityLinkBroadcast <BuildingBlock>(action);
        }
        while (building.HasBuildingPrivileges())
        {
            BuildingPrivlidge buildingPrivlidge   = building.buildingPrivileges.get_Item(0);
            BuildingBlock     nearbyBuildingBlock = buildingPrivlidge.GetNearbyBuildingBlock();
            buildingPrivlidge.AttachToBuilding(Object.op_Implicit((Object)nearbyBuildingBlock) ? nearbyBuildingBlock.buildingID : 0U);
        }
        while (building.HasDecayEntities())
        {
            DecayEntity   decayEntity         = building.decayEntities.get_Item(0);
            BuildingBlock nearbyBuildingBlock = decayEntity.GetNearbyBuildingBlock();
            decayEntity.AttachToBuilding(Object.op_Implicit((Object)nearbyBuildingBlock) ? nearbyBuildingBlock.buildingID : 0U);
        }
        if (!ConVar.AI.nav_carve_use_building_optimization)
        {
            return;
        }
        building.isNavMeshCarvingDirty = true;
        int ticks = 2;

        this.UpdateNavMeshCarver(building, ref ticks, 0);
    }
    private void Split(BuildingManager.Building building)
    {
        uint num;
        uint num1;

        while (building.HasBuildingBlocks())
        {
            BuildingBlock item = building.buildingBlocks[0];
            uint          num2 = BuildingManager.server.NewBuildingID();
            item.EntityLinkBroadcast <BuildingBlock>((BuildingBlock b) => b.AttachToBuilding(num2));
        }
        while (building.HasBuildingPrivileges())
        {
            BuildingPrivlidge buildingPrivlidge   = building.buildingPrivileges[0];
            BuildingBlock     nearbyBuildingBlock = buildingPrivlidge.GetNearbyBuildingBlock();
            if (nearbyBuildingBlock)
            {
                num = nearbyBuildingBlock.buildingID;
            }
            else
            {
                num = 0;
            }
            buildingPrivlidge.AttachToBuilding(num);
        }
        while (building.HasDecayEntities())
        {
            DecayEntity   decayEntity   = building.decayEntities[0];
            BuildingBlock buildingBlock = decayEntity.GetNearbyBuildingBlock();
            if (buildingBlock)
            {
                num1 = buildingBlock.buildingID;
            }
            else
            {
                num1 = 0;
            }
            decayEntity.AttachToBuilding(num1);
        }
        if (AI.nav_carve_use_building_optimization)
        {
            building.isNavMeshCarvingDirty = true;
            int num3 = 2;
            this.UpdateNavMeshCarver(building, ref num3, 0);
        }
    }