public static void ConvertV2ToV3(int num) { DataConverter.RDungeons.V3.RDungeon rdungeonV3 = new Server.DataConverter.RDungeons.V3.RDungeon(num); DataConverter.RDungeons.V2.RDungeon rdungeonV2 = Server.DataConverter.RDungeons.V2.RDungeonManager.LoadRDungeon(num); rdungeonV3.DungeonName = rdungeonV2.DungeonName; rdungeonV3.Direction = rdungeonV2.Direction; rdungeonV3.MaxFloors = rdungeonV2.MaxFloors; rdungeonV3.Recruitment = rdungeonV2.Recruitment; rdungeonV3.Exp = rdungeonV2.Exp; rdungeonV3.WindTimer = 1000; for (int i = 0; i < rdungeonV2.Floors.Count; i++) { DataConverter.RDungeons.V3.RDungeonFloor floor = new DataConverter.RDungeons.V3.RDungeonFloor(); floor.Options.TrapMin = rdungeonV2.Floors[i].Options.TrapMin; floor.Options.TrapMax = rdungeonV2.Floors[i].Options.TrapMax; floor.Options.ItemMin = 5; floor.Options.ItemMax = 8; floor.Options.RoomWidthMin = rdungeonV2.Floors[i].Options.RoomWidthMin; floor.Options.RoomWidthMax = rdungeonV2.Floors[i].Options.RoomWidthMax; floor.Options.RoomLengthMin = rdungeonV2.Floors[i].Options.RoomLengthMin; floor.Options.RoomLengthMax = rdungeonV2.Floors[i].Options.RoomLengthMax; floor.Options.HallTurnMin = rdungeonV2.Floors[i].Options.HallTurnMin; floor.Options.HallTurnMax = rdungeonV2.Floors[i].Options.HallTurnMax; floor.Options.HallVarMin = rdungeonV2.Floors[i].Options.HallVarMin; floor.Options.HallVarMax = rdungeonV2.Floors[i].Options.HallVarMax; floor.Options.WaterFrequency = rdungeonV2.Floors[i].Options.WaterFrequency; floor.Options.Craters = rdungeonV2.Floors[i].Options.Craters; floor.Options.CraterMinLength = rdungeonV2.Floors[i].Options.CraterMinLength; floor.Options.CraterMaxLength = rdungeonV2.Floors[i].Options.CraterMaxLength; floor.Options.CraterFuzzy = rdungeonV2.Floors[i].Options.CraterFuzzy; floor.Darkness = -1; floor.GoalType = rdungeonV2.Floors[i].GoalType; floor.GoalMap = rdungeonV2.Floors[i].GoalMap; floor.GoalX = rdungeonV2.Floors[i].GoalX; floor.GoalY = rdungeonV2.Floors[i].GoalY; floor.Music = rdungeonV2.Floors[i].Music; floor.StairsX = rdungeonV2.Floors[i].StairsX; floor.StairsSheet = rdungeonV2.Floors[i].StairsSheet; floor.mGroundX = rdungeonV2.Floors[i].mGroundX; floor.mGroundSheet = rdungeonV2.Floors[i].mGroundSheet; floor.mTopLeftX = rdungeonV2.Floors[i].mTopLeftX; floor.mTopLeftSheet = rdungeonV2.Floors[i].mTopLeftSheet; floor.mTopCenterX = rdungeonV2.Floors[i].mTopCenterX; floor.mTopCenterSheet = rdungeonV2.Floors[i].mTopCenterSheet; floor.mTopRightX = rdungeonV2.Floors[i].mTopRightX; floor.mTopRightSheet = rdungeonV2.Floors[i].mTopRightSheet; floor.mCenterLeftX = rdungeonV2.Floors[i].mCenterLeftX; floor.mCenterLeftSheet = rdungeonV2.Floors[i].mCenterLeftSheet; floor.mCenterCenterX = rdungeonV2.Floors[i].mCenterCenterX; floor.mCenterCenterSheet = rdungeonV2.Floors[i].mCenterCenterSheet; floor.mCenterRightX = rdungeonV2.Floors[i].mCenterRightX; floor.mCenterRightSheet = rdungeonV2.Floors[i].mCenterRightSheet; floor.mBottomLeftX = rdungeonV2.Floors[i].mBottomLeftX; floor.mBottomLeftSheet = rdungeonV2.Floors[i].mBottomLeftSheet; floor.mBottomCenterX = rdungeonV2.Floors[i].mBottomCenterX; floor.mBottomCenterSheet = rdungeonV2.Floors[i].mBottomCenterSheet; floor.mBottomRightX = rdungeonV2.Floors[i].mBottomRightX; floor.mBottomRightSheet = rdungeonV2.Floors[i].mBottomRightSheet; floor.mInnerTopLeftX = rdungeonV2.Floors[i].mInnerTopLeftX; floor.mInnerTopLeftSheet = rdungeonV2.Floors[i].mInnerTopLeftSheet; floor.mInnerBottomLeftX = rdungeonV2.Floors[i].mInnerBottomLeftX; floor.mInnerBottomLeftSheet = rdungeonV2.Floors[i].mInnerBottomLeftSheet; floor.mInnerTopRightX = rdungeonV2.Floors[i].mInnerTopRightX; floor.mInnerTopRightSheet = rdungeonV2.Floors[i].mInnerTopRightSheet; floor.mInnerBottomRightX = rdungeonV2.Floors[i].mInnerBottomRightX; floor.mInnerBottomRightSheet = rdungeonV2.Floors[i].mInnerBottomRightSheet; floor.mIsolatedWallX = rdungeonV2.Floors[i].mIsolatedWallX; floor.mIsolatedWallSheet = rdungeonV2.Floors[i].mIsolatedWallSheet; floor.mColumnTopX = rdungeonV2.Floors[i].mColumnTopX; floor.mColumnTopSheet = rdungeonV2.Floors[i].mColumnTopSheet; floor.mColumnCenterX = rdungeonV2.Floors[i].mColumnCenterX; floor.mColumnCenterSheet = rdungeonV2.Floors[i].mColumnCenterSheet; floor.mColumnBottomX = rdungeonV2.Floors[i].mColumnBottomX; floor.mColumnBottomSheet = rdungeonV2.Floors[i].mColumnBottomSheet; floor.mRowLeftX = rdungeonV2.Floors[i].mRowLeftX; floor.mRowLeftSheet = rdungeonV2.Floors[i].mRowLeftSheet; floor.mRowCenterX = rdungeonV2.Floors[i].mRowCenterX; floor.mRowCenterSheet = rdungeonV2.Floors[i].mRowCenterSheet; floor.mRowRightX = rdungeonV2.Floors[i].mRowRightX; floor.mRowRightSheet = rdungeonV2.Floors[i].mRowRightSheet; floor.mWaterX = rdungeonV2.Floors[i].mWaterX; floor.mWaterSheet = rdungeonV2.Floors[i].mWaterSheet; floor.mWaterAnimX = rdungeonV2.Floors[i].mWaterAnimX; floor.mWaterAnimSheet = rdungeonV2.Floors[i].mWaterAnimSheet; floor.mShoreTopLeftX = rdungeonV2.Floors[i].mShoreTopLeftX; floor.mShoreTopLeftSheet = rdungeonV2.Floors[i].mShoreTopLeftSheet; floor.mShoreTopRightX = rdungeonV2.Floors[i].mShoreTopRightX; floor.mShoreTopRightSheet = rdungeonV2.Floors[i].mShoreTopRightSheet; floor.mShoreBottomRightX = rdungeonV2.Floors[i].mShoreBottomRightX; floor.mShoreBottomRightSheet = rdungeonV2.Floors[i].mShoreBottomRightSheet; floor.mShoreBottomLeftX = rdungeonV2.Floors[i].mShoreBottomLeftX; floor.mShoreBottomLeftSheet = rdungeonV2.Floors[i].mShoreBottomLeftSheet; floor.mShoreDiagonalForwardX = rdungeonV2.Floors[i].mShoreDiagonalForwardX; floor.mShoreDiagonalForwardSheet = rdungeonV2.Floors[i].mShoreDiagonalForwardSheet; floor.mShoreDiagonalBackX = rdungeonV2.Floors[i].mShoreDiagonalBackX; floor.mShoreDiagonalBackSheet = rdungeonV2.Floors[i].mShoreDiagonalBackSheet; floor.mShoreTopX = rdungeonV2.Floors[i].mShoreTopX; floor.mShoreTopSheet = rdungeonV2.Floors[i].mShoreTopSheet; floor.mShoreRightX = rdungeonV2.Floors[i].mShoreRightX; floor.mShoreRightSheet = rdungeonV2.Floors[i].mShoreRightSheet; floor.mShoreBottomX = rdungeonV2.Floors[i].mShoreBottomX; floor.mShoreBottomSheet = rdungeonV2.Floors[i].mShoreBottomSheet; floor.mShoreLeftX = rdungeonV2.Floors[i].mShoreLeftX; floor.mShoreLeftSheet = rdungeonV2.Floors[i].mShoreLeftSheet; floor.mShoreVerticalX = rdungeonV2.Floors[i].mShoreVerticalX; floor.mShoreVerticalSheet = rdungeonV2.Floors[i].mShoreVerticalSheet; floor.mShoreHorizontalX = rdungeonV2.Floors[i].mShoreHorizontalX; floor.mShoreHorizontalSheet = rdungeonV2.Floors[i].mShoreHorizontalSheet; floor.mShoreInnerTopLeftX = rdungeonV2.Floors[i].mShoreInnerTopLeftX; floor.mShoreInnerTopLeftSheet = rdungeonV2.Floors[i].mShoreInnerTopLeftSheet; floor.mShoreInnerTopRightX = rdungeonV2.Floors[i].mShoreInnerTopRightX; floor.mShoreInnerTopRightSheet = rdungeonV2.Floors[i].mShoreInnerTopRightSheet; floor.mShoreInnerBottomRightX = rdungeonV2.Floors[i].mShoreInnerBottomRightX; floor.mShoreInnerBottomRightSheet = rdungeonV2.Floors[i].mShoreInnerBottomRightSheet; floor.mShoreInnerBottomLeftX = rdungeonV2.Floors[i].mShoreInnerBottomLeftX; floor.mShoreInnerBottomLeftSheet = rdungeonV2.Floors[i].mShoreInnerBottomLeftSheet; floor.mShoreInnerTopX = rdungeonV2.Floors[i].mShoreInnerTopX; floor.mShoreInnerTopSheet = rdungeonV2.Floors[i].mShoreInnerTopSheet; floor.mShoreInnerRightX = rdungeonV2.Floors[i].mShoreInnerRightX; floor.mShoreInnerRightSheet = rdungeonV2.Floors[i].mShoreInnerRightSheet; floor.mShoreInnerBottomX = rdungeonV2.Floors[i].mShoreInnerBottomX; floor.mShoreInnerBottomSheet = rdungeonV2.Floors[i].mShoreInnerBottomSheet; floor.mShoreInnerLeftX = rdungeonV2.Floors[i].mShoreInnerLeftX; floor.mShoreInnerLeftSheet = rdungeonV2.Floors[i].mShoreInnerLeftSheet; floor.mShoreSurroundedX = rdungeonV2.Floors[i].mShoreSurroundedX; floor.mShoreSurroundedSheet = rdungeonV2.Floors[i].mShoreSurroundedSheet; floor.GroundTile.Type = Enums.TileType.Walkable; floor.HallTile.Type = Enums.TileType.Hallway; floor.WaterTile.Type = Enums.TileType.MobileBlock; floor.WaterTile.Data1 = 2; floor.WallTile.Type = Enums.TileType.MobileBlock; floor.WallTile.Data1 = 16; floor.NpcSpawnTime = 10; floor.NpcMin = 5; floor.NpcMax = 8; RDungeonItem item; RDungeonNpc npc; Tile specialTile; for (int j = 0; j < 16; j++) { if (rdungeonV2.Floors[i].Items[j] > 0) { item = new RDungeonItem(); item.ItemNum = rdungeonV2.Floors[i].Items[j]; item.MaxAmount = rdungeonV2.Floors[i].ItemSpawnRate; item.OnGround = true; item.AppearanceRate = 100; floor.Items.Add(item); } } for (int j = 0; j < 15; j++) { if (rdungeonV2.Floors[i].Npc[j].NpcNum > 0) { npc = new RDungeonNpc(); npc.NpcNum = rdungeonV2.Floors[i].Npc[j].NpcNum; npc.MinLevel = rdungeonV2.Floors[i].Npc[j].MinLevel; npc.MaxLevel = rdungeonV2.Floors[i].Npc[j].MinLevel; npc.AppearanceRate = 100; floor.Npcs.Add(npc); } } foreach (int j in rdungeonV2.Floors[i].Traps) { specialTile = new Tile(new DataManager.Maps.Tile()); specialTile.Type = Enums.TileType.Scripted; specialTile.Ground = rdungeonV2.Floors[i].mGroundX; specialTile.GroundSet = rdungeonV2.Floors[i].mGroundSheet; specialTile.Data1 = TrapNumToScript(j); floor.SpecialTiles.Add(specialTile); } foreach (Enums.Weather j in rdungeonV2.Floors[i].Weather) { floor.Weather.Add(j); } rdungeonV3.Floors.Add(floor); } Server.DataConverter.RDungeons.V3.RDungeonManager.SaveRDungeon(rdungeonV3, num); }
public static void ConvertV2ToV3(int num) { DataConverter.RDungeons.V3.RDungeon rdungeonV3 = new Server.DataConverter.RDungeons.V3.RDungeon(num); DataConverter.RDungeons.V2.RDungeon rdungeonV2 = Server.DataConverter.RDungeons.V2.RDungeonManager.LoadRDungeon(num); rdungeonV3.DungeonName = rdungeonV2.DungeonName; rdungeonV3.Direction = rdungeonV2.Direction; rdungeonV3.MaxFloors = rdungeonV2.MaxFloors; rdungeonV3.Recruitment = rdungeonV2.Recruitment; rdungeonV3.Exp = rdungeonV2.Exp; rdungeonV3.WindTimer = 1000; for (int i = 0; i < rdungeonV2.Floors.Count; i++) { DataConverter.RDungeons.V3.RDungeonFloor floor = new DataConverter.RDungeons.V3.RDungeonFloor(); floor.Options.TrapMin = rdungeonV2.Floors[i].Options.TrapMin; floor.Options.TrapMax = rdungeonV2.Floors[i].Options.TrapMax; floor.Options.ItemMin = 5; floor.Options.ItemMax = 8; floor.Options.RoomWidthMin = rdungeonV2.Floors[i].Options.RoomWidthMin; floor.Options.RoomWidthMax = rdungeonV2.Floors[i].Options.RoomWidthMax; floor.Options.RoomLengthMin = rdungeonV2.Floors[i].Options.RoomLengthMin; floor.Options.RoomLengthMax = rdungeonV2.Floors[i].Options.RoomLengthMax; floor.Options.HallTurnMin = rdungeonV2.Floors[i].Options.HallTurnMin; floor.Options.HallTurnMax = rdungeonV2.Floors[i].Options.HallTurnMax; floor.Options.HallVarMin = rdungeonV2.Floors[i].Options.HallVarMin; floor.Options.HallVarMax = rdungeonV2.Floors[i].Options.HallVarMax; floor.Options.WaterFrequency = rdungeonV2.Floors[i].Options.WaterFrequency; floor.Options.Craters = rdungeonV2.Floors[i].Options.Craters; floor.Options.CraterMinLength = rdungeonV2.Floors[i].Options.CraterMinLength; floor.Options.CraterMaxLength = rdungeonV2.Floors[i].Options.CraterMaxLength; floor.Options.CraterFuzzy = rdungeonV2.Floors[i].Options.CraterFuzzy; floor.Darkness = -1; floor.GoalType = rdungeonV2.Floors[i].GoalType; floor.GoalMap = rdungeonV2.Floors[i].GoalMap; floor.GoalX = rdungeonV2.Floors[i].GoalX; floor.GoalY = rdungeonV2.Floors[i].GoalY; floor.Music = rdungeonV2.Floors[i].Music; floor.StairsX = rdungeonV2.Floors[i].StairsX; floor.StairsSheet = rdungeonV2.Floors[i].StairsSheet; floor.mGroundX = rdungeonV2.Floors[i].mGroundX; floor.mGroundSheet = rdungeonV2.Floors[i].mGroundSheet; floor.mTopLeftX = rdungeonV2.Floors[i].mTopLeftX; floor.mTopLeftSheet = rdungeonV2.Floors[i].mTopLeftSheet; floor.mTopCenterX = rdungeonV2.Floors[i].mTopCenterX; floor.mTopCenterSheet = rdungeonV2.Floors[i].mTopCenterSheet; floor.mTopRightX = rdungeonV2.Floors[i].mTopRightX; floor.mTopRightSheet = rdungeonV2.Floors[i].mTopRightSheet; floor.mCenterLeftX = rdungeonV2.Floors[i].mCenterLeftX; floor.mCenterLeftSheet = rdungeonV2.Floors[i].mCenterLeftSheet; floor.mCenterCenterX = rdungeonV2.Floors[i].mCenterCenterX; floor.mCenterCenterSheet = rdungeonV2.Floors[i].mCenterCenterSheet; floor.mCenterRightX = rdungeonV2.Floors[i].mCenterRightX; floor.mCenterRightSheet = rdungeonV2.Floors[i].mCenterRightSheet; floor.mBottomLeftX = rdungeonV2.Floors[i].mBottomLeftX; floor.mBottomLeftSheet = rdungeonV2.Floors[i].mBottomLeftSheet; floor.mBottomCenterX = rdungeonV2.Floors[i].mBottomCenterX; floor.mBottomCenterSheet = rdungeonV2.Floors[i].mBottomCenterSheet; floor.mBottomRightX = rdungeonV2.Floors[i].mBottomRightX; floor.mBottomRightSheet = rdungeonV2.Floors[i].mBottomRightSheet; floor.mInnerTopLeftX = rdungeonV2.Floors[i].mInnerTopLeftX; floor.mInnerTopLeftSheet = rdungeonV2.Floors[i].mInnerTopLeftSheet; floor.mInnerBottomLeftX = rdungeonV2.Floors[i].mInnerBottomLeftX; floor.mInnerBottomLeftSheet = rdungeonV2.Floors[i].mInnerBottomLeftSheet; floor.mInnerTopRightX = rdungeonV2.Floors[i].mInnerTopRightX; floor.mInnerTopRightSheet = rdungeonV2.Floors[i].mInnerTopRightSheet; floor.mInnerBottomRightX = rdungeonV2.Floors[i].mInnerBottomRightX; floor.mInnerBottomRightSheet = rdungeonV2.Floors[i].mInnerBottomRightSheet; floor.mIsolatedWallX = rdungeonV2.Floors[i].mIsolatedWallX; floor.mIsolatedWallSheet = rdungeonV2.Floors[i].mIsolatedWallSheet; floor.mColumnTopX = rdungeonV2.Floors[i].mColumnTopX; floor.mColumnTopSheet = rdungeonV2.Floors[i].mColumnTopSheet; floor.mColumnCenterX = rdungeonV2.Floors[i].mColumnCenterX; floor.mColumnCenterSheet = rdungeonV2.Floors[i].mColumnCenterSheet; floor.mColumnBottomX = rdungeonV2.Floors[i].mColumnBottomX; floor.mColumnBottomSheet = rdungeonV2.Floors[i].mColumnBottomSheet; floor.mRowLeftX = rdungeonV2.Floors[i].mRowLeftX; floor.mRowLeftSheet = rdungeonV2.Floors[i].mRowLeftSheet; floor.mRowCenterX = rdungeonV2.Floors[i].mRowCenterX; floor.mRowCenterSheet = rdungeonV2.Floors[i].mRowCenterSheet; floor.mRowRightX = rdungeonV2.Floors[i].mRowRightX; floor.mRowRightSheet = rdungeonV2.Floors[i].mRowRightSheet; floor.mWaterX = rdungeonV2.Floors[i].mWaterX; floor.mWaterSheet = rdungeonV2.Floors[i].mWaterSheet; floor.mWaterAnimX = rdungeonV2.Floors[i].mWaterAnimX; floor.mWaterAnimSheet = rdungeonV2.Floors[i].mWaterAnimSheet; floor.mShoreTopLeftX = rdungeonV2.Floors[i].mShoreTopLeftX; floor.mShoreTopLeftSheet = rdungeonV2.Floors[i].mShoreTopLeftSheet; floor.mShoreTopRightX = rdungeonV2.Floors[i].mShoreTopRightX; floor.mShoreTopRightSheet = rdungeonV2.Floors[i].mShoreTopRightSheet; floor.mShoreBottomRightX = rdungeonV2.Floors[i].mShoreBottomRightX; floor.mShoreBottomRightSheet = rdungeonV2.Floors[i].mShoreBottomRightSheet; floor.mShoreBottomLeftX = rdungeonV2.Floors[i].mShoreBottomLeftX; floor.mShoreBottomLeftSheet = rdungeonV2.Floors[i].mShoreBottomLeftSheet; floor.mShoreDiagonalForwardX = rdungeonV2.Floors[i].mShoreDiagonalForwardX; floor.mShoreDiagonalForwardSheet = rdungeonV2.Floors[i].mShoreDiagonalForwardSheet; floor.mShoreDiagonalBackX = rdungeonV2.Floors[i].mShoreDiagonalBackX; floor.mShoreDiagonalBackSheet = rdungeonV2.Floors[i].mShoreDiagonalBackSheet; floor.mShoreTopX = rdungeonV2.Floors[i].mShoreTopX; floor.mShoreTopSheet = rdungeonV2.Floors[i].mShoreTopSheet; floor.mShoreRightX = rdungeonV2.Floors[i].mShoreRightX; floor.mShoreRightSheet = rdungeonV2.Floors[i].mShoreRightSheet; floor.mShoreBottomX = rdungeonV2.Floors[i].mShoreBottomX; floor.mShoreBottomSheet = rdungeonV2.Floors[i].mShoreBottomSheet; floor.mShoreLeftX = rdungeonV2.Floors[i].mShoreLeftX; floor.mShoreLeftSheet = rdungeonV2.Floors[i].mShoreLeftSheet; floor.mShoreVerticalX = rdungeonV2.Floors[i].mShoreVerticalX; floor.mShoreVerticalSheet = rdungeonV2.Floors[i].mShoreVerticalSheet; floor.mShoreHorizontalX = rdungeonV2.Floors[i].mShoreHorizontalX; floor.mShoreHorizontalSheet = rdungeonV2.Floors[i].mShoreHorizontalSheet; floor.mShoreInnerTopLeftX = rdungeonV2.Floors[i].mShoreInnerTopLeftX; floor.mShoreInnerTopLeftSheet = rdungeonV2.Floors[i].mShoreInnerTopLeftSheet; floor.mShoreInnerTopRightX = rdungeonV2.Floors[i].mShoreInnerTopRightX; floor.mShoreInnerTopRightSheet = rdungeonV2.Floors[i].mShoreInnerTopRightSheet; floor.mShoreInnerBottomRightX = rdungeonV2.Floors[i].mShoreInnerBottomRightX; floor.mShoreInnerBottomRightSheet = rdungeonV2.Floors[i].mShoreInnerBottomRightSheet; floor.mShoreInnerBottomLeftX = rdungeonV2.Floors[i].mShoreInnerBottomLeftX; floor.mShoreInnerBottomLeftSheet = rdungeonV2.Floors[i].mShoreInnerBottomLeftSheet; floor.mShoreInnerTopX = rdungeonV2.Floors[i].mShoreInnerTopX; floor.mShoreInnerTopSheet = rdungeonV2.Floors[i].mShoreInnerTopSheet; floor.mShoreInnerRightX = rdungeonV2.Floors[i].mShoreInnerRightX; floor.mShoreInnerRightSheet = rdungeonV2.Floors[i].mShoreInnerRightSheet; floor.mShoreInnerBottomX = rdungeonV2.Floors[i].mShoreInnerBottomX; floor.mShoreInnerBottomSheet = rdungeonV2.Floors[i].mShoreInnerBottomSheet; floor.mShoreInnerLeftX = rdungeonV2.Floors[i].mShoreInnerLeftX; floor.mShoreInnerLeftSheet = rdungeonV2.Floors[i].mShoreInnerLeftSheet; floor.mShoreSurroundedX = rdungeonV2.Floors[i].mShoreSurroundedX; floor.mShoreSurroundedSheet = rdungeonV2.Floors[i].mShoreSurroundedSheet; floor.GroundTile.Type = Enums.TileType.Walkable; floor.HallTile.Type = Enums.TileType.Hallway; floor.WaterTile.Type = Enums.TileType.MobileBlock; floor.WaterTile.Data1 = 2; floor.WallTile.Type = Enums.TileType.MobileBlock; floor.WallTile.Data1 = 16; floor.NpcSpawnTime = 10; floor.NpcMin = 5; floor.NpcMax = 8; RDungeonItem item; RDungeonNpc npc; Tile specialTile; for (int j = 0; j < 16; j++) { if (rdungeonV2.Floors[i].Items[j] > 0) { item = new RDungeonItem(); item.ItemNum = rdungeonV2.Floors[i].Items[j]; item.MaxAmount = rdungeonV2.Floors[i].ItemSpawnRate; item.OnGround = true; item.AppearanceRate = 100; floor.Items.Add(item); } } for (int j = 0; j < 15; j++) { if (rdungeonV2.Floors[i].Npc[j].NpcNum > 0) { npc = new RDungeonNpc(); npc.NpcNum = rdungeonV2.Floors[i].Npc[j].NpcNum; npc.MinLevel = rdungeonV2.Floors[i].Npc[j].MinLevel; npc.MaxLevel = rdungeonV2.Floors[i].Npc[j].MinLevel; npc.AppearanceRate = 100; floor.Npcs.Add(npc); } } foreach (int j in rdungeonV2.Floors[i].Traps) { specialTile = new Tile(new DataManager.Maps.Tile()); specialTile.Type = Enums.TileType.Scripted; specialTile.Ground = rdungeonV2.Floors[i].mGroundX; specialTile.GroundSet = rdungeonV2.Floors[i].mGroundSheet; specialTile.Data1 = TrapNumToScript(j); floor.SpecialTiles.Add(specialTile); } foreach (Enums.Weather j in rdungeonV2.Floors[i].Weather) { floor.Weather.Add(j); } rdungeonV3.Floors.Add(floor); } Server.DataConverter.RDungeons.V3.RDungeonManager.SaveRDungeon(rdungeonV3,num); }