void btnAddChamber_Click(object sender, SdlDotNet.Widgets.MouseButtonEventArgs e) { EditableRDungeonChamber chamber = new EditableRDungeonChamber(); chamber.ChamberNum = nudChamber.Value; chamber.String1 = txtChamberString1.Text; chamber.String2 = txtChamberString2.Text; chamber.String3 = txtChamberString3.Text; chamberList.Add(chamber); lbxChambers.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "#" + chamber.ChamberNum + "/" + chamber.String1 + "/" + chamber.String2 + "/" + chamber.String3)); }
void btnSaveFloor_Click(object sender, SdlDotNet.Widgets.MouseButtonEventArgs e) { for (int i = rdungeon.Floors.Count; i < nudMaxFloors.Value; i++) { rdungeon.Floors.Add(new EditableRDungeonFloor()); } if (nudFirstFloor.Value > nudMaxFloors.Value || nudLastFloor.Value > nudMaxFloors.Value) { lblSaveLoadMessage.Text = "Cannot save floor(s) above the maximum."; return; } if (pnlRDungeonFloorSettingSelection.Visible == true) { LoadpnlRDungeonStructure(); LoadpnlRDungeonLandTiles(); LoadpnlRDungeonLandAltTiles(); LoadpnlRDungeonWaterTiles(); LoadpnlRDungeonWaterAnimTiles(); LoadpnlRDungeonAttributes(); LoadpnlRDungeonItems(); LoadpnlRDungeonNpcs(); LoadpnlRDungeonTraps(); LoadpnlRDungeonWeather(); LoadpnlRDungeonGoal(); LoadpnlRDungeonChambers(); LoadpnlRDungeonMisc(); //Structure for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) { rdungeon.Floors[floor].TrapMin = nudTrapMin.Value; rdungeon.Floors[floor].TrapMax = nudTrapMax.Value; rdungeon.Floors[floor].ItemMin = nudItemMin.Value; rdungeon.Floors[floor].ItemMax = nudItemMax.Value; rdungeon.Floors[floor].RoomWidthMin = nudRoomWidthMin.Value; rdungeon.Floors[floor].RoomWidthMax = nudRoomWidthMax.Value; rdungeon.Floors[floor].RoomLengthMin = nudRoomLengthMin.Value; rdungeon.Floors[floor].RoomLengthMax = nudRoomLengthMax.Value; rdungeon.Floors[floor].HallTurnMin = nudHallTurnMin.Value; rdungeon.Floors[floor].HallTurnMax = nudHallTurnMax.Value; rdungeon.Floors[floor].HallVarMin = nudHallVarMin.Value; rdungeon.Floors[floor].HallVarMax = nudHallVarMax.Value; rdungeon.Floors[floor].WaterFrequency = nudWaterFrequency.Value; rdungeon.Floors[floor].Craters = nudCraters.Value; rdungeon.Floors[floor].CraterMinLength = nudCraterMinLength.Value; rdungeon.Floors[floor].CraterMaxLength = nudCraterMaxLength.Value; rdungeon.Floors[floor].CraterFuzzy = chkCraterFuzzy.Checked; //Land Tiles rdungeon.Floors[floor].StairsSheet = landTileNumbers[0, 19]; rdungeon.Floors[floor].mGroundSheet = landTileNumbers[0, 16]; rdungeon.Floors[floor].mTopLeftSheet = landTileNumbers[0, 10]; rdungeon.Floors[floor].mTopCenterSheet = landTileNumbers[0, 6]; rdungeon.Floors[floor].mTopRightSheet = landTileNumbers[0, 2]; rdungeon.Floors[floor].mCenterLeftSheet = landTileNumbers[0, 9]; rdungeon.Floors[floor].mCenterCenterSheet = landTileNumbers[0, 5]; rdungeon.Floors[floor].mCenterRightSheet = landTileNumbers[0, 1]; rdungeon.Floors[floor].mBottomLeftSheet = landTileNumbers[0, 8]; rdungeon.Floors[floor].mBottomCenterSheet = landTileNumbers[0, 4]; rdungeon.Floors[floor].mBottomRightSheet = landTileNumbers[0, 0]; rdungeon.Floors[floor].mInnerTopLeftSheet = landTileNumbers[0, 17]; rdungeon.Floors[floor].mInnerTopRightSheet = landTileNumbers[0, 20]; rdungeon.Floors[floor].mInnerBottomLeftSheet = landTileNumbers[0, 18]; rdungeon.Floors[floor].mInnerBottomRightSheet = landTileNumbers[0, 21]; rdungeon.Floors[floor].mIsolatedWallSheet = landTileNumbers[0, 15]; rdungeon.Floors[floor].mColumnTopSheet = landTileNumbers[0, 12]; rdungeon.Floors[floor].mColumnCenterSheet = landTileNumbers[0, 13]; rdungeon.Floors[floor].mColumnBottomSheet = landTileNumbers[0, 14]; rdungeon.Floors[floor].mRowLeftSheet = landTileNumbers[0, 3]; rdungeon.Floors[floor].mRowCenterSheet = landTileNumbers[0, 7]; rdungeon.Floors[floor].mRowRightSheet = landTileNumbers[0, 11]; rdungeon.Floors[floor].StairsX = landTileNumbers[1, 19]; rdungeon.Floors[floor].mGroundX = landTileNumbers[1, 16]; rdungeon.Floors[floor].mTopLeftX = landTileNumbers[1, 10]; rdungeon.Floors[floor].mTopCenterX = landTileNumbers[1, 6]; rdungeon.Floors[floor].mTopRightX = landTileNumbers[1, 2]; rdungeon.Floors[floor].mCenterLeftX = landTileNumbers[1, 9]; rdungeon.Floors[floor].mCenterCenterX = landTileNumbers[1, 5]; rdungeon.Floors[floor].mCenterRightX = landTileNumbers[1, 1]; rdungeon.Floors[floor].mBottomLeftX = landTileNumbers[1, 8]; rdungeon.Floors[floor].mBottomCenterX = landTileNumbers[1, 4]; rdungeon.Floors[floor].mBottomRightX = landTileNumbers[1, 0]; rdungeon.Floors[floor].mInnerTopLeftX = landTileNumbers[1, 17]; rdungeon.Floors[floor].mInnerTopRightX = landTileNumbers[1, 20]; rdungeon.Floors[floor].mInnerBottomLeftX = landTileNumbers[1, 18]; rdungeon.Floors[floor].mInnerBottomRightX = landTileNumbers[1, 21]; rdungeon.Floors[floor].mIsolatedWallX = landTileNumbers[1, 15]; rdungeon.Floors[floor].mColumnTopX = landTileNumbers[1, 12]; rdungeon.Floors[floor].mColumnCenterX = landTileNumbers[1, 13]; rdungeon.Floors[floor].mColumnBottomX = landTileNumbers[1, 14]; rdungeon.Floors[floor].mRowLeftX = landTileNumbers[1, 3]; rdungeon.Floors[floor].mRowCenterX = landTileNumbers[1, 7]; rdungeon.Floors[floor].mRowRightX = landTileNumbers[1, 11]; //Land Alt Tiles rdungeon.Floors[floor].mGroundAlt2Sheet = landAltTileNumbers[0, 19]; rdungeon.Floors[floor].mGroundAltSheet = landAltTileNumbers[0, 16]; rdungeon.Floors[floor].mTopLeftAltSheet = landAltTileNumbers[0, 10]; rdungeon.Floors[floor].mTopCenterAltSheet = landAltTileNumbers[0, 6]; rdungeon.Floors[floor].mTopRightAltSheet = landAltTileNumbers[0, 2]; rdungeon.Floors[floor].mCenterLeftAltSheet = landAltTileNumbers[0, 9]; rdungeon.Floors[floor].mCenterCenterAltSheet = landAltTileNumbers[0, 5]; rdungeon.Floors[floor].mCenterCenterAlt2Sheet = landAltTileNumbers[0, 22]; rdungeon.Floors[floor].mCenterRightAltSheet = landAltTileNumbers[0, 1]; rdungeon.Floors[floor].mBottomLeftAltSheet = landAltTileNumbers[0, 8]; rdungeon.Floors[floor].mBottomCenterAltSheet = landAltTileNumbers[0, 4]; rdungeon.Floors[floor].mBottomRightAltSheet = landAltTileNumbers[0, 0]; rdungeon.Floors[floor].mInnerTopLeftAltSheet = landAltTileNumbers[0, 17]; rdungeon.Floors[floor].mInnerTopRightAltSheet = landAltTileNumbers[0, 20]; rdungeon.Floors[floor].mInnerBottomLeftAltSheet = landAltTileNumbers[0, 18]; rdungeon.Floors[floor].mInnerBottomRightAltSheet = landAltTileNumbers[0, 21]; rdungeon.Floors[floor].mIsolatedWallAltSheet = landAltTileNumbers[0, 15]; rdungeon.Floors[floor].mColumnTopAltSheet = landAltTileNumbers[0, 12]; rdungeon.Floors[floor].mColumnCenterAltSheet = landAltTileNumbers[0, 13]; rdungeon.Floors[floor].mColumnBottomAltSheet = landAltTileNumbers[0, 14]; rdungeon.Floors[floor].mRowLeftAltSheet = landAltTileNumbers[0, 3]; rdungeon.Floors[floor].mRowCenterAltSheet = landAltTileNumbers[0, 7]; rdungeon.Floors[floor].mRowRightAltSheet = landAltTileNumbers[0, 11]; rdungeon.Floors[floor].mGroundAlt2X = landAltTileNumbers[1, 19]; rdungeon.Floors[floor].mGroundAltX = landAltTileNumbers[1, 16]; rdungeon.Floors[floor].mTopLeftAltX = landAltTileNumbers[1, 10]; rdungeon.Floors[floor].mTopCenterAltX = landAltTileNumbers[1, 6]; rdungeon.Floors[floor].mTopRightAltX = landAltTileNumbers[1, 2]; rdungeon.Floors[floor].mCenterLeftAltX = landAltTileNumbers[1, 9]; rdungeon.Floors[floor].mCenterCenterAltX = landAltTileNumbers[1, 5]; rdungeon.Floors[floor].mCenterCenterAlt2X = landAltTileNumbers[1, 22]; rdungeon.Floors[floor].mCenterRightAltX = landAltTileNumbers[1, 1]; rdungeon.Floors[floor].mBottomLeftAltX = landAltTileNumbers[1, 8]; rdungeon.Floors[floor].mBottomCenterAltX = landAltTileNumbers[1, 4]; rdungeon.Floors[floor].mBottomRightAltX = landAltTileNumbers[1, 0]; rdungeon.Floors[floor].mInnerTopLeftAltX = landAltTileNumbers[1, 17]; rdungeon.Floors[floor].mInnerTopRightAltX = landAltTileNumbers[1, 20]; rdungeon.Floors[floor].mInnerBottomLeftAltX = landAltTileNumbers[1, 18]; rdungeon.Floors[floor].mInnerBottomRightAltX = landAltTileNumbers[1, 21]; rdungeon.Floors[floor].mIsolatedWallAltX = landAltTileNumbers[1, 15]; rdungeon.Floors[floor].mColumnTopAltX = landAltTileNumbers[1, 12]; rdungeon.Floors[floor].mColumnCenterAltX = landAltTileNumbers[1, 13]; rdungeon.Floors[floor].mColumnBottomAltX = landAltTileNumbers[1, 14]; rdungeon.Floors[floor].mRowLeftAltX = landAltTileNumbers[1, 3]; rdungeon.Floors[floor].mRowCenterAltX = landAltTileNumbers[1, 7]; rdungeon.Floors[floor].mRowRightAltX = landAltTileNumbers[1, 11]; //Water Tiles rdungeon.Floors[floor].mShoreSurroundedSheet = waterTileNumbers[0, 15]; rdungeon.Floors[floor].mShoreInnerTopLeftSheet = waterTileNumbers[0, 0]; rdungeon.Floors[floor].mShoreTopSheet = waterTileNumbers[0, 4]; rdungeon.Floors[floor].mShoreInnerTopRightSheet = waterTileNumbers[0, 8]; rdungeon.Floors[floor].mShoreLeftSheet = waterTileNumbers[0, 1]; rdungeon.Floors[floor].mWaterSheet = waterTileNumbers[0, 5]; rdungeon.Floors[floor].mShoreRightSheet = waterTileNumbers[0, 9]; rdungeon.Floors[floor].mShoreInnerBottomLeftSheet = waterTileNumbers[0, 2]; rdungeon.Floors[floor].mShoreBottomSheet = waterTileNumbers[0, 6]; rdungeon.Floors[floor].mShoreInnerBottomRightSheet = waterTileNumbers[0, 10]; rdungeon.Floors[floor].mShoreTopLeftSheet = waterTileNumbers[0, 16]; rdungeon.Floors[floor].mShoreTopRightSheet = waterTileNumbers[0, 19]; rdungeon.Floors[floor].mShoreBottomLeftSheet = waterTileNumbers[0, 17]; rdungeon.Floors[floor].mShoreBottomRightSheet = waterTileNumbers[0, 20]; rdungeon.Floors[floor].mShoreDiagonalForwardSheet = waterTileNumbers[0, 18]; rdungeon.Floors[floor].mShoreDiagonalBackSheet = waterTileNumbers[0, 21]; rdungeon.Floors[floor].mShoreInnerTopSheet = waterTileNumbers[0, 12]; rdungeon.Floors[floor].mShoreVerticalSheet = waterTileNumbers[0, 13]; rdungeon.Floors[floor].mShoreInnerBottomSheet = waterTileNumbers[0, 14]; rdungeon.Floors[floor].mShoreInnerLeftSheet = waterTileNumbers[0, 3]; rdungeon.Floors[floor].mShoreHorizontalSheet = waterTileNumbers[0, 7]; rdungeon.Floors[floor].mShoreInnerRightSheet = waterTileNumbers[0, 11]; rdungeon.Floors[floor].mShoreSurroundedX = waterTileNumbers[1, 15]; rdungeon.Floors[floor].mShoreInnerTopLeftX = waterTileNumbers[1, 0]; rdungeon.Floors[floor].mShoreTopX = waterTileNumbers[1, 4]; rdungeon.Floors[floor].mShoreInnerTopRightX = waterTileNumbers[1, 8]; rdungeon.Floors[floor].mShoreLeftX = waterTileNumbers[1, 1]; rdungeon.Floors[floor].mWaterX = waterTileNumbers[1, 5]; rdungeon.Floors[floor].mShoreRightX = waterTileNumbers[1, 9]; rdungeon.Floors[floor].mShoreInnerBottomLeftX = waterTileNumbers[1, 2]; rdungeon.Floors[floor].mShoreBottomX = waterTileNumbers[1, 6]; rdungeon.Floors[floor].mShoreInnerBottomRightX = waterTileNumbers[1, 10]; rdungeon.Floors[floor].mShoreTopLeftX = waterTileNumbers[1, 16]; rdungeon.Floors[floor].mShoreTopRightX = waterTileNumbers[1, 19]; rdungeon.Floors[floor].mShoreBottomLeftX = waterTileNumbers[1, 17]; rdungeon.Floors[floor].mShoreBottomRightX = waterTileNumbers[1, 20]; rdungeon.Floors[floor].mShoreDiagonalForwardX = waterTileNumbers[1, 18]; rdungeon.Floors[floor].mShoreDiagonalBackX = waterTileNumbers[1, 21]; rdungeon.Floors[floor].mShoreInnerTopX = waterTileNumbers[1, 12]; rdungeon.Floors[floor].mShoreVerticalX = waterTileNumbers[1, 13]; rdungeon.Floors[floor].mShoreInnerBottomX = waterTileNumbers[1, 14]; rdungeon.Floors[floor].mShoreInnerLeftX = waterTileNumbers[1, 3]; rdungeon.Floors[floor].mShoreHorizontalX = waterTileNumbers[1, 7]; rdungeon.Floors[floor].mShoreInnerRightX = waterTileNumbers[1, 11]; //Water Anim Tiles rdungeon.Floors[floor].mShoreSurroundedAnimSheet = waterAnimTileNumbers[0, 15]; rdungeon.Floors[floor].mShoreInnerTopLeftAnimSheet = waterAnimTileNumbers[0, 0]; rdungeon.Floors[floor].mShoreTopAnimSheet = waterAnimTileNumbers[0, 4]; rdungeon.Floors[floor].mShoreInnerTopRightAnimSheet = waterAnimTileNumbers[0, 8]; rdungeon.Floors[floor].mShoreLeftAnimSheet = waterAnimTileNumbers[0, 1]; rdungeon.Floors[floor].mWaterAnimSheet = waterAnimTileNumbers[0, 5]; rdungeon.Floors[floor].mShoreRightAnimSheet = waterAnimTileNumbers[0, 9]; rdungeon.Floors[floor].mShoreInnerBottomLeftAnimSheet = waterAnimTileNumbers[0, 2]; rdungeon.Floors[floor].mShoreBottomAnimSheet = waterAnimTileNumbers[0, 6]; rdungeon.Floors[floor].mShoreInnerBottomRightAnimSheet = waterAnimTileNumbers[0, 10]; rdungeon.Floors[floor].mShoreTopLeftAnimSheet = waterAnimTileNumbers[0, 16]; rdungeon.Floors[floor].mShoreTopRightAnimSheet = waterAnimTileNumbers[0, 19]; rdungeon.Floors[floor].mShoreBottomLeftAnimSheet = waterAnimTileNumbers[0, 17]; rdungeon.Floors[floor].mShoreBottomRightAnimSheet = waterAnimTileNumbers[0, 20]; rdungeon.Floors[floor].mShoreDiagonalForwardAnimSheet = waterAnimTileNumbers[0, 18]; rdungeon.Floors[floor].mShoreDiagonalBackAnimSheet = waterAnimTileNumbers[0, 21]; rdungeon.Floors[floor].mShoreInnerTopAnimSheet = waterAnimTileNumbers[0, 12]; rdungeon.Floors[floor].mShoreVerticalAnimSheet = waterAnimTileNumbers[0, 13]; rdungeon.Floors[floor].mShoreInnerBottomAnimSheet = waterAnimTileNumbers[0, 14]; rdungeon.Floors[floor].mShoreInnerLeftAnimSheet = waterAnimTileNumbers[0, 3]; rdungeon.Floors[floor].mShoreHorizontalAnimSheet = waterAnimTileNumbers[0, 7]; rdungeon.Floors[floor].mShoreInnerRightAnimSheet = waterAnimTileNumbers[0, 11]; rdungeon.Floors[floor].mShoreSurroundedAnimX = waterAnimTileNumbers[1, 15]; rdungeon.Floors[floor].mShoreInnerTopLeftAnimX = waterAnimTileNumbers[1, 0]; rdungeon.Floors[floor].mShoreTopAnimX = waterAnimTileNumbers[1, 4]; rdungeon.Floors[floor].mShoreInnerTopRightAnimX = waterAnimTileNumbers[1, 8]; rdungeon.Floors[floor].mShoreLeftAnimX = waterAnimTileNumbers[1, 1]; rdungeon.Floors[floor].mWaterAnimX = waterAnimTileNumbers[1, 5]; rdungeon.Floors[floor].mShoreRightAnimX = waterAnimTileNumbers[1, 9]; rdungeon.Floors[floor].mShoreInnerBottomLeftAnimX = waterAnimTileNumbers[1, 2]; rdungeon.Floors[floor].mShoreBottomAnimX = waterAnimTileNumbers[1, 6]; rdungeon.Floors[floor].mShoreInnerBottomRightAnimX = waterAnimTileNumbers[1, 10]; rdungeon.Floors[floor].mShoreTopLeftAnimX = waterAnimTileNumbers[1, 16]; rdungeon.Floors[floor].mShoreTopRightAnimX = waterAnimTileNumbers[1, 19]; rdungeon.Floors[floor].mShoreBottomLeftAnimX = waterAnimTileNumbers[1, 17]; rdungeon.Floors[floor].mShoreBottomRightAnimX = waterAnimTileNumbers[1, 20]; rdungeon.Floors[floor].mShoreDiagonalForwardAnimX = waterAnimTileNumbers[1, 18]; rdungeon.Floors[floor].mShoreDiagonalBackAnimX = waterAnimTileNumbers[1, 21]; rdungeon.Floors[floor].mShoreInnerTopAnimX = waterAnimTileNumbers[1, 12]; rdungeon.Floors[floor].mShoreVerticalAnimX = waterAnimTileNumbers[1, 13]; rdungeon.Floors[floor].mShoreInnerBottomAnimX = waterAnimTileNumbers[1, 14]; rdungeon.Floors[floor].mShoreInnerLeftAnimX = waterAnimTileNumbers[1, 3]; rdungeon.Floors[floor].mShoreHorizontalAnimX = waterAnimTileNumbers[1, 7]; rdungeon.Floors[floor].mShoreInnerRightAnimX = waterAnimTileNumbers[1, 11]; //Attributes rdungeon.Floors[floor].GroundTile.Type = (Enums.TileType)cbGroundType.SelectedIndex; rdungeon.Floors[floor].GroundTile.Data1 = nudGroundData1.Value; rdungeon.Floors[floor].GroundTile.Data2 = nudGroundData2.Value; rdungeon.Floors[floor].GroundTile.Data3 = nudGroundData3.Value; rdungeon.Floors[floor].GroundTile.String1 = txtGroundString1.Text; rdungeon.Floors[floor].GroundTile.String2 = txtGroundString2.Text; rdungeon.Floors[floor].GroundTile.String3 = txtGroundString3.Text; rdungeon.Floors[floor].HallTile.Type = (Enums.TileType)cbHallType.SelectedIndex; rdungeon.Floors[floor].HallTile.Data1 = nudHallData1.Value; rdungeon.Floors[floor].HallTile.Data2 = nudHallData2.Value; rdungeon.Floors[floor].HallTile.Data3 = nudHallData3.Value; rdungeon.Floors[floor].HallTile.String1 = txtHallString1.Text; rdungeon.Floors[floor].HallTile.String2 = txtHallString2.Text; rdungeon.Floors[floor].HallTile.String3 = txtHallString3.Text; rdungeon.Floors[floor].WaterTile.Type = (Enums.TileType)cbWaterType.SelectedIndex; rdungeon.Floors[floor].WaterTile.Data1 = nudWaterData1.Value; rdungeon.Floors[floor].WaterTile.Data2 = nudWaterData2.Value; rdungeon.Floors[floor].WaterTile.Data3 = nudWaterData3.Value; rdungeon.Floors[floor].WaterTile.String1 = txtWaterString1.Text; rdungeon.Floors[floor].WaterTile.String2 = txtWaterString2.Text; rdungeon.Floors[floor].WaterTile.String3 = txtWaterString3.Text; rdungeon.Floors[floor].WallTile.Type = (Enums.TileType)cbWallType.SelectedIndex; rdungeon.Floors[floor].WallTile.Data1 = nudWallData1.Value; rdungeon.Floors[floor].WallTile.Data2 = nudWallData2.Value; rdungeon.Floors[floor].WallTile.Data3 = nudWallData3.Value; rdungeon.Floors[floor].WallTile.String1 = txtWallString1.Text; rdungeon.Floors[floor].WallTile.String2 = txtWallString2.Text; rdungeon.Floors[floor].WallTile.String3 = txtWallString3.Text; //Items rdungeon.Floors[floor].Items.Clear(); for (int item = 0; item < itemList.Count; item++) { EditableRDungeonItem newItem = new EditableRDungeonItem(); newItem.ItemNum = itemList[item].ItemNum; newItem.MinAmount = itemList[item].MinAmount; newItem.MaxAmount = itemList[item].MaxAmount; newItem.AppearanceRate = itemList[item].AppearanceRate; newItem.StickyRate = itemList[item].StickyRate; newItem.Tag = itemList[item].Tag; newItem.Hidden = itemList[item].Hidden; newItem.OnGround = itemList[item].OnGround; newItem.OnWater = itemList[item].OnWater; newItem.OnWall = itemList[item].OnWall; rdungeon.Floors[floor].Items.Add(newItem); } //Npcs rdungeon.Floors[floor].NpcSpawnTime = nudNpcSpawnTime.Value; rdungeon.Floors[floor].NpcMin = nudNpcMin.Value; rdungeon.Floors[floor].NpcMax = nudNpcMax.Value; rdungeon.Floors[floor].Npcs.Clear(); for (int npc = 0; npc < npcList.Count; npc++) { MapNpcSettings newNpc = new MapNpcSettings(); newNpc.NpcNum = npcList[npc].NpcNum; newNpc.MinLevel = npcList[npc].MinLevel; newNpc.MaxLevel = npcList[npc].MaxLevel; newNpc.AppearanceRate = npcList[npc].AppearanceRate; newNpc.StartStatus = npcList[npc].StartStatus; newNpc.StartStatusCounter = npcList[npc].StartStatusCounter; newNpc.StartStatusChance = npcList[npc].StartStatusChance; rdungeon.Floors[floor].Npcs.Add(newNpc); } //Traps rdungeon.Floors[floor].SpecialTiles.Clear(); for (int traps = 0; traps < trapList.Count; traps++) { EditableRDungeonTrap newTile = new EditableRDungeonTrap(); newTile.SpecialTile.Ground = trapList[traps].SpecialTile.Ground; newTile.SpecialTile.GroundAnim = trapList[traps].SpecialTile.GroundAnim; newTile.SpecialTile.Mask = trapList[traps].SpecialTile.Mask; newTile.SpecialTile.Anim = trapList[traps].SpecialTile.Anim; newTile.SpecialTile.Mask2 = trapList[traps].SpecialTile.Mask2; newTile.SpecialTile.M2Anim = trapList[traps].SpecialTile.M2Anim; newTile.SpecialTile.Fringe = trapList[traps].SpecialTile.Fringe; newTile.SpecialTile.FAnim = trapList[traps].SpecialTile.FAnim; newTile.SpecialTile.Fringe2 = trapList[traps].SpecialTile.Fringe2; newTile.SpecialTile.F2Anim = trapList[traps].SpecialTile.F2Anim; newTile.SpecialTile.GroundSet = trapList[traps].SpecialTile.GroundSet; newTile.SpecialTile.GroundAnimSet = trapList[traps].SpecialTile.GroundAnimSet; newTile.SpecialTile.MaskSet = trapList[traps].SpecialTile.MaskSet; newTile.SpecialTile.AnimSet = trapList[traps].SpecialTile.AnimSet; newTile.SpecialTile.Mask2Set = trapList[traps].SpecialTile.Mask2Set; newTile.SpecialTile.M2AnimSet = trapList[traps].SpecialTile.M2AnimSet; newTile.SpecialTile.FringeSet = trapList[traps].SpecialTile.FringeSet; newTile.SpecialTile.FAnimSet = trapList[traps].SpecialTile.FAnimSet; newTile.SpecialTile.Fringe2Set = trapList[traps].SpecialTile.Fringe2Set; newTile.SpecialTile.F2AnimSet = trapList[traps].SpecialTile.F2AnimSet; newTile.SpecialTile.Type = trapList[traps].SpecialTile.Type; newTile.SpecialTile.Data1 = trapList[traps].SpecialTile.Data1; newTile.SpecialTile.Data2 = trapList[traps].SpecialTile.Data2; newTile.SpecialTile.Data3 = trapList[traps].SpecialTile.Data3; newTile.SpecialTile.String1 = trapList[traps].SpecialTile.String1; newTile.SpecialTile.String2 = trapList[traps].SpecialTile.String2; newTile.SpecialTile.String3 = trapList[traps].SpecialTile.String3; newTile.AppearanceRate = trapList[traps].AppearanceRate; rdungeon.Floors[floor].SpecialTiles.Add(newTile); } //Weather rdungeon.Floors[floor].Weather.Clear(); for (int weather = 0; weather < lbxWeather.Items.Count; weather++) { string[] weatherindex = lbxWeather.Items[weather].TextIdentifier.Split(':'); if (weatherindex[1].IsNumeric()) { rdungeon.Floors[floor].Weather.Add((Enums.Weather)weatherindex[1].ToInt()); } } //Goal if (optNextFloor.Checked) { rdungeon.Floors[floor].GoalType = Enums.RFloorGoalType.NextFloor; } else if (optMap.Checked) { rdungeon.Floors[floor].GoalType = Enums.RFloorGoalType.Map; } else if (optScripted.Checked) { rdungeon.Floors[floor].GoalType = Enums.RFloorGoalType.Scripted; } else { rdungeon.Floors[floor].GoalType = Enums.RFloorGoalType.NextFloor; } rdungeon.Floors[floor].GoalMap = nudData1.Value; rdungeon.Floors[floor].GoalX = nudData2.Value; rdungeon.Floors[floor].GoalY = nudData3.Value; //chambers rdungeon.Floors[floor].Chambers.Clear(); for (int chamber = 0; chamber < chamberList.Count; chamber++) { EditableRDungeonChamber addedChamber = new EditableRDungeonChamber(); addedChamber.ChamberNum = chamberList[chamber].ChamberNum; addedChamber.String1 = chamberList[chamber].String1; addedChamber.String2 = chamberList[chamber].String2; addedChamber.String3 = chamberList[chamber].String3; rdungeon.Floors[floor].Chambers.Add(addedChamber); } //Misc rdungeon.Floors[floor].Darkness = nudDarkness.Value; if (lbxMusic.SelectedItems.Count != 1 || lbxMusic.Items[0].Selected) { rdungeon.Floors[floor].Music = ""; } else { rdungeon.Floors[floor].Music = lbxMusic.SelectedItems[0].TextIdentifier; } } lblSaveLoadMessage.Text = "All settings saved to floor(s)"; } else if (pnlRDungeonStructure != null && pnlRDungeonStructure.Visible == true) { for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) { rdungeon.Floors[floor].TrapMin = nudTrapMin.Value; rdungeon.Floors[floor].TrapMax = nudTrapMax.Value; rdungeon.Floors[floor].ItemMin = nudItemMin.Value; rdungeon.Floors[floor].ItemMax = nudItemMax.Value; rdungeon.Floors[floor].RoomWidthMin = nudRoomWidthMin.Value; rdungeon.Floors[floor].RoomWidthMax = nudRoomWidthMax.Value; rdungeon.Floors[floor].RoomLengthMin = nudRoomLengthMin.Value; rdungeon.Floors[floor].RoomLengthMax = nudRoomLengthMax.Value; rdungeon.Floors[floor].HallTurnMin = nudHallTurnMin.Value; rdungeon.Floors[floor].HallTurnMax = nudHallTurnMax.Value; rdungeon.Floors[floor].HallVarMin = nudHallVarMin.Value; rdungeon.Floors[floor].HallVarMax = nudHallVarMax.Value; rdungeon.Floors[floor].WaterFrequency = nudWaterFrequency.Value; rdungeon.Floors[floor].Craters = nudCraters.Value; rdungeon.Floors[floor].CraterMinLength = nudCraterMinLength.Value; rdungeon.Floors[floor].CraterMaxLength = nudCraterMaxLength.Value; rdungeon.Floors[floor].CraterFuzzy = chkCraterFuzzy.Checked; } lblSaveLoadMessage.Text = "Structure settings saved to floor(s)"; } else if (pnlRDungeonLandTiles != null && pnlRDungeonLandTiles.Visible == true) { for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) { rdungeon.Floors[floor].StairsSheet = landTileNumbers[0, 19]; rdungeon.Floors[floor].mGroundSheet = landTileNumbers[0, 16]; rdungeon.Floors[floor].mTopLeftSheet = landTileNumbers[0, 10]; rdungeon.Floors[floor].mTopCenterSheet = landTileNumbers[0, 6]; rdungeon.Floors[floor].mTopRightSheet = landTileNumbers[0, 2]; rdungeon.Floors[floor].mCenterLeftSheet = landTileNumbers[0, 9]; rdungeon.Floors[floor].mCenterCenterSheet = landTileNumbers[0, 5]; rdungeon.Floors[floor].mCenterRightSheet = landTileNumbers[0, 1]; rdungeon.Floors[floor].mBottomLeftSheet = landTileNumbers[0, 8]; rdungeon.Floors[floor].mBottomCenterSheet = landTileNumbers[0, 4]; rdungeon.Floors[floor].mBottomRightSheet = landTileNumbers[0, 0]; rdungeon.Floors[floor].mInnerTopLeftSheet = landTileNumbers[0, 17]; rdungeon.Floors[floor].mInnerTopRightSheet = landTileNumbers[0, 20]; rdungeon.Floors[floor].mInnerBottomLeftSheet = landTileNumbers[0, 18]; rdungeon.Floors[floor].mInnerBottomRightSheet = landTileNumbers[0, 21]; rdungeon.Floors[floor].mIsolatedWallSheet = landTileNumbers[0, 15]; rdungeon.Floors[floor].mColumnTopSheet = landTileNumbers[0, 12]; rdungeon.Floors[floor].mColumnCenterSheet = landTileNumbers[0, 13]; rdungeon.Floors[floor].mColumnBottomSheet = landTileNumbers[0, 14]; rdungeon.Floors[floor].mRowLeftSheet = landTileNumbers[0, 3]; rdungeon.Floors[floor].mRowCenterSheet = landTileNumbers[0, 7]; rdungeon.Floors[floor].mRowRightSheet = landTileNumbers[0, 11]; rdungeon.Floors[floor].StairsX = landTileNumbers[1, 19]; rdungeon.Floors[floor].mGroundX = landTileNumbers[1, 16]; rdungeon.Floors[floor].mTopLeftX = landTileNumbers[1, 10]; rdungeon.Floors[floor].mTopCenterX = landTileNumbers[1, 6]; rdungeon.Floors[floor].mTopRightX = landTileNumbers[1, 2]; rdungeon.Floors[floor].mCenterLeftX = landTileNumbers[1, 9]; rdungeon.Floors[floor].mCenterCenterX = landTileNumbers[1, 5]; rdungeon.Floors[floor].mCenterRightX = landTileNumbers[1, 1]; rdungeon.Floors[floor].mBottomLeftX = landTileNumbers[1, 8]; rdungeon.Floors[floor].mBottomCenterX = landTileNumbers[1, 4]; rdungeon.Floors[floor].mBottomRightX = landTileNumbers[1, 0]; rdungeon.Floors[floor].mInnerTopLeftX = landTileNumbers[1, 17]; rdungeon.Floors[floor].mInnerTopRightX = landTileNumbers[1, 20]; rdungeon.Floors[floor].mInnerBottomLeftX = landTileNumbers[1, 18]; rdungeon.Floors[floor].mInnerBottomRightX = landTileNumbers[1, 21]; rdungeon.Floors[floor].mIsolatedWallX = landTileNumbers[1, 15]; rdungeon.Floors[floor].mColumnTopX = landTileNumbers[1, 12]; rdungeon.Floors[floor].mColumnCenterX = landTileNumbers[1, 13]; rdungeon.Floors[floor].mColumnBottomX = landTileNumbers[1, 14]; rdungeon.Floors[floor].mRowLeftX = landTileNumbers[1, 3]; rdungeon.Floors[floor].mRowCenterX = landTileNumbers[1, 7]; rdungeon.Floors[floor].mRowRightX = landTileNumbers[1, 11]; } lblSaveLoadMessage.Text = "Land Tile settings saved to floor(s)"; } else if (pnlRDungeonLandAltTiles != null && pnlRDungeonLandAltTiles.Visible == true) { for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) { rdungeon.Floors[floor].mGroundAlt2Sheet = landAltTileNumbers[0, 19]; rdungeon.Floors[floor].mGroundAltSheet = landAltTileNumbers[0, 16]; rdungeon.Floors[floor].mTopLeftAltSheet = landAltTileNumbers[0, 10]; rdungeon.Floors[floor].mTopCenterAltSheet = landAltTileNumbers[0, 6]; rdungeon.Floors[floor].mTopRightAltSheet = landAltTileNumbers[0, 2]; rdungeon.Floors[floor].mCenterLeftAltSheet = landAltTileNumbers[0, 9]; rdungeon.Floors[floor].mCenterCenterAltSheet = landAltTileNumbers[0, 5]; rdungeon.Floors[floor].mCenterCenterAlt2Sheet = landAltTileNumbers[0, 22]; rdungeon.Floors[floor].mCenterRightAltSheet = landAltTileNumbers[0, 1]; rdungeon.Floors[floor].mBottomLeftAltSheet = landAltTileNumbers[0, 8]; rdungeon.Floors[floor].mBottomCenterAltSheet = landAltTileNumbers[0, 4]; rdungeon.Floors[floor].mBottomRightAltSheet = landAltTileNumbers[0, 0]; rdungeon.Floors[floor].mInnerTopLeftAltSheet = landAltTileNumbers[0, 17]; rdungeon.Floors[floor].mInnerTopRightAltSheet = landAltTileNumbers[0, 20]; rdungeon.Floors[floor].mInnerBottomLeftAltSheet = landAltTileNumbers[0, 18]; rdungeon.Floors[floor].mInnerBottomRightAltSheet = landAltTileNumbers[0, 21]; rdungeon.Floors[floor].mIsolatedWallAltSheet = landAltTileNumbers[0, 15]; rdungeon.Floors[floor].mColumnTopAltSheet = landAltTileNumbers[0, 12]; rdungeon.Floors[floor].mColumnCenterAltSheet = landAltTileNumbers[0, 13]; rdungeon.Floors[floor].mColumnBottomAltSheet = landAltTileNumbers[0, 14]; rdungeon.Floors[floor].mRowLeftAltSheet = landAltTileNumbers[0, 3]; rdungeon.Floors[floor].mRowCenterAltSheet = landAltTileNumbers[0, 7]; rdungeon.Floors[floor].mRowRightAltSheet = landAltTileNumbers[0, 11]; rdungeon.Floors[floor].mGroundAlt2X = landAltTileNumbers[1, 19]; rdungeon.Floors[floor].mGroundAltX = landAltTileNumbers[1, 16]; rdungeon.Floors[floor].mTopLeftAltX = landAltTileNumbers[1, 10]; rdungeon.Floors[floor].mTopCenterAltX = landAltTileNumbers[1, 6]; rdungeon.Floors[floor].mTopRightAltX = landAltTileNumbers[1, 2]; rdungeon.Floors[floor].mCenterLeftAltX = landAltTileNumbers[1, 9]; rdungeon.Floors[floor].mCenterCenterAltX = landAltTileNumbers[1, 5]; rdungeon.Floors[floor].mCenterCenterAlt2X = landAltTileNumbers[1, 22]; rdungeon.Floors[floor].mCenterRightAltX = landAltTileNumbers[1, 1]; rdungeon.Floors[floor].mBottomLeftAltX = landAltTileNumbers[1, 8]; rdungeon.Floors[floor].mBottomCenterAltX = landAltTileNumbers[1, 4]; rdungeon.Floors[floor].mBottomRightAltX = landAltTileNumbers[1, 0]; rdungeon.Floors[floor].mInnerTopLeftAltX = landAltTileNumbers[1, 17]; rdungeon.Floors[floor].mInnerTopRightAltX = landAltTileNumbers[1, 20]; rdungeon.Floors[floor].mInnerBottomLeftAltX = landAltTileNumbers[1, 18]; rdungeon.Floors[floor].mInnerBottomRightAltX = landAltTileNumbers[1, 21]; rdungeon.Floors[floor].mIsolatedWallAltX = landAltTileNumbers[1, 15]; rdungeon.Floors[floor].mColumnTopAltX = landAltTileNumbers[1, 12]; rdungeon.Floors[floor].mColumnCenterAltX = landAltTileNumbers[1, 13]; rdungeon.Floors[floor].mColumnBottomAltX = landAltTileNumbers[1, 14]; rdungeon.Floors[floor].mRowLeftAltX = landAltTileNumbers[1, 3]; rdungeon.Floors[floor].mRowCenterAltX = landAltTileNumbers[1, 7]; rdungeon.Floors[floor].mRowRightAltX = landAltTileNumbers[1, 11]; } lblSaveLoadMessage.Text = "Land Alt Tile settings saved to floor(s)"; } else if (pnlRDungeonWaterTiles != null && pnlRDungeonWaterTiles.Visible == true) { for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) { rdungeon.Floors[floor].mShoreSurroundedSheet = waterTileNumbers[0, 15]; rdungeon.Floors[floor].mShoreInnerTopLeftSheet = waterTileNumbers[0, 0]; rdungeon.Floors[floor].mShoreTopSheet = waterTileNumbers[0, 4]; rdungeon.Floors[floor].mShoreInnerTopRightSheet = waterTileNumbers[0, 8]; rdungeon.Floors[floor].mShoreLeftSheet = waterTileNumbers[0, 1]; rdungeon.Floors[floor].mWaterSheet = waterTileNumbers[0, 5]; rdungeon.Floors[floor].mShoreRightSheet = waterTileNumbers[0, 9]; rdungeon.Floors[floor].mShoreInnerBottomLeftSheet = waterTileNumbers[0, 2]; rdungeon.Floors[floor].mShoreBottomSheet = waterTileNumbers[0, 6]; rdungeon.Floors[floor].mShoreInnerBottomRightSheet = waterTileNumbers[0, 10]; rdungeon.Floors[floor].mShoreTopLeftSheet = waterTileNumbers[0, 16]; rdungeon.Floors[floor].mShoreTopRightSheet = waterTileNumbers[0, 19]; rdungeon.Floors[floor].mShoreBottomLeftSheet = waterTileNumbers[0, 17]; rdungeon.Floors[floor].mShoreBottomRightSheet = waterTileNumbers[0, 20]; rdungeon.Floors[floor].mShoreDiagonalForwardSheet = waterTileNumbers[0, 18]; rdungeon.Floors[floor].mShoreDiagonalBackSheet = waterTileNumbers[0, 21]; rdungeon.Floors[floor].mShoreInnerTopSheet = waterTileNumbers[0, 12]; rdungeon.Floors[floor].mShoreVerticalSheet = waterTileNumbers[0, 13]; rdungeon.Floors[floor].mShoreInnerBottomSheet = waterTileNumbers[0, 14]; rdungeon.Floors[floor].mShoreInnerLeftSheet = waterTileNumbers[0, 3]; rdungeon.Floors[floor].mShoreHorizontalSheet = waterTileNumbers[0, 7]; rdungeon.Floors[floor].mShoreInnerRightSheet = waterTileNumbers[0, 11]; rdungeon.Floors[floor].mShoreSurroundedX = waterTileNumbers[1, 15]; rdungeon.Floors[floor].mShoreInnerTopLeftX = waterTileNumbers[1, 0]; rdungeon.Floors[floor].mShoreTopX = waterTileNumbers[1, 4]; rdungeon.Floors[floor].mShoreInnerTopRightX = waterTileNumbers[1, 8]; rdungeon.Floors[floor].mShoreLeftX = waterTileNumbers[1, 1]; rdungeon.Floors[floor].mWaterX = waterTileNumbers[1, 5]; rdungeon.Floors[floor].mShoreRightX = waterTileNumbers[1, 9]; rdungeon.Floors[floor].mShoreInnerBottomLeftX = waterTileNumbers[1, 2]; rdungeon.Floors[floor].mShoreBottomX = waterTileNumbers[1, 6]; rdungeon.Floors[floor].mShoreInnerBottomRightX = waterTileNumbers[1, 10]; rdungeon.Floors[floor].mShoreTopLeftX = waterTileNumbers[1, 16]; rdungeon.Floors[floor].mShoreTopRightX = waterTileNumbers[1, 19]; rdungeon.Floors[floor].mShoreBottomLeftX = waterTileNumbers[1, 17]; rdungeon.Floors[floor].mShoreBottomRightX = waterTileNumbers[1, 20]; rdungeon.Floors[floor].mShoreDiagonalForwardX = waterTileNumbers[1, 18]; rdungeon.Floors[floor].mShoreDiagonalBackX = waterTileNumbers[1, 21]; rdungeon.Floors[floor].mShoreInnerTopX = waterTileNumbers[1, 12]; rdungeon.Floors[floor].mShoreVerticalX = waterTileNumbers[1, 13]; rdungeon.Floors[floor].mShoreInnerBottomX = waterTileNumbers[1, 14]; rdungeon.Floors[floor].mShoreInnerLeftX = waterTileNumbers[1, 3]; rdungeon.Floors[floor].mShoreHorizontalX = waterTileNumbers[1, 7]; rdungeon.Floors[floor].mShoreInnerRightX = waterTileNumbers[1, 11]; } lblSaveLoadMessage.Text = "Water Tile settings saved to floor(s)"; } else if (pnlRDungeonWaterAnimTiles != null && pnlRDungeonWaterAnimTiles.Visible == true) { for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) { rdungeon.Floors[floor].mShoreSurroundedAnimSheet = waterAnimTileNumbers[0, 15]; rdungeon.Floors[floor].mShoreInnerTopLeftAnimSheet = waterAnimTileNumbers[0, 0]; rdungeon.Floors[floor].mShoreTopAnimSheet = waterAnimTileNumbers[0, 4]; rdungeon.Floors[floor].mShoreInnerTopRightAnimSheet = waterAnimTileNumbers[0, 8]; rdungeon.Floors[floor].mShoreLeftAnimSheet = waterAnimTileNumbers[0, 1]; rdungeon.Floors[floor].mWaterAnimSheet = waterAnimTileNumbers[0, 5]; rdungeon.Floors[floor].mShoreRightAnimSheet = waterAnimTileNumbers[0, 9]; rdungeon.Floors[floor].mShoreInnerBottomLeftAnimSheet = waterAnimTileNumbers[0, 2]; rdungeon.Floors[floor].mShoreBottomAnimSheet = waterAnimTileNumbers[0, 6]; rdungeon.Floors[floor].mShoreInnerBottomRightAnimSheet = waterAnimTileNumbers[0, 10]; rdungeon.Floors[floor].mShoreTopLeftAnimSheet = waterAnimTileNumbers[0, 16]; rdungeon.Floors[floor].mShoreTopRightAnimSheet = waterAnimTileNumbers[0, 19]; rdungeon.Floors[floor].mShoreBottomLeftAnimSheet = waterAnimTileNumbers[0, 17]; rdungeon.Floors[floor].mShoreBottomRightAnimSheet = waterAnimTileNumbers[0, 20]; rdungeon.Floors[floor].mShoreDiagonalForwardAnimSheet = waterAnimTileNumbers[0, 18]; rdungeon.Floors[floor].mShoreDiagonalBackAnimSheet = waterAnimTileNumbers[0, 21]; rdungeon.Floors[floor].mShoreInnerTopAnimSheet = waterAnimTileNumbers[0, 12]; rdungeon.Floors[floor].mShoreVerticalAnimSheet = waterAnimTileNumbers[0, 13]; rdungeon.Floors[floor].mShoreInnerBottomAnimSheet = waterAnimTileNumbers[0, 14]; rdungeon.Floors[floor].mShoreInnerLeftAnimSheet = waterAnimTileNumbers[0, 3]; rdungeon.Floors[floor].mShoreHorizontalAnimSheet = waterAnimTileNumbers[0, 7]; rdungeon.Floors[floor].mShoreInnerRightAnimSheet = waterAnimTileNumbers[0, 11]; rdungeon.Floors[floor].mShoreSurroundedAnimX = waterAnimTileNumbers[1, 15]; rdungeon.Floors[floor].mShoreInnerTopLeftAnimX = waterAnimTileNumbers[1, 0]; rdungeon.Floors[floor].mShoreTopAnimX = waterAnimTileNumbers[1, 4]; rdungeon.Floors[floor].mShoreInnerTopRightAnimX = waterAnimTileNumbers[1, 8]; rdungeon.Floors[floor].mShoreLeftAnimX = waterAnimTileNumbers[1, 1]; rdungeon.Floors[floor].mWaterAnimX = waterAnimTileNumbers[1, 5]; rdungeon.Floors[floor].mShoreRightAnimX = waterAnimTileNumbers[1, 9]; rdungeon.Floors[floor].mShoreInnerBottomLeftAnimX = waterAnimTileNumbers[1, 2]; rdungeon.Floors[floor].mShoreBottomAnimX = waterAnimTileNumbers[1, 6]; rdungeon.Floors[floor].mShoreInnerBottomRightAnimX = waterAnimTileNumbers[1, 10]; rdungeon.Floors[floor].mShoreTopLeftAnimX = waterAnimTileNumbers[1, 16]; rdungeon.Floors[floor].mShoreTopRightAnimX = waterAnimTileNumbers[1, 19]; rdungeon.Floors[floor].mShoreBottomLeftAnimX = waterAnimTileNumbers[1, 17]; rdungeon.Floors[floor].mShoreBottomRightAnimX = waterAnimTileNumbers[1, 20]; rdungeon.Floors[floor].mShoreDiagonalForwardAnimX = waterAnimTileNumbers[1, 18]; rdungeon.Floors[floor].mShoreDiagonalBackAnimX = waterAnimTileNumbers[1, 21]; rdungeon.Floors[floor].mShoreInnerTopAnimX = waterAnimTileNumbers[1, 12]; rdungeon.Floors[floor].mShoreVerticalAnimX = waterAnimTileNumbers[1, 13]; rdungeon.Floors[floor].mShoreInnerBottomAnimX = waterAnimTileNumbers[1, 14]; rdungeon.Floors[floor].mShoreInnerLeftAnimX = waterAnimTileNumbers[1, 3]; rdungeon.Floors[floor].mShoreHorizontalAnimX = waterAnimTileNumbers[1, 7]; rdungeon.Floors[floor].mShoreInnerRightAnimX = waterAnimTileNumbers[1, 11]; } lblSaveLoadMessage.Text = "Water Anim Tile settings saved to floor(s)"; } else if (pnlRDungeonAttributes != null && pnlRDungeonAttributes.Visible == true) { for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) { rdungeon.Floors[floor].GroundTile.Type = (Enums.TileType)cbGroundType.SelectedIndex; rdungeon.Floors[floor].GroundTile.Data1 = nudGroundData1.Value; rdungeon.Floors[floor].GroundTile.Data2 = nudGroundData2.Value; rdungeon.Floors[floor].GroundTile.Data3 = nudGroundData3.Value; rdungeon.Floors[floor].GroundTile.String1 = txtGroundString1.Text; rdungeon.Floors[floor].GroundTile.String2 = txtGroundString2.Text; rdungeon.Floors[floor].GroundTile.String3 = txtGroundString3.Text; rdungeon.Floors[floor].HallTile.Type = (Enums.TileType)cbHallType.SelectedIndex; rdungeon.Floors[floor].HallTile.Data1 = nudHallData1.Value; rdungeon.Floors[floor].HallTile.Data2 = nudHallData2.Value; rdungeon.Floors[floor].HallTile.Data3 = nudHallData3.Value; rdungeon.Floors[floor].HallTile.String1 = txtHallString1.Text; rdungeon.Floors[floor].HallTile.String2 = txtHallString2.Text; rdungeon.Floors[floor].HallTile.String3 = txtHallString3.Text; rdungeon.Floors[floor].WaterTile.Type = (Enums.TileType)cbWaterType.SelectedIndex; rdungeon.Floors[floor].WaterTile.Data1 = nudWaterData1.Value; rdungeon.Floors[floor].WaterTile.Data2 = nudWaterData2.Value; rdungeon.Floors[floor].WaterTile.Data3 = nudWaterData3.Value; rdungeon.Floors[floor].WaterTile.String1 = txtWaterString1.Text; rdungeon.Floors[floor].WaterTile.String2 = txtWaterString2.Text; rdungeon.Floors[floor].WaterTile.String3 = txtWaterString3.Text; rdungeon.Floors[floor].WallTile.Type = (Enums.TileType)cbWallType.SelectedIndex; rdungeon.Floors[floor].WallTile.Data1 = nudWallData1.Value; rdungeon.Floors[floor].WallTile.Data2 = nudWallData2.Value; rdungeon.Floors[floor].WallTile.Data3 = nudWallData3.Value; rdungeon.Floors[floor].WallTile.String1 = txtWallString1.Text; rdungeon.Floors[floor].WallTile.String2 = txtWallString2.Text; rdungeon.Floors[floor].WallTile.String3 = txtWallString3.Text; } lblSaveLoadMessage.Text = "Attribute settings saved to floor(s)"; } else if (pnlRDungeonItems != null && pnlRDungeonItems.Visible == true) { for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) { rdungeon.Floors[floor].Items.Clear(); for (int item = 0; item < itemList.Count; item++) { EditableRDungeonItem newItem = new EditableRDungeonItem(); newItem.ItemNum = itemList[item].ItemNum; newItem.MinAmount = itemList[item].MinAmount; newItem.MaxAmount = itemList[item].MaxAmount; newItem.AppearanceRate = itemList[item].AppearanceRate; newItem.StickyRate = itemList[item].StickyRate; newItem.Tag = itemList[item].Tag; newItem.Hidden = itemList[item].Hidden; newItem.OnGround = itemList[item].OnGround; newItem.OnWater = itemList[item].OnWater; newItem.OnWall = itemList[item].OnWall; rdungeon.Floors[floor].Items.Add(newItem); } } lblSaveLoadMessage.Text = "Item settings saved to floor(s)"; } else if (pnlRDungeonNpcs != null && pnlRDungeonNpcs.Visible == true) { for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) { rdungeon.Floors[floor].NpcSpawnTime = nudNpcSpawnTime.Value; rdungeon.Floors[floor].NpcMin = nudNpcMin.Value; rdungeon.Floors[floor].NpcMax = nudNpcMax.Value; rdungeon.Floors[floor].Npcs.Clear(); for (int npc = 0; npc < npcList.Count; npc++) { MapNpcSettings newNpc = new MapNpcSettings(); newNpc.NpcNum = npcList[npc].NpcNum; newNpc.MinLevel = npcList[npc].MinLevel; newNpc.MaxLevel = npcList[npc].MaxLevel; newNpc.AppearanceRate = npcList[npc].AppearanceRate; newNpc.StartStatus = npcList[npc].StartStatus; newNpc.StartStatusCounter = npcList[npc].StartStatusCounter; newNpc.StartStatusChance = npcList[npc].StartStatusChance; rdungeon.Floors[floor].Npcs.Add(newNpc); } } lblSaveLoadMessage.Text = "Npc settings saved to floor(s)"; } else if (pnlRDungeonTraps != null && pnlRDungeonTraps.Visible == true) { for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) { rdungeon.Floors[floor].SpecialTiles.Clear(); for (int traps = 0; traps < trapList.Count; traps++) { EditableRDungeonTrap newTile = new EditableRDungeonTrap(); newTile.SpecialTile.Ground = trapList[traps].SpecialTile.Ground; newTile.SpecialTile.GroundAnim = trapList[traps].SpecialTile.GroundAnim; newTile.SpecialTile.Mask = trapList[traps].SpecialTile.Mask; newTile.SpecialTile.Anim = trapList[traps].SpecialTile.Anim; newTile.SpecialTile.Mask2 = trapList[traps].SpecialTile.Mask2; newTile.SpecialTile.M2Anim = trapList[traps].SpecialTile.M2Anim; newTile.SpecialTile.Fringe = trapList[traps].SpecialTile.Fringe; newTile.SpecialTile.FAnim = trapList[traps].SpecialTile.FAnim; newTile.SpecialTile.Fringe2 = trapList[traps].SpecialTile.Fringe2; newTile.SpecialTile.F2Anim = trapList[traps].SpecialTile.F2Anim; newTile.SpecialTile.GroundSet = trapList[traps].SpecialTile.GroundSet; newTile.SpecialTile.GroundAnimSet = trapList[traps].SpecialTile.GroundAnimSet; newTile.SpecialTile.MaskSet = trapList[traps].SpecialTile.MaskSet; newTile.SpecialTile.AnimSet = trapList[traps].SpecialTile.AnimSet; newTile.SpecialTile.Mask2Set = trapList[traps].SpecialTile.Mask2Set; newTile.SpecialTile.M2AnimSet = trapList[traps].SpecialTile.M2AnimSet; newTile.SpecialTile.FringeSet = trapList[traps].SpecialTile.FringeSet; newTile.SpecialTile.FAnimSet = trapList[traps].SpecialTile.FAnimSet; newTile.SpecialTile.Fringe2Set = trapList[traps].SpecialTile.Fringe2Set; newTile.SpecialTile.F2AnimSet = trapList[traps].SpecialTile.F2AnimSet; newTile.SpecialTile.Type = trapList[traps].SpecialTile.Type; newTile.SpecialTile.Data1 = trapList[traps].SpecialTile.Data1; newTile.SpecialTile.Data2 = trapList[traps].SpecialTile.Data2; newTile.SpecialTile.Data3 = trapList[traps].SpecialTile.Data3; newTile.SpecialTile.String1 = trapList[traps].SpecialTile.String1; newTile.SpecialTile.String2 = trapList[traps].SpecialTile.String2; newTile.SpecialTile.String3 = trapList[traps].SpecialTile.String3; newTile.AppearanceRate = trapList[traps].AppearanceRate; rdungeon.Floors[floor].SpecialTiles.Add(newTile); } } lblSaveLoadMessage.Text = "Trap settings saved to floor(s)"; } else if (pnlRDungeonWeather != null && pnlRDungeonWeather.Visible == true) { for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) { rdungeon.Floors[floor].Weather.Clear(); for (int weather = 0; weather < lbxWeather.Items.Count; weather++) { string[] weatherindex = lbxWeather.Items[weather].TextIdentifier.Split(':'); if (weatherindex[1].IsNumeric()) { rdungeon.Floors[floor].Weather.Add((Enums.Weather)weatherindex[1].ToInt()); } } } lblSaveLoadMessage.Text = "Weather settings saved to floor(s)"; } else if (pnlRDungeonGoal != null && pnlRDungeonGoal.Visible == true) { for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) { if (optNextFloor.Checked) { rdungeon.Floors[floor].GoalType = Enums.RFloorGoalType.NextFloor; } else if (optMap.Checked) { rdungeon.Floors[floor].GoalType = Enums.RFloorGoalType.Map; } else if (optScripted.Checked) { rdungeon.Floors[floor].GoalType = Enums.RFloorGoalType.Scripted; } else { rdungeon.Floors[floor].GoalType = Enums.RFloorGoalType.NextFloor; } rdungeon.Floors[floor].GoalMap = nudData1.Value; rdungeon.Floors[floor].GoalX = nudData2.Value; rdungeon.Floors[floor].GoalY = nudData3.Value; } lblSaveLoadMessage.Text = "Goal settings saved to floor(s)"; } else if (pnlRDungeonChambers != null && pnlRDungeonChambers.Visible == true) { for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) { rdungeon.Floors[floor].Chambers.Clear(); for (int chamber = 0; chamber < chamberList.Count; chamber++) { EditableRDungeonChamber addedChamber = new EditableRDungeonChamber(); addedChamber.ChamberNum = chamberList[chamber].ChamberNum; addedChamber.String1 = chamberList[chamber].String1; addedChamber.String2 = chamberList[chamber].String2; addedChamber.String3 = chamberList[chamber].String3; rdungeon.Floors[floor].Chambers.Add(addedChamber); } } lblSaveLoadMessage.Text = "Chamber settings saved to floor(s)"; } else if (pnlRDungeonMisc != null && pnlRDungeonMisc.Visible == true) { for (int floor = nudFirstFloor.Value - 1; floor < nudLastFloor.Value; floor++) { rdungeon.Floors[floor].Darkness = nudDarkness.Value; if (lbxMusic.SelectedItems.Count != 1 || lbxMusic.Items[0].Selected) { rdungeon.Floors[floor].Music = ""; } else { rdungeon.Floors[floor].Music = lbxMusic.SelectedItems[0].TextIdentifier; } } lblSaveLoadMessage.Text = "Misc settings saved to floor(s)"; } }
public void LoadRDungeon(string[] parse) { //load Rdungeon from packet rdungeon = new EditableRDungeon(parse[1].ToInt()); rdungeon.DungeonName = parse[2]; rdungeon.Direction = (Enums.Direction)parse[3].ToInt(); rdungeon.MaxFloors = parse[4].ToInt(); rdungeon.Recruitment = parse[5].ToBool(); rdungeon.Exp = parse[6].ToBool(); rdungeon.WindTimer = parse[7].ToInt(); rdungeon.DungeonIndex = parse[8].ToInt(); int n = 9; for (int i = 0; i < rdungeon.MaxFloors; i++) { rdungeon.Floors.Add(new EditableRDungeonFloor()); rdungeon.Floors[i].TrapMin = parse[n].ToInt(); rdungeon.Floors[i].TrapMax = parse[n + 1].ToInt(); rdungeon.Floors[i].ItemMin = parse[n + 2].ToInt(); rdungeon.Floors[i].ItemMax = parse[n + 3].ToInt(); rdungeon.Floors[i].Intricacy = parse[n + 4].ToInt(); rdungeon.Floors[i].RoomWidthMin = parse[n + 5].ToInt(); rdungeon.Floors[i].RoomWidthMax = parse[n + 6].ToInt(); rdungeon.Floors[i].RoomLengthMin = parse[n + 7].ToInt(); rdungeon.Floors[i].RoomLengthMax = parse[n + 8].ToInt(); rdungeon.Floors[i].HallTurnMin = parse[n + 9].ToInt(); rdungeon.Floors[i].HallTurnMax = parse[n + 10].ToInt(); rdungeon.Floors[i].HallVarMin = parse[n + 11].ToInt(); rdungeon.Floors[i].HallVarMax = parse[n + 12].ToInt(); rdungeon.Floors[i].WaterFrequency = parse[n + 13].ToInt(); rdungeon.Floors[i].Craters = parse[n + 14].ToInt(); rdungeon.Floors[i].CraterMinLength = parse[n + 15].ToInt(); rdungeon.Floors[i].CraterMaxLength = parse[n + 16].ToInt(); rdungeon.Floors[i].CraterFuzzy = parse[n + 17].ToBool(); rdungeon.Floors[i].MinChambers = parse[n + 18].ToInt(); rdungeon.Floors[i].MaxChambers = parse[n + 19].ToInt(); rdungeon.Floors[i].Darkness = parse[n + 20].ToInt(); rdungeon.Floors[i].GoalType = (Enums.RFloorGoalType)parse[n + 21].ToInt(); rdungeon.Floors[i].GoalMap = parse[n + 22].ToInt(); rdungeon.Floors[i].GoalX = parse[n + 23].ToInt(); rdungeon.Floors[i].GoalY = parse[n + 24].ToInt(); rdungeon.Floors[i].Music = parse[n + 25]; n += 26; rdungeon.Floors[i].StairsX = parse[n].ToInt(); rdungeon.Floors[i].StairsSheet = parse[n + 1].ToInt(); rdungeon.Floors[i].mGroundX = parse[n + 2].ToInt(); rdungeon.Floors[i].mGroundSheet = parse[n + 3].ToInt(); rdungeon.Floors[i].mTopLeftX = parse[n + 4].ToInt(); rdungeon.Floors[i].mTopLeftSheet = parse[n + 5].ToInt(); rdungeon.Floors[i].mTopCenterX = parse[n + 6].ToInt(); rdungeon.Floors[i].mTopCenterSheet = parse[n + 7].ToInt(); rdungeon.Floors[i].mTopRightX = parse[n + 8].ToInt(); rdungeon.Floors[i].mTopRightSheet = parse[n + 9].ToInt(); rdungeon.Floors[i].mCenterLeftX = parse[n + 10].ToInt(); rdungeon.Floors[i].mCenterLeftSheet = parse[n + 11].ToInt(); rdungeon.Floors[i].mCenterCenterX = parse[n + 12].ToInt(); rdungeon.Floors[i].mCenterCenterSheet = parse[n + 13].ToInt(); rdungeon.Floors[i].mCenterRightX = parse[n + 14].ToInt(); rdungeon.Floors[i].mCenterRightSheet = parse[n + 15].ToInt(); rdungeon.Floors[i].mBottomLeftX = parse[n + 16].ToInt(); rdungeon.Floors[i].mBottomLeftSheet = parse[n + 17].ToInt(); rdungeon.Floors[i].mBottomCenterX = parse[n + 18].ToInt(); rdungeon.Floors[i].mBottomCenterSheet = parse[n + 19].ToInt(); rdungeon.Floors[i].mBottomRightX = parse[n + 20].ToInt(); rdungeon.Floors[i].mBottomRightSheet = parse[n + 21].ToInt(); rdungeon.Floors[i].mInnerTopLeftX = parse[n + 22].ToInt(); rdungeon.Floors[i].mInnerTopLeftSheet = parse[n + 23].ToInt(); rdungeon.Floors[i].mInnerBottomLeftX = parse[n + 24].ToInt(); rdungeon.Floors[i].mInnerBottomLeftSheet = parse[n + 25].ToInt(); rdungeon.Floors[i].mInnerTopRightX = parse[n + 26].ToInt(); rdungeon.Floors[i].mInnerTopRightSheet = parse[n + 27].ToInt(); rdungeon.Floors[i].mInnerBottomRightX = parse[n + 28].ToInt(); rdungeon.Floors[i].mInnerBottomRightSheet = parse[n + 29].ToInt(); rdungeon.Floors[i].mIsolatedWallX = parse[n + 30].ToInt(); rdungeon.Floors[i].mIsolatedWallSheet = parse[n + 31].ToInt(); rdungeon.Floors[i].mColumnTopX = parse[n + 32].ToInt(); rdungeon.Floors[i].mColumnTopSheet = parse[n + 33].ToInt(); rdungeon.Floors[i].mColumnCenterX = parse[n + 34].ToInt(); rdungeon.Floors[i].mColumnCenterSheet = parse[n + 35].ToInt(); rdungeon.Floors[i].mColumnBottomX = parse[n + 36].ToInt(); rdungeon.Floors[i].mColumnBottomSheet = parse[n + 37].ToInt(); rdungeon.Floors[i].mRowLeftX = parse[n + 38].ToInt(); rdungeon.Floors[i].mRowLeftSheet = parse[n + 39].ToInt(); rdungeon.Floors[i].mRowCenterX = parse[n + 40].ToInt(); rdungeon.Floors[i].mRowCenterSheet = parse[n + 41].ToInt(); rdungeon.Floors[i].mRowRightX = parse[n + 42].ToInt(); rdungeon.Floors[i].mRowRightSheet = parse[n + 43].ToInt(); rdungeon.Floors[i].mGroundAltX = parse[n + 44].ToInt(); rdungeon.Floors[i].mGroundAltSheet = parse[n + 45].ToInt(); rdungeon.Floors[i].mGroundAlt2X = parse[n + 46].ToInt(); rdungeon.Floors[i].mGroundAlt2Sheet = parse[n + 47].ToInt(); rdungeon.Floors[i].mTopLeftAltX = parse[n + 48].ToInt(); rdungeon.Floors[i].mTopLeftAltSheet = parse[n + 49].ToInt(); rdungeon.Floors[i].mTopCenterAltX = parse[n + 50].ToInt(); rdungeon.Floors[i].mTopCenterAltSheet = parse[n + 51].ToInt(); rdungeon.Floors[i].mTopRightAltX = parse[n + 52].ToInt(); rdungeon.Floors[i].mTopRightAltSheet = parse[n + 53].ToInt(); rdungeon.Floors[i].mCenterLeftAltX = parse[n + 54].ToInt(); rdungeon.Floors[i].mCenterLeftAltSheet = parse[n + 55].ToInt(); rdungeon.Floors[i].mCenterCenterAltX = parse[n + 56].ToInt(); rdungeon.Floors[i].mCenterCenterAltSheet = parse[n + 57].ToInt(); rdungeon.Floors[i].mCenterCenterAlt2X = parse[n + 58].ToInt(); rdungeon.Floors[i].mCenterCenterAlt2Sheet = parse[n + 59].ToInt(); rdungeon.Floors[i].mCenterRightAltX = parse[n + 60].ToInt(); rdungeon.Floors[i].mCenterRightAltSheet = parse[n + 61].ToInt(); rdungeon.Floors[i].mBottomLeftAltX = parse[n + 62].ToInt(); rdungeon.Floors[i].mBottomLeftAltSheet = parse[n + 63].ToInt(); rdungeon.Floors[i].mBottomCenterAltX = parse[n + 64].ToInt(); rdungeon.Floors[i].mBottomCenterAltSheet = parse[n + 65].ToInt(); rdungeon.Floors[i].mBottomRightAltX = parse[n + 66].ToInt(); rdungeon.Floors[i].mBottomRightAltSheet = parse[n + 67].ToInt(); rdungeon.Floors[i].mInnerTopLeftAltX = parse[n + 68].ToInt(); rdungeon.Floors[i].mInnerTopLeftAltSheet = parse[n + 69].ToInt(); rdungeon.Floors[i].mInnerBottomLeftAltX = parse[n + 70].ToInt(); rdungeon.Floors[i].mInnerBottomLeftAltSheet = parse[n + 71].ToInt(); rdungeon.Floors[i].mInnerTopRightAltX = parse[n + 72].ToInt(); rdungeon.Floors[i].mInnerTopRightAltSheet = parse[n + 73].ToInt(); rdungeon.Floors[i].mInnerBottomRightAltX = parse[n + 74].ToInt(); rdungeon.Floors[i].mInnerBottomRightAltSheet = parse[n + 75].ToInt(); rdungeon.Floors[i].mIsolatedWallAltX = parse[n + 76].ToInt(); rdungeon.Floors[i].mIsolatedWallAltSheet = parse[n + 77].ToInt(); rdungeon.Floors[i].mColumnTopAltX = parse[n + 78].ToInt(); rdungeon.Floors[i].mColumnTopAltSheet = parse[n + 79].ToInt(); rdungeon.Floors[i].mColumnCenterAltX = parse[n + 80].ToInt(); rdungeon.Floors[i].mColumnCenterAltSheet = parse[n + 81].ToInt(); rdungeon.Floors[i].mColumnBottomAltX = parse[n + 82].ToInt(); rdungeon.Floors[i].mColumnBottomAltSheet = parse[n + 83].ToInt(); rdungeon.Floors[i].mRowLeftAltX = parse[n + 84].ToInt(); rdungeon.Floors[i].mRowLeftAltSheet = parse[n + 85].ToInt(); rdungeon.Floors[i].mRowCenterAltX = parse[n + 86].ToInt(); rdungeon.Floors[i].mRowCenterAltSheet = parse[n + 87].ToInt(); rdungeon.Floors[i].mRowRightAltX = parse[n + 88].ToInt(); rdungeon.Floors[i].mRowRightAltSheet = parse[n + 89].ToInt(); n += 90; rdungeon.Floors[i].mWaterX = parse[n].ToInt(); rdungeon.Floors[i].mWaterSheet = parse[n + 1].ToInt(); rdungeon.Floors[i].mWaterAnimX = parse[n + 2].ToInt(); rdungeon.Floors[i].mWaterAnimSheet = parse[n + 3].ToInt(); rdungeon.Floors[i].mShoreTopLeftX = parse[n + 4].ToInt(); rdungeon.Floors[i].mShoreTopLeftSheet = parse[n + 5].ToInt(); rdungeon.Floors[i].mShoreTopRightX = parse[n + 6].ToInt(); rdungeon.Floors[i].mShoreTopRightSheet = parse[n + 7].ToInt(); rdungeon.Floors[i].mShoreBottomRightX = parse[n + 8].ToInt(); rdungeon.Floors[i].mShoreBottomRightSheet = parse[n + 9].ToInt(); rdungeon.Floors[i].mShoreBottomLeftX = parse[n + 10].ToInt(); rdungeon.Floors[i].mShoreBottomLeftSheet = parse[n + 11].ToInt(); rdungeon.Floors[i].mShoreDiagonalForwardX = parse[n + 12].ToInt(); rdungeon.Floors[i].mShoreDiagonalForwardSheet = parse[n + 13].ToInt(); rdungeon.Floors[i].mShoreDiagonalBackX = parse[n + 14].ToInt(); rdungeon.Floors[i].mShoreDiagonalBackSheet = parse[n + 15].ToInt(); rdungeon.Floors[i].mShoreTopX = parse[n + 16].ToInt(); rdungeon.Floors[i].mShoreTopSheet = parse[n + 17].ToInt(); rdungeon.Floors[i].mShoreRightX = parse[n + 18].ToInt(); rdungeon.Floors[i].mShoreRightSheet = parse[n + 19].ToInt(); rdungeon.Floors[i].mShoreBottomX = parse[n + 20].ToInt(); rdungeon.Floors[i].mShoreBottomSheet = parse[n + 21].ToInt(); rdungeon.Floors[i].mShoreLeftX = parse[n + 22].ToInt(); rdungeon.Floors[i].mShoreLeftSheet = parse[n + 23].ToInt(); rdungeon.Floors[i].mShoreVerticalX = parse[n + 24].ToInt(); rdungeon.Floors[i].mShoreVerticalSheet = parse[n + 25].ToInt(); rdungeon.Floors[i].mShoreHorizontalX = parse[n + 26].ToInt(); rdungeon.Floors[i].mShoreHorizontalSheet = parse[n + 27].ToInt(); rdungeon.Floors[i].mShoreInnerTopLeftX = parse[n + 28].ToInt(); rdungeon.Floors[i].mShoreInnerTopLeftSheet = parse[n + 29].ToInt(); rdungeon.Floors[i].mShoreInnerTopRightX = parse[n + 30].ToInt(); rdungeon.Floors[i].mShoreInnerTopRightSheet = parse[n + 31].ToInt(); rdungeon.Floors[i].mShoreInnerBottomRightX = parse[n + 32].ToInt(); rdungeon.Floors[i].mShoreInnerBottomRightSheet = parse[n + 33].ToInt(); rdungeon.Floors[i].mShoreInnerBottomLeftX = parse[n + 34].ToInt(); rdungeon.Floors[i].mShoreInnerBottomLeftSheet = parse[n + 35].ToInt(); rdungeon.Floors[i].mShoreInnerTopX = parse[n + 36].ToInt(); rdungeon.Floors[i].mShoreInnerTopSheet = parse[n + 37].ToInt(); rdungeon.Floors[i].mShoreInnerRightX = parse[n + 38].ToInt(); rdungeon.Floors[i].mShoreInnerRightSheet = parse[n + 39].ToInt(); rdungeon.Floors[i].mShoreInnerBottomX = parse[n + 40].ToInt(); rdungeon.Floors[i].mShoreInnerBottomSheet = parse[n + 41].ToInt(); rdungeon.Floors[i].mShoreInnerLeftX = parse[n + 42].ToInt(); rdungeon.Floors[i].mShoreInnerLeftSheet = parse[n + 43].ToInt(); rdungeon.Floors[i].mShoreSurroundedX = parse[n + 44].ToInt(); rdungeon.Floors[i].mShoreSurroundedSheet = parse[n + 45].ToInt(); rdungeon.Floors[i].mShoreTopLeftAnimX = parse[n + 46].ToInt(); rdungeon.Floors[i].mShoreTopLeftAnimSheet = parse[n + 47].ToInt(); rdungeon.Floors[i].mShoreTopRightAnimX = parse[n + 48].ToInt(); rdungeon.Floors[i].mShoreTopRightAnimSheet = parse[n + 49].ToInt(); rdungeon.Floors[i].mShoreBottomRightAnimX = parse[n + 50].ToInt(); rdungeon.Floors[i].mShoreBottomRightAnimSheet = parse[n + 51].ToInt(); rdungeon.Floors[i].mShoreBottomLeftAnimX = parse[n + 52].ToInt(); rdungeon.Floors[i].mShoreBottomLeftAnimSheet = parse[n + 53].ToInt(); rdungeon.Floors[i].mShoreDiagonalForwardAnimX = parse[n + 54].ToInt(); rdungeon.Floors[i].mShoreDiagonalForwardAnimSheet = parse[n + 55].ToInt(); rdungeon.Floors[i].mShoreDiagonalBackAnimX = parse[n + 56].ToInt(); rdungeon.Floors[i].mShoreDiagonalBackAnimSheet = parse[n + 57].ToInt(); rdungeon.Floors[i].mShoreTopAnimX = parse[n + 58].ToInt(); rdungeon.Floors[i].mShoreTopAnimSheet = parse[n + 59].ToInt(); rdungeon.Floors[i].mShoreRightAnimX = parse[n + 60].ToInt(); rdungeon.Floors[i].mShoreRightAnimSheet = parse[n + 61].ToInt(); rdungeon.Floors[i].mShoreBottomAnimX = parse[n + 62].ToInt(); rdungeon.Floors[i].mShoreBottomAnimSheet = parse[n + 63].ToInt(); rdungeon.Floors[i].mShoreLeftAnimX = parse[n + 64].ToInt(); rdungeon.Floors[i].mShoreLeftAnimSheet = parse[n + 65].ToInt(); rdungeon.Floors[i].mShoreVerticalAnimX = parse[n + 66].ToInt(); rdungeon.Floors[i].mShoreVerticalAnimSheet = parse[n + 67].ToInt(); rdungeon.Floors[i].mShoreHorizontalAnimX = parse[n + 68].ToInt(); rdungeon.Floors[i].mShoreHorizontalAnimSheet = parse[n + 69].ToInt(); rdungeon.Floors[i].mShoreInnerTopLeftAnimX = parse[n + 70].ToInt(); rdungeon.Floors[i].mShoreInnerTopLeftAnimSheet = parse[n + 71].ToInt(); rdungeon.Floors[i].mShoreInnerTopRightAnimX = parse[n + 72].ToInt(); rdungeon.Floors[i].mShoreInnerTopRightAnimSheet = parse[n + 73].ToInt(); rdungeon.Floors[i].mShoreInnerBottomRightAnimX = parse[n + 74].ToInt(); rdungeon.Floors[i].mShoreInnerBottomRightAnimSheet = parse[n + 75].ToInt(); rdungeon.Floors[i].mShoreInnerBottomLeftAnimX = parse[n + 76].ToInt(); rdungeon.Floors[i].mShoreInnerBottomLeftAnimSheet = parse[n + 77].ToInt(); rdungeon.Floors[i].mShoreInnerTopAnimX = parse[n + 78].ToInt(); rdungeon.Floors[i].mShoreInnerTopAnimSheet = parse[n + 79].ToInt(); rdungeon.Floors[i].mShoreInnerRightAnimX = parse[n + 80].ToInt(); rdungeon.Floors[i].mShoreInnerRightAnimSheet = parse[n + 81].ToInt(); rdungeon.Floors[i].mShoreInnerBottomAnimX = parse[n + 82].ToInt(); rdungeon.Floors[i].mShoreInnerBottomAnimSheet = parse[n + 83].ToInt(); rdungeon.Floors[i].mShoreInnerLeftAnimX = parse[n + 84].ToInt(); rdungeon.Floors[i].mShoreInnerLeftAnimSheet = parse[n + 85].ToInt(); rdungeon.Floors[i].mShoreSurroundedAnimX = parse[n + 86].ToInt(); rdungeon.Floors[i].mShoreSurroundedAnimSheet = parse[n + 87].ToInt(); n += 88; rdungeon.Floors[i].GroundTile.Type = (Enums.TileType)parse[n].ToInt(); rdungeon.Floors[i].GroundTile.Data1 = parse[n + 1].ToInt(); rdungeon.Floors[i].GroundTile.Data2 = parse[n + 2].ToInt(); rdungeon.Floors[i].GroundTile.Data3 = parse[n + 3].ToInt(); rdungeon.Floors[i].GroundTile.String1 = parse[n + 4]; rdungeon.Floors[i].GroundTile.String2 = parse[n + 5]; rdungeon.Floors[i].GroundTile.String3 = parse[n + 6]; rdungeon.Floors[i].HallTile.Type = (Enums.TileType)parse[n + 7].ToInt(); rdungeon.Floors[i].HallTile.Data1 = parse[n + 8].ToInt(); rdungeon.Floors[i].HallTile.Data2 = parse[n + 9].ToInt(); rdungeon.Floors[i].HallTile.Data3 = parse[n + 10].ToInt(); rdungeon.Floors[i].HallTile.String1 = parse[n + 11]; rdungeon.Floors[i].HallTile.String2 = parse[n + 12]; rdungeon.Floors[i].HallTile.String3 = parse[n + 13]; rdungeon.Floors[i].WaterTile.Type = (Enums.TileType)parse[n + 14].ToInt(); rdungeon.Floors[i].WaterTile.Data1 = parse[n + 15].ToInt(); rdungeon.Floors[i].WaterTile.Data2 = parse[n + 16].ToInt(); rdungeon.Floors[i].WaterTile.Data3 = parse[n + 17].ToInt(); rdungeon.Floors[i].WaterTile.String1 = parse[n + 18]; rdungeon.Floors[i].WaterTile.String2 = parse[n + 19]; rdungeon.Floors[i].WaterTile.String3 = parse[n + 20]; rdungeon.Floors[i].WallTile.Type = (Enums.TileType)parse[n + 21].ToInt(); rdungeon.Floors[i].WallTile.Data1 = parse[n + 22].ToInt(); rdungeon.Floors[i].WallTile.Data2 = parse[n + 23].ToInt(); rdungeon.Floors[i].WallTile.Data3 = parse[n + 24].ToInt(); rdungeon.Floors[i].WallTile.String1 = parse[n + 25]; rdungeon.Floors[i].WallTile.String2 = parse[n + 26]; rdungeon.Floors[i].WallTile.String3 = parse[n + 27]; rdungeon.Floors[i].NpcSpawnTime = parse[n + 28].ToInt(); rdungeon.Floors[i].NpcMin = parse[n + 29].ToInt(); rdungeon.Floors[i].NpcMax = parse[n + 30].ToInt(); n += 31; for (int item = 0; item < parse[n].ToInt(); item++) { EditableRDungeonItem newItem = new EditableRDungeonItem(); newItem.ItemNum = parse[n + item * 10 + 1].ToInt(); newItem.MinAmount = parse[n + item * 10 + 2].ToInt(); newItem.MaxAmount = parse[n + item * 10 + 3].ToInt(); newItem.AppearanceRate = parse[n + item * 10 + 4].ToInt(); newItem.StickyRate = parse[n + item * 10 + 5].ToInt(); newItem.Tag = parse[n + item * 10 + 6]; newItem.Hidden = parse[n + item * 10 + 7].ToBool(); newItem.OnGround = parse[n + item * 10 + 8].ToBool(); newItem.OnWater = parse[n + item * 10 + 9].ToBool(); newItem.OnWall = parse[n + item * 10 + 10].ToBool(); rdungeon.Floors[i].Items.Add(newItem); } n += rdungeon.Floors[i].Items.Count * 10 + 1; for (int npc = 0; npc < parse[n].ToInt(); npc++) { MapNpcSettings newNpc = new MapNpcSettings(); newNpc.NpcNum = parse[n + npc * 7 + 1].ToInt(); newNpc.MinLevel = parse[n + npc * 7 + 2].ToInt(); newNpc.MaxLevel = parse[n + npc * 7 + 3].ToInt(); newNpc.AppearanceRate = parse[n + npc * 7 + 4].ToInt(); newNpc.StartStatus = (Enums.StatusAilment)parse[n + npc * 7 + 5].ToInt(); newNpc.StartStatusCounter = parse[n + npc * 7 + 6].ToInt(); newNpc.StartStatusChance = parse[n + npc * 7 + 7].ToInt(); rdungeon.Floors[i].Npcs.Add(newNpc); } n += rdungeon.Floors[i].Npcs.Count * 7 + 1; for (int traps = 0; traps < parse[n].ToInt(); traps++) { EditableRDungeonTrap newTile = new EditableRDungeonTrap(); newTile.SpecialTile.Type = (Enums.TileType)parse[n + traps * 29 + 1].ToInt(); newTile.SpecialTile.Data1 = parse[n + traps * 29 + 2].ToInt(); newTile.SpecialTile.Data2 = parse[n + traps * 29 + 3].ToInt(); newTile.SpecialTile.Data3 = parse[n + traps * 29 + 4].ToInt(); newTile.SpecialTile.String1 = parse[n + traps * 29 + 5]; newTile.SpecialTile.String2 = parse[n + traps * 29 + 6]; newTile.SpecialTile.String3 = parse[n + traps * 29 + 7]; newTile.SpecialTile.Ground = parse[n + traps * 29 + 8].ToInt(); newTile.SpecialTile.GroundSet = parse[n + traps * 29 + 9].ToInt(); newTile.SpecialTile.GroundAnim = parse[n + traps * 29 + 10].ToInt(); newTile.SpecialTile.GroundAnimSet = parse[n + traps * 29 + 11].ToInt(); newTile.SpecialTile.Mask = parse[n + traps * 29 + 12].ToInt(); newTile.SpecialTile.MaskSet = parse[n + traps * 29 + 13].ToInt(); newTile.SpecialTile.Anim = parse[n + traps * 29 + 14].ToInt(); newTile.SpecialTile.AnimSet = parse[n + traps * 29 + 15].ToInt(); newTile.SpecialTile.Mask2 = parse[n + traps * 29 + 16].ToInt(); newTile.SpecialTile.Mask2Set = parse[n + traps * 29 + 17].ToInt(); newTile.SpecialTile.M2Anim = parse[n + traps * 29 + 18].ToInt(); newTile.SpecialTile.M2AnimSet = parse[n + traps * 29 + 19].ToInt(); newTile.SpecialTile.Fringe = parse[n + traps * 29 + 20].ToInt(); newTile.SpecialTile.FringeSet = parse[n + traps * 29 + 21].ToInt(); newTile.SpecialTile.FAnim = parse[n + traps * 29 + 22].ToInt(); newTile.SpecialTile.FAnimSet = parse[n + traps * 29 + 23].ToInt(); newTile.SpecialTile.Fringe2 = parse[n + traps * 29 + 24].ToInt(); newTile.SpecialTile.Fringe2Set = parse[n + traps * 29 + 25].ToInt(); newTile.SpecialTile.F2Anim = parse[n + traps * 29 + 26].ToInt(); newTile.SpecialTile.F2AnimSet = parse[n + traps * 29 + 27].ToInt(); newTile.SpecialTile.RDungeonMapValue = parse[n + traps * 29 + 28].ToInt(); newTile.AppearanceRate = parse[n + traps * 29 + 29].ToInt(); rdungeon.Floors[i].SpecialTiles.Add(newTile); } n += rdungeon.Floors[i].SpecialTiles.Count * 29 + 1; for (int weather = 0; weather < parse[n].ToInt(); weather++) { rdungeon.Floors[i].Weather.Add((Enums.Weather)parse[n + 1 + weather].ToInt()); } n += rdungeon.Floors[i].Weather.Count + 1; for (int chamber = 0; chamber < parse[n].ToInt(); chamber++) { EditableRDungeonChamber newChamber = new EditableRDungeonChamber(); newChamber.ChamberNum = parse[n + chamber * 4 + 1].ToInt(); newChamber.String1 = parse[n + chamber * 4 + 2]; newChamber.String2 = parse[n + chamber * 4 + 3]; newChamber.String3 = parse[n + chamber * 4 + 4]; rdungeon.Floors[i].Chambers.Add(newChamber); } n += rdungeon.Floors[i].Chambers.Count * 4 + 1; } pnlRDungeonList.Visible = false; btnEdit.Text = "Edit"; txtDungeonName.Text = rdungeon.DungeonName; if (rdungeon.Direction == Enums.Direction.Up) { optUp.Checked = true; } else { optDown.Checked = true; } nudMaxFloors.Value = rdungeon.MaxFloors; chkRecruiting.Checked = rdungeon.Recruitment; chkEXPGain.Checked = rdungeon.Exp; nudWindTimer.Value = rdungeon.WindTimer; pnlRDungeonGeneral.Visible = true; this.Size = new System.Drawing.Size(pnlRDungeonGeneral.Width, pnlRDungeonGeneral.Height); //btnGeneral.Visible = true; //btnFloors.Visible = true; //btnTerrain.Visible = true; //btnGeneral.Size = new Size((pnlRDungeonGeneral.Width - 21) / 3, 32); //btnFloors.Location = new Point((pnlRDungeonGeneral.Width - 21) / 3 + 10, 0); //btnFloors.Size = new Size((pnlRDungeonGeneral.Width - 21) / 3, 32); //btnFloors.Visible = true; //btnTerrain.Location = new Point((pnlRDungeonGeneral.Width - 21) / 3 * 2 + 10, 0); //btnTerrain.Size = new Size((pnlRDungeonGeneral.Width - 21) / 3, 32); //btnGeneral.Selected = true; //this.TitleBar.Text = "General Random Dungeon Options"; }
void btnLoadFloor_Click(object sender, SdlDotNet.Widgets.MouseButtonEventArgs e) { for (int i = rdungeon.Floors.Count; i < nudMaxFloors.Value; i++) { rdungeon.Floors.Add(new EditableRDungeonFloor()); } if (nudFirstFloor.Value > nudMaxFloors.Value) { lblSaveLoadMessage.Text = "Cannot load floor above the maximum."; return; } EditableRDungeonFloor loadingfloor = rdungeon.Floors[nudFirstFloor.Value - 1]; if (pnlRDungeonFloorSettingSelection.Visible == true) { LoadpnlRDungeonStructure(); LoadpnlRDungeonLandTiles(); LoadpnlRDungeonLandAltTiles(); LoadpnlRDungeonWaterTiles(); LoadpnlRDungeonWaterAnimTiles(); LoadpnlRDungeonAttributes(); LoadpnlRDungeonItems(); LoadpnlRDungeonNpcs(); LoadpnlRDungeonTraps(); LoadpnlRDungeonWeather(); LoadpnlRDungeonGoal(); LoadpnlRDungeonChambers(); LoadpnlRDungeonMisc(); //Structure nudTrapMin.Value = loadingfloor.TrapMin; nudTrapMax.Value = loadingfloor.TrapMax; nudItemMin.Value = loadingfloor.ItemMin; nudItemMax.Value = loadingfloor.ItemMax; nudRoomWidthMin.Value = loadingfloor.RoomWidthMin; nudRoomWidthMax.Value = loadingfloor.RoomWidthMax; nudRoomLengthMin.Value = loadingfloor.RoomLengthMin; nudRoomLengthMax.Value = loadingfloor.RoomLengthMax; nudHallTurnMin.Value = loadingfloor.HallTurnMin; nudHallTurnMax.Value = loadingfloor.HallTurnMax; nudHallVarMin.Value = loadingfloor.HallVarMin; nudHallVarMax.Value = loadingfloor.HallVarMax; nudWaterFrequency.Value = loadingfloor.WaterFrequency; nudCraters.Value = loadingfloor.Craters; nudCraterMinLength.Value = loadingfloor.CraterMinLength; nudCraterMaxLength.Value = loadingfloor.CraterMaxLength; chkCraterFuzzy.Checked = loadingfloor.CraterFuzzy; //Land Tiles landTileNumbers[0, 19] = loadingfloor.StairsSheet; landTileNumbers[0, 16] = loadingfloor.mGroundSheet; landTileNumbers[0, 10] = loadingfloor.mTopLeftSheet; landTileNumbers[0, 6] = loadingfloor.mTopCenterSheet; landTileNumbers[0, 2] = loadingfloor.mTopRightSheet; landTileNumbers[0, 9] = loadingfloor.mCenterLeftSheet; landTileNumbers[0, 5] = loadingfloor.mCenterCenterSheet; landTileNumbers[0, 1] = loadingfloor.mCenterRightSheet; landTileNumbers[0, 8] = loadingfloor.mBottomLeftSheet; landTileNumbers[0, 4] = loadingfloor.mBottomCenterSheet; landTileNumbers[0, 0] = loadingfloor.mBottomRightSheet; landTileNumbers[0, 17] = loadingfloor.mInnerTopLeftSheet; landTileNumbers[0, 20] = loadingfloor.mInnerTopRightSheet; landTileNumbers[0, 18] = loadingfloor.mInnerBottomLeftSheet; landTileNumbers[0, 21] = loadingfloor.mInnerBottomRightSheet; landTileNumbers[0, 15] = loadingfloor.mIsolatedWallSheet; landTileNumbers[0, 12] = loadingfloor.mColumnTopSheet; landTileNumbers[0, 13] = loadingfloor.mColumnCenterSheet; landTileNumbers[0, 14] = loadingfloor.mColumnBottomSheet; landTileNumbers[0, 3] = loadingfloor.mRowLeftSheet; landTileNumbers[0, 7] = loadingfloor.mRowCenterSheet; landTileNumbers[0, 11] = loadingfloor.mRowRightSheet; landTileNumbers[1, 19] = loadingfloor.StairsX; landTileNumbers[1, 16] = loadingfloor.mGroundX; landTileNumbers[1, 10] = loadingfloor.mTopLeftX; landTileNumbers[1, 6] = loadingfloor.mTopCenterX; landTileNumbers[1, 2] = loadingfloor.mTopRightX; landTileNumbers[1, 9] = loadingfloor.mCenterLeftX; landTileNumbers[1, 5] = loadingfloor.mCenterCenterX; landTileNumbers[1, 1] = loadingfloor.mCenterRightX; landTileNumbers[1, 8] = loadingfloor.mBottomLeftX; landTileNumbers[1, 4] = loadingfloor.mBottomCenterX; landTileNumbers[1, 0] = loadingfloor.mBottomRightX; landTileNumbers[1, 17] = loadingfloor.mInnerTopLeftX; landTileNumbers[1, 20] = loadingfloor.mInnerTopRightX; landTileNumbers[1, 18] = loadingfloor.mInnerBottomLeftX; landTileNumbers[1, 21] = loadingfloor.mInnerBottomRightX; landTileNumbers[1, 15] = loadingfloor.mIsolatedWallX; landTileNumbers[1, 12] = loadingfloor.mColumnTopX; landTileNumbers[1, 13] = loadingfloor.mColumnCenterX; landTileNumbers[1, 14] = loadingfloor.mColumnBottomX; landTileNumbers[1, 3] = loadingfloor.mRowLeftX; landTileNumbers[1, 7] = loadingfloor.mRowCenterX; landTileNumbers[1, 11] = loadingfloor.mRowRightX; for (int i = 0; i < 22; i++) { picLandTileset[i].Image = Graphics.GraphicsManager.Tiles[landTileNumbers[0, i]][landTileNumbers[1, i]]; } //Land Alt Tiles landAltTileNumbers[0, 19] = loadingfloor.mGroundAlt2Sheet; landAltTileNumbers[0, 16] = loadingfloor.mGroundAltSheet; landAltTileNumbers[0, 10] = loadingfloor.mTopLeftAltSheet; landAltTileNumbers[0, 6] = loadingfloor.mTopCenterAltSheet; landAltTileNumbers[0, 2] = loadingfloor.mTopRightAltSheet; landAltTileNumbers[0, 9] = loadingfloor.mCenterLeftAltSheet; landAltTileNumbers[0, 5] = loadingfloor.mCenterCenterAltSheet; landAltTileNumbers[0, 22] = loadingfloor.mCenterCenterAlt2Sheet; landAltTileNumbers[0, 1] = loadingfloor.mCenterRightAltSheet; landAltTileNumbers[0, 8] = loadingfloor.mBottomLeftAltSheet; landAltTileNumbers[0, 4] = loadingfloor.mBottomCenterAltSheet; landAltTileNumbers[0, 0] = loadingfloor.mBottomRightAltSheet; landAltTileNumbers[0, 17] = loadingfloor.mInnerTopLeftAltSheet; landAltTileNumbers[0, 20] = loadingfloor.mInnerTopRightAltSheet; landAltTileNumbers[0, 18] = loadingfloor.mInnerBottomLeftAltSheet; landAltTileNumbers[0, 21] = loadingfloor.mInnerBottomRightAltSheet; landAltTileNumbers[0, 15] = loadingfloor.mIsolatedWallAltSheet; landAltTileNumbers[0, 12] = loadingfloor.mColumnTopAltSheet; landAltTileNumbers[0, 13] = loadingfloor.mColumnCenterAltSheet; landAltTileNumbers[0, 14] = loadingfloor.mColumnBottomAltSheet; landAltTileNumbers[0, 3] = loadingfloor.mRowLeftAltSheet; landAltTileNumbers[0, 7] = loadingfloor.mRowCenterAltSheet; landAltTileNumbers[0, 11] = loadingfloor.mRowRightAltSheet; landAltTileNumbers[1, 19] = loadingfloor.mGroundAlt2X; landAltTileNumbers[1, 16] = loadingfloor.mGroundAltX; landAltTileNumbers[1, 10] = loadingfloor.mTopLeftAltX; landAltTileNumbers[1, 6] = loadingfloor.mTopCenterAltX; landAltTileNumbers[1, 2] = loadingfloor.mTopRightAltX; landAltTileNumbers[1, 9] = loadingfloor.mCenterLeftAltX; landAltTileNumbers[1, 5] = loadingfloor.mCenterCenterAltX; landAltTileNumbers[1, 22] = loadingfloor.mCenterCenterAlt2X; landAltTileNumbers[1, 1] = loadingfloor.mCenterRightAltX; landAltTileNumbers[1, 8] = loadingfloor.mBottomLeftAltX; landAltTileNumbers[1, 4] = loadingfloor.mBottomCenterAltX; landAltTileNumbers[1, 0] = loadingfloor.mBottomRightAltX; landAltTileNumbers[1, 17] = loadingfloor.mInnerTopLeftAltX; landAltTileNumbers[1, 20] = loadingfloor.mInnerTopRightAltX; landAltTileNumbers[1, 18] = loadingfloor.mInnerBottomLeftAltX; landAltTileNumbers[1, 21] = loadingfloor.mInnerBottomRightAltX; landAltTileNumbers[1, 15] = loadingfloor.mIsolatedWallAltX; landAltTileNumbers[1, 12] = loadingfloor.mColumnTopAltX; landAltTileNumbers[1, 13] = loadingfloor.mColumnCenterAltX; landAltTileNumbers[1, 14] = loadingfloor.mColumnBottomAltX; landAltTileNumbers[1, 3] = loadingfloor.mRowLeftAltX; landAltTileNumbers[1, 7] = loadingfloor.mRowCenterAltX; landAltTileNumbers[1, 11] = loadingfloor.mRowRightAltX; for (int i = 0; i < 23; i++) { picLandAltTileset[i].Image = Graphics.GraphicsManager.Tiles[landAltTileNumbers[0, i]][landAltTileNumbers[1, i]]; } //Water Tiles waterTileNumbers[0, 15] = loadingfloor.mShoreSurroundedSheet; waterTileNumbers[0, 0] = loadingfloor.mShoreInnerTopLeftSheet; waterTileNumbers[0, 4] = loadingfloor.mShoreTopSheet; waterTileNumbers[0, 8] = loadingfloor.mShoreInnerTopRightSheet; waterTileNumbers[0, 1] = loadingfloor.mShoreLeftSheet; waterTileNumbers[0, 5] = loadingfloor.mWaterSheet; waterTileNumbers[0, 9] = loadingfloor.mShoreRightSheet; waterTileNumbers[0, 2] = loadingfloor.mShoreInnerBottomLeftSheet; waterTileNumbers[0, 6] = loadingfloor.mShoreBottomSheet; waterTileNumbers[0, 10] = loadingfloor.mShoreInnerBottomRightSheet; waterTileNumbers[0, 16] = loadingfloor.mShoreTopLeftSheet; waterTileNumbers[0, 19] = loadingfloor.mShoreTopRightSheet; waterTileNumbers[0, 17] = loadingfloor.mShoreBottomLeftSheet; waterTileNumbers[0, 20] = loadingfloor.mShoreBottomRightSheet; waterTileNumbers[0, 18] = loadingfloor.mShoreDiagonalForwardSheet; waterTileNumbers[0, 21] = loadingfloor.mShoreDiagonalBackSheet; waterTileNumbers[0, 12] = loadingfloor.mShoreInnerTopSheet; waterTileNumbers[0, 13] = loadingfloor.mShoreVerticalSheet; waterTileNumbers[0, 14] = loadingfloor.mShoreInnerBottomSheet; waterTileNumbers[0, 3] = loadingfloor.mShoreInnerLeftSheet; waterTileNumbers[0, 7] = loadingfloor.mShoreHorizontalSheet; waterTileNumbers[0, 11] = loadingfloor.mShoreInnerRightSheet; waterTileNumbers[1, 15] = loadingfloor.mShoreSurroundedX; waterTileNumbers[1, 0] = loadingfloor.mShoreInnerTopLeftX; waterTileNumbers[1, 4] = loadingfloor.mShoreTopX; waterTileNumbers[1, 8] = loadingfloor.mShoreInnerTopRightX; waterTileNumbers[1, 1] = loadingfloor.mShoreLeftX; waterTileNumbers[1, 5] = loadingfloor.mWaterX; waterTileNumbers[1, 9] = loadingfloor.mShoreRightX; waterTileNumbers[1, 2] = loadingfloor.mShoreInnerBottomLeftX; waterTileNumbers[1, 6] = loadingfloor.mShoreBottomX; waterTileNumbers[1, 10] = loadingfloor.mShoreInnerBottomRightX; waterTileNumbers[1, 16] = loadingfloor.mShoreTopLeftX; waterTileNumbers[1, 19] = loadingfloor.mShoreTopRightX; waterTileNumbers[1, 17] = loadingfloor.mShoreBottomLeftX; waterTileNumbers[1, 20] = loadingfloor.mShoreBottomRightX; waterTileNumbers[1, 18] = loadingfloor.mShoreDiagonalForwardX; waterTileNumbers[1, 21] = loadingfloor.mShoreDiagonalBackX; waterTileNumbers[1, 12] = loadingfloor.mShoreInnerTopX; waterTileNumbers[1, 13] = loadingfloor.mShoreVerticalX; waterTileNumbers[1, 14] = loadingfloor.mShoreInnerBottomX; waterTileNumbers[1, 3] = loadingfloor.mShoreInnerLeftX; waterTileNumbers[1, 7] = loadingfloor.mShoreHorizontalX; waterTileNumbers[1, 11] = loadingfloor.mShoreInnerRightX; for (int i = 0; i < 22; i++) { picWaterTileset[i].Image = Graphics.GraphicsManager.Tiles[waterTileNumbers[0, i]][waterTileNumbers[1, i]]; } //Water Anim Tiles waterAnimTileNumbers[0, 15] = loadingfloor.mShoreSurroundedAnimSheet; waterAnimTileNumbers[0, 0] = loadingfloor.mShoreInnerTopLeftAnimSheet; waterAnimTileNumbers[0, 4] = loadingfloor.mShoreTopAnimSheet; waterAnimTileNumbers[0, 8] = loadingfloor.mShoreInnerTopRightAnimSheet; waterAnimTileNumbers[0, 1] = loadingfloor.mShoreLeftAnimSheet; waterAnimTileNumbers[0, 5] = loadingfloor.mWaterAnimSheet; waterAnimTileNumbers[0, 9] = loadingfloor.mShoreRightAnimSheet; waterAnimTileNumbers[0, 2] = loadingfloor.mShoreInnerBottomLeftAnimSheet; waterAnimTileNumbers[0, 6] = loadingfloor.mShoreBottomAnimSheet; waterAnimTileNumbers[0, 10] = loadingfloor.mShoreInnerBottomRightAnimSheet; waterAnimTileNumbers[0, 16] = loadingfloor.mShoreTopLeftAnimSheet; waterAnimTileNumbers[0, 19] = loadingfloor.mShoreTopRightAnimSheet; waterAnimTileNumbers[0, 17] = loadingfloor.mShoreBottomLeftAnimSheet; waterAnimTileNumbers[0, 20] = loadingfloor.mShoreBottomRightAnimSheet; waterAnimTileNumbers[0, 18] = loadingfloor.mShoreDiagonalForwardAnimSheet; waterAnimTileNumbers[0, 21] = loadingfloor.mShoreDiagonalBackAnimSheet; waterAnimTileNumbers[0, 12] = loadingfloor.mShoreInnerTopAnimSheet; waterAnimTileNumbers[0, 13] = loadingfloor.mShoreVerticalAnimSheet; waterAnimTileNumbers[0, 14] = loadingfloor.mShoreInnerBottomAnimSheet; waterAnimTileNumbers[0, 3] = loadingfloor.mShoreInnerLeftAnimSheet; waterAnimTileNumbers[0, 7] = loadingfloor.mShoreHorizontalAnimSheet; waterAnimTileNumbers[0, 11] = loadingfloor.mShoreInnerRightAnimSheet; waterAnimTileNumbers[1, 15] = loadingfloor.mShoreSurroundedAnimX; waterAnimTileNumbers[1, 0] = loadingfloor.mShoreInnerTopLeftAnimX; waterAnimTileNumbers[1, 4] = loadingfloor.mShoreTopAnimX; waterAnimTileNumbers[1, 8] = loadingfloor.mShoreInnerTopRightAnimX; waterAnimTileNumbers[1, 1] = loadingfloor.mShoreLeftAnimX; waterAnimTileNumbers[1, 5] = loadingfloor.mWaterAnimX; waterAnimTileNumbers[1, 9] = loadingfloor.mShoreRightAnimX; waterAnimTileNumbers[1, 2] = loadingfloor.mShoreInnerBottomLeftAnimX; waterAnimTileNumbers[1, 6] = loadingfloor.mShoreBottomAnimX; waterAnimTileNumbers[1, 10] = loadingfloor.mShoreInnerBottomRightAnimX; waterAnimTileNumbers[1, 16] = loadingfloor.mShoreTopLeftAnimX; waterAnimTileNumbers[1, 19] = loadingfloor.mShoreTopRightAnimX; waterAnimTileNumbers[1, 17] = loadingfloor.mShoreBottomLeftAnimX; waterAnimTileNumbers[1, 20] = loadingfloor.mShoreBottomRightAnimX; waterAnimTileNumbers[1, 18] = loadingfloor.mShoreDiagonalForwardAnimX; waterAnimTileNumbers[1, 21] = loadingfloor.mShoreDiagonalBackAnimX; waterAnimTileNumbers[1, 12] = loadingfloor.mShoreInnerTopAnimX; waterAnimTileNumbers[1, 13] = loadingfloor.mShoreVerticalAnimX; waterAnimTileNumbers[1, 14] = loadingfloor.mShoreInnerBottomAnimX; waterAnimTileNumbers[1, 3] = loadingfloor.mShoreInnerLeftAnimX; waterAnimTileNumbers[1, 7] = loadingfloor.mShoreHorizontalAnimX; waterAnimTileNumbers[1, 11] = loadingfloor.mShoreInnerRightAnimX; for (int i = 0; i < 22; i++) { picWaterAnimTileset[i].Image = Graphics.GraphicsManager.Tiles[waterAnimTileNumbers[0, i]][waterAnimTileNumbers[1, i]]; } //Attributes cbGroundType.SelectItem((int)loadingfloor.GroundTile.Type); nudGroundData1.Value = loadingfloor.GroundTile.Data1; nudGroundData2.Value = loadingfloor.GroundTile.Data2; nudGroundData3.Value = loadingfloor.GroundTile.Data3; txtGroundString1.Text = loadingfloor.GroundTile.String1; txtGroundString2.Text = loadingfloor.GroundTile.String2; txtGroundString3.Text = loadingfloor.GroundTile.String3; cbHallType.SelectItem((int)loadingfloor.HallTile.Type); nudHallData1.Value = loadingfloor.HallTile.Data1; nudHallData2.Value = loadingfloor.HallTile.Data2; nudHallData3.Value = loadingfloor.HallTile.Data3; txtHallString1.Text = loadingfloor.HallTile.String1; txtHallString2.Text = loadingfloor.HallTile.String2; txtHallString3.Text = loadingfloor.HallTile.String3; cbWaterType.SelectItem((int)loadingfloor.WaterTile.Type); nudWaterData1.Value = loadingfloor.WaterTile.Data1; nudWaterData2.Value = loadingfloor.WaterTile.Data2; nudWaterData3.Value = loadingfloor.WaterTile.Data3; txtWaterString1.Text = loadingfloor.WaterTile.String1; txtWaterString2.Text = loadingfloor.WaterTile.String2; txtWaterString3.Text = loadingfloor.WaterTile.String3; cbWallType.SelectItem((int)loadingfloor.WallTile.Type); nudWallData1.Value = loadingfloor.WallTile.Data1; nudWallData2.Value = loadingfloor.WallTile.Data2; nudWallData3.Value = loadingfloor.WallTile.Data3; txtWallString1.Text = loadingfloor.WallTile.String1; txtWallString2.Text = loadingfloor.WallTile.String2; txtWallString3.Text = loadingfloor.WallTile.String3; //Items itemList.Clear(); lbxItems.Items.Clear(); for (int item = 0; item < loadingfloor.Items.Count; item++) { EditableRDungeonItem newItem = new EditableRDungeonItem(); newItem.ItemNum = loadingfloor.Items[item].ItemNum; newItem.MinAmount = loadingfloor.Items[item].MinAmount; newItem.MaxAmount = loadingfloor.Items[item].MaxAmount; newItem.AppearanceRate = loadingfloor.Items[item].AppearanceRate; newItem.StickyRate = loadingfloor.Items[item].StickyRate; newItem.Tag = loadingfloor.Items[item].Tag; newItem.Hidden = loadingfloor.Items[item].Hidden; newItem.OnGround = loadingfloor.Items[item].OnGround; newItem.OnWater = loadingfloor.Items[item].OnWater; newItem.OnWall = loadingfloor.Items[item].OnWall; itemList.Add(newItem); lbxItems.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (item + 1) + ": (" + newItem.AppearanceRate + "%) " + newItem.MinAmount + "-" + newItem.MaxAmount + " " + Items.ItemHelper.Items[newItem.ItemNum].Name + " (" + newItem.StickyRate + "% Sticky)")); } //Npcs nudNpcSpawnTime.Value = loadingfloor.NpcSpawnTime; nudNpcMin.Value = loadingfloor.NpcMin; nudNpcMax.Value = loadingfloor.NpcMax; npcList.Clear(); lbxNpcs.Items.Clear(); for (int npc = 0; npc < loadingfloor.Npcs.Count; npc++) { MapNpcSettings newNpc = new MapNpcSettings(); newNpc.NpcNum = loadingfloor.Npcs[npc].NpcNum; newNpc.MinLevel = loadingfloor.Npcs[npc].MinLevel; newNpc.MaxLevel = loadingfloor.Npcs[npc].MaxLevel; newNpc.AppearanceRate = loadingfloor.Npcs[npc].AppearanceRate; newNpc.StartStatus = loadingfloor.Npcs[npc].StartStatus; newNpc.StartStatusCounter = loadingfloor.Npcs[npc].StartStatusCounter; newNpc.StartStatusChance = loadingfloor.Npcs[npc].StartStatusChance; npcList.Add(newNpc); lbxNpcs.Items.Add(new ListBoxTextItem(Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10), (npc + 1) + ": " + "(" + newNpc.AppearanceRate + "%) " + "Lv." + newNpc.MinLevel + "-" + newNpc.MaxLevel + " " + Npc.NpcHelper.Npcs[newNpc.NpcNum].Name + " [" + newNpc.StartStatusChance + "% " + newNpc.StartStatus.ToString() + "]")); } //Traps trapList.Clear(); lbxTraps.Items.Clear(); for (int traps = 0; traps < loadingfloor.SpecialTiles.Count; traps++) { EditableRDungeonTrap newTile = new EditableRDungeonTrap(); newTile.SpecialTile.Ground = loadingfloor.SpecialTiles[traps].SpecialTile.Ground; newTile.SpecialTile.GroundAnim = loadingfloor.SpecialTiles[traps].SpecialTile.GroundAnim; newTile.SpecialTile.Mask = loadingfloor.SpecialTiles[traps].SpecialTile.Mask; newTile.SpecialTile.Anim = loadingfloor.SpecialTiles[traps].SpecialTile.Anim; newTile.SpecialTile.Mask2 = loadingfloor.SpecialTiles[traps].SpecialTile.Mask2; newTile.SpecialTile.M2Anim = loadingfloor.SpecialTiles[traps].SpecialTile.M2Anim; newTile.SpecialTile.Fringe = loadingfloor.SpecialTiles[traps].SpecialTile.Fringe; newTile.SpecialTile.FAnim = loadingfloor.SpecialTiles[traps].SpecialTile.FAnim; newTile.SpecialTile.Fringe2 = loadingfloor.SpecialTiles[traps].SpecialTile.Fringe2; newTile.SpecialTile.F2Anim = loadingfloor.SpecialTiles[traps].SpecialTile.F2Anim; newTile.SpecialTile.GroundSet = loadingfloor.SpecialTiles[traps].SpecialTile.GroundSet; newTile.SpecialTile.GroundAnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.GroundAnimSet; newTile.SpecialTile.MaskSet = loadingfloor.SpecialTiles[traps].SpecialTile.MaskSet; newTile.SpecialTile.AnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.AnimSet; newTile.SpecialTile.Mask2Set = loadingfloor.SpecialTiles[traps].SpecialTile.Mask2Set; newTile.SpecialTile.M2AnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.M2AnimSet; newTile.SpecialTile.FringeSet = loadingfloor.SpecialTiles[traps].SpecialTile.FringeSet; newTile.SpecialTile.FAnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.FAnimSet; newTile.SpecialTile.Fringe2Set = loadingfloor.SpecialTiles[traps].SpecialTile.Fringe2Set; newTile.SpecialTile.F2AnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.F2AnimSet; newTile.SpecialTile.Type = loadingfloor.SpecialTiles[traps].SpecialTile.Type; newTile.SpecialTile.Data1 = loadingfloor.SpecialTiles[traps].SpecialTile.Data1; newTile.SpecialTile.Data2 = loadingfloor.SpecialTiles[traps].SpecialTile.Data2; newTile.SpecialTile.Data3 = loadingfloor.SpecialTiles[traps].SpecialTile.Data3; newTile.SpecialTile.String1 = loadingfloor.SpecialTiles[traps].SpecialTile.String1; newTile.SpecialTile.String2 = loadingfloor.SpecialTiles[traps].SpecialTile.String2; newTile.SpecialTile.String3 = loadingfloor.SpecialTiles[traps].SpecialTile.String3; newTile.AppearanceRate = loadingfloor.SpecialTiles[traps].AppearanceRate; trapList.Add(newTile); lbxTraps.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (traps + 1) + ": " + newTile.SpecialTile.Type + "/" + newTile.SpecialTile.Data1 + "/" + newTile.SpecialTile.Data2 + "/" + newTile.SpecialTile.Data3)); } //Weather lbxWeather.Items.Clear(); for (int weather = 0; weather < loadingfloor.Weather.Count; weather++) { lbxWeather.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (weather + 1) + ":" + (int)loadingfloor.Weather[weather] + ": " + Enum.GetName(typeof(Enums.Weather), loadingfloor.Weather[weather]))); } //Goal switch (loadingfloor.GoalType) { case Enums.RFloorGoalType.NextFloor: { optNextFloor.Checked = true; } break; case Enums.RFloorGoalType.Map: { optMap.Checked = true; } break; case Enums.RFloorGoalType.Scripted: { optScripted.Checked = true; } break; default: { optNextFloor.Checked = true; } break; } nudData1.Value = loadingfloor.GoalMap; nudData2.Value = loadingfloor.GoalX; nudData3.Value = loadingfloor.GoalY; //chambers chamberList.Clear(); lbxChambers.Items.Clear(); for (int chamber = 0; chamber < loadingfloor.Chambers.Count; chamber++) { EditableRDungeonChamber newChamber = new EditableRDungeonChamber(); newChamber.ChamberNum = loadingfloor.Chambers[chamber].ChamberNum; newChamber.String1 = loadingfloor.Chambers[chamber].String1; newChamber.String2 = loadingfloor.Chambers[chamber].String2; newChamber.String3 = loadingfloor.Chambers[chamber].String3; chamberList.Add(newChamber); lbxChambers.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "#" + loadingfloor.Chambers[chamber].ChamberNum + "/" + loadingfloor.Chambers[chamber].String1 + "/" + loadingfloor.Chambers[chamber].String2 + "/" + loadingfloor.Chambers[chamber].String3)); } //Misc nudDarkness.Value = loadingfloor.Darkness; if (loadingfloor.Music == "") { lbxMusic.SelectItem(0); } else { for (int i = 0; i < lbxMusic.Items.Count; i++) { if (lbxMusic.Items[i].TextIdentifier == loadingfloor.Music) { lbxMusic.SelectItem(i); } } } lblSaveLoadMessage.Text = "All settings loaded"; } else if (pnlRDungeonStructure != null && pnlRDungeonStructure.Visible == true) { nudTrapMin.Value = loadingfloor.TrapMin; nudTrapMax.Value = loadingfloor.TrapMax; nudItemMin.Value = loadingfloor.ItemMin; nudItemMax.Value = loadingfloor.ItemMax; nudRoomWidthMin.Value = loadingfloor.RoomWidthMin; nudRoomWidthMax.Value = loadingfloor.RoomWidthMax; nudRoomLengthMin.Value = loadingfloor.RoomLengthMin; nudRoomLengthMax.Value = loadingfloor.RoomLengthMax; nudHallTurnMin.Value = loadingfloor.HallTurnMin; nudHallTurnMax.Value = loadingfloor.HallTurnMax; nudHallVarMin.Value = loadingfloor.HallVarMin; nudHallVarMax.Value = loadingfloor.HallVarMax; nudWaterFrequency.Value = loadingfloor.WaterFrequency; nudCraters.Value = loadingfloor.Craters; nudCraterMinLength.Value = loadingfloor.CraterMinLength; nudCraterMaxLength.Value = loadingfloor.CraterMaxLength; chkCraterFuzzy.Checked = loadingfloor.CraterFuzzy; lblSaveLoadMessage.Text = "Structure settings loaded"; } else if (pnlRDungeonLandTiles != null && pnlRDungeonLandTiles.Visible == true) { landTileNumbers[0, 19] = loadingfloor.StairsSheet; landTileNumbers[0, 16] = loadingfloor.mGroundSheet; landTileNumbers[0, 10] = loadingfloor.mTopLeftSheet; landTileNumbers[0, 6] = loadingfloor.mTopCenterSheet; landTileNumbers[0, 2] = loadingfloor.mTopRightSheet; landTileNumbers[0, 9] = loadingfloor.mCenterLeftSheet; landTileNumbers[0, 5] = loadingfloor.mCenterCenterSheet; landTileNumbers[0, 1] = loadingfloor.mCenterRightSheet; landTileNumbers[0, 8] = loadingfloor.mBottomLeftSheet; landTileNumbers[0, 4] = loadingfloor.mBottomCenterSheet; landTileNumbers[0, 0] = loadingfloor.mBottomRightSheet; landTileNumbers[0, 17] = loadingfloor.mInnerTopLeftSheet; landTileNumbers[0, 20] = loadingfloor.mInnerTopRightSheet; landTileNumbers[0, 18] = loadingfloor.mInnerBottomLeftSheet; landTileNumbers[0, 21] = loadingfloor.mInnerBottomRightSheet; landTileNumbers[0, 15] = loadingfloor.mIsolatedWallSheet; landTileNumbers[0, 12] = loadingfloor.mColumnTopSheet; landTileNumbers[0, 13] = loadingfloor.mColumnCenterSheet; landTileNumbers[0, 14] = loadingfloor.mColumnBottomSheet; landTileNumbers[0, 3] = loadingfloor.mRowLeftSheet; landTileNumbers[0, 7] = loadingfloor.mRowCenterSheet; landTileNumbers[0, 11] = loadingfloor.mRowRightSheet; landTileNumbers[1, 19] = loadingfloor.StairsX; landTileNumbers[1, 16] = loadingfloor.mGroundX; landTileNumbers[1, 10] = loadingfloor.mTopLeftX; landTileNumbers[1, 6] = loadingfloor.mTopCenterX; landTileNumbers[1, 2] = loadingfloor.mTopRightX; landTileNumbers[1, 9] = loadingfloor.mCenterLeftX; landTileNumbers[1, 5] = loadingfloor.mCenterCenterX; landTileNumbers[1, 1] = loadingfloor.mCenterRightX; landTileNumbers[1, 8] = loadingfloor.mBottomLeftX; landTileNumbers[1, 4] = loadingfloor.mBottomCenterX; landTileNumbers[1, 0] = loadingfloor.mBottomRightX; landTileNumbers[1, 17] = loadingfloor.mInnerTopLeftX; landTileNumbers[1, 20] = loadingfloor.mInnerTopRightX; landTileNumbers[1, 18] = loadingfloor.mInnerBottomLeftX; landTileNumbers[1, 21] = loadingfloor.mInnerBottomRightX; landTileNumbers[1, 15] = loadingfloor.mIsolatedWallX; landTileNumbers[1, 12] = loadingfloor.mColumnTopX; landTileNumbers[1, 13] = loadingfloor.mColumnCenterX; landTileNumbers[1, 14] = loadingfloor.mColumnBottomX; landTileNumbers[1, 3] = loadingfloor.mRowLeftX; landTileNumbers[1, 7] = loadingfloor.mRowCenterX; landTileNumbers[1, 11] = loadingfloor.mRowRightX; for (int i = 0; i < 22; i++) { picLandTileset[i].Image = Graphics.GraphicsManager.Tiles[landTileNumbers[0, i]][landTileNumbers[1, i]]; } lblSaveLoadMessage.Text = "Land Tile settings loaded"; } else if (pnlRDungeonLandAltTiles != null && pnlRDungeonLandAltTiles.Visible == true) { landAltTileNumbers[0, 19] = loadingfloor.mGroundAlt2Sheet; landAltTileNumbers[0, 16] = loadingfloor.mGroundAltSheet; landAltTileNumbers[0, 10] = loadingfloor.mTopLeftAltSheet; landAltTileNumbers[0, 6] = loadingfloor.mTopCenterAltSheet; landAltTileNumbers[0, 2] = loadingfloor.mTopRightAltSheet; landAltTileNumbers[0, 9] = loadingfloor.mCenterLeftAltSheet; landAltTileNumbers[0, 5] = loadingfloor.mCenterCenterAltSheet; landAltTileNumbers[0, 22] = loadingfloor.mCenterCenterAlt2Sheet; landAltTileNumbers[0, 1] = loadingfloor.mCenterRightAltSheet; landAltTileNumbers[0, 8] = loadingfloor.mBottomLeftAltSheet; landAltTileNumbers[0, 4] = loadingfloor.mBottomCenterAltSheet; landAltTileNumbers[0, 0] = loadingfloor.mBottomRightAltSheet; landAltTileNumbers[0, 17] = loadingfloor.mInnerTopLeftAltSheet; landAltTileNumbers[0, 20] = loadingfloor.mInnerTopRightAltSheet; landAltTileNumbers[0, 18] = loadingfloor.mInnerBottomLeftAltSheet; landAltTileNumbers[0, 21] = loadingfloor.mInnerBottomRightAltSheet; landAltTileNumbers[0, 15] = loadingfloor.mIsolatedWallAltSheet; landAltTileNumbers[0, 12] = loadingfloor.mColumnTopAltSheet; landAltTileNumbers[0, 13] = loadingfloor.mColumnCenterAltSheet; landAltTileNumbers[0, 14] = loadingfloor.mColumnBottomAltSheet; landAltTileNumbers[0, 3] = loadingfloor.mRowLeftAltSheet; landAltTileNumbers[0, 7] = loadingfloor.mRowCenterAltSheet; landAltTileNumbers[0, 11] = loadingfloor.mRowRightAltSheet; landAltTileNumbers[1, 19] = loadingfloor.mGroundAlt2X; landAltTileNumbers[1, 16] = loadingfloor.mGroundAltX; landAltTileNumbers[1, 10] = loadingfloor.mTopLeftAltX; landAltTileNumbers[1, 6] = loadingfloor.mTopCenterAltX; landAltTileNumbers[1, 2] = loadingfloor.mTopRightAltX; landAltTileNumbers[1, 9] = loadingfloor.mCenterLeftAltX; landAltTileNumbers[1, 5] = loadingfloor.mCenterCenterAltX; landAltTileNumbers[1, 22] = loadingfloor.mCenterCenterAlt2X; landAltTileNumbers[1, 1] = loadingfloor.mCenterRightAltX; landAltTileNumbers[1, 8] = loadingfloor.mBottomLeftAltX; landAltTileNumbers[1, 4] = loadingfloor.mBottomCenterAltX; landAltTileNumbers[1, 0] = loadingfloor.mBottomRightAltX; landAltTileNumbers[1, 17] = loadingfloor.mInnerTopLeftAltX; landAltTileNumbers[1, 20] = loadingfloor.mInnerTopRightAltX; landAltTileNumbers[1, 18] = loadingfloor.mInnerBottomLeftAltX; landAltTileNumbers[1, 21] = loadingfloor.mInnerBottomRightAltX; landAltTileNumbers[1, 15] = loadingfloor.mIsolatedWallAltX; landAltTileNumbers[1, 12] = loadingfloor.mColumnTopAltX; landAltTileNumbers[1, 13] = loadingfloor.mColumnCenterAltX; landAltTileNumbers[1, 14] = loadingfloor.mColumnBottomAltX; landAltTileNumbers[1, 3] = loadingfloor.mRowLeftAltX; landAltTileNumbers[1, 7] = loadingfloor.mRowCenterAltX; landAltTileNumbers[1, 11] = loadingfloor.mRowRightAltX; for (int i = 0; i < 23; i++) { picLandAltTileset[i].Image = Graphics.GraphicsManager.Tiles[landAltTileNumbers[0, i]][landAltTileNumbers[1, i]]; } lblSaveLoadMessage.Text = "Land Alt Tile settings loaded"; } else if (pnlRDungeonWaterTiles != null && pnlRDungeonWaterTiles.Visible == true) { waterTileNumbers[0, 15] = loadingfloor.mShoreSurroundedSheet; waterTileNumbers[0, 0] = loadingfloor.mShoreInnerTopLeftSheet; waterTileNumbers[0, 4] = loadingfloor.mShoreTopSheet; waterTileNumbers[0, 8] = loadingfloor.mShoreInnerTopRightSheet; waterTileNumbers[0, 1] = loadingfloor.mShoreLeftSheet; waterTileNumbers[0, 5] = loadingfloor.mWaterSheet; waterTileNumbers[0, 9] = loadingfloor.mShoreRightSheet; waterTileNumbers[0, 2] = loadingfloor.mShoreInnerBottomLeftSheet; waterTileNumbers[0, 6] = loadingfloor.mShoreBottomSheet; waterTileNumbers[0, 10] = loadingfloor.mShoreInnerBottomRightSheet; waterTileNumbers[0, 16] = loadingfloor.mShoreTopLeftSheet; waterTileNumbers[0, 19] = loadingfloor.mShoreTopRightSheet; waterTileNumbers[0, 17] = loadingfloor.mShoreBottomLeftSheet; waterTileNumbers[0, 20] = loadingfloor.mShoreBottomRightSheet; waterTileNumbers[0, 18] = loadingfloor.mShoreDiagonalForwardSheet; waterTileNumbers[0, 21] = loadingfloor.mShoreDiagonalBackSheet; waterTileNumbers[0, 12] = loadingfloor.mShoreInnerTopSheet; waterTileNumbers[0, 13] = loadingfloor.mShoreVerticalSheet; waterTileNumbers[0, 14] = loadingfloor.mShoreInnerBottomSheet; waterTileNumbers[0, 3] = loadingfloor.mShoreInnerLeftSheet; waterTileNumbers[0, 7] = loadingfloor.mShoreHorizontalSheet; waterTileNumbers[0, 11] = loadingfloor.mShoreInnerRightSheet; waterTileNumbers[1, 15] = loadingfloor.mShoreSurroundedX; waterTileNumbers[1, 0] = loadingfloor.mShoreInnerTopLeftX; waterTileNumbers[1, 4] = loadingfloor.mShoreTopX; waterTileNumbers[1, 8] = loadingfloor.mShoreInnerTopRightX; waterTileNumbers[1, 1] = loadingfloor.mShoreLeftX; waterTileNumbers[1, 5] = loadingfloor.mWaterX; waterTileNumbers[1, 9] = loadingfloor.mShoreRightX; waterTileNumbers[1, 2] = loadingfloor.mShoreInnerBottomLeftX; waterTileNumbers[1, 6] = loadingfloor.mShoreBottomX; waterTileNumbers[1, 10] = loadingfloor.mShoreInnerBottomRightX; waterTileNumbers[1, 16] = loadingfloor.mShoreTopLeftX; waterTileNumbers[1, 19] = loadingfloor.mShoreTopRightX; waterTileNumbers[1, 17] = loadingfloor.mShoreBottomLeftX; waterTileNumbers[1, 20] = loadingfloor.mShoreBottomRightX; waterTileNumbers[1, 18] = loadingfloor.mShoreDiagonalForwardX; waterTileNumbers[1, 21] = loadingfloor.mShoreDiagonalBackX; waterTileNumbers[1, 12] = loadingfloor.mShoreInnerTopX; waterTileNumbers[1, 13] = loadingfloor.mShoreVerticalX; waterTileNumbers[1, 14] = loadingfloor.mShoreInnerBottomX; waterTileNumbers[1, 3] = loadingfloor.mShoreInnerLeftX; waterTileNumbers[1, 7] = loadingfloor.mShoreHorizontalX; waterTileNumbers[1, 11] = loadingfloor.mShoreInnerRightX; for (int i = 0; i < 22; i++) { picWaterTileset[i].Image = Graphics.GraphicsManager.Tiles[waterTileNumbers[0, i]][waterTileNumbers[1, i]]; } lblSaveLoadMessage.Text = "Water Tile settings loaded"; } else if (pnlRDungeonWaterAnimTiles != null && pnlRDungeonWaterAnimTiles.Visible == true) { waterAnimTileNumbers[0, 15] = loadingfloor.mShoreSurroundedAnimSheet; waterAnimTileNumbers[0, 0] = loadingfloor.mShoreInnerTopLeftAnimSheet; waterAnimTileNumbers[0, 4] = loadingfloor.mShoreTopAnimSheet; waterAnimTileNumbers[0, 8] = loadingfloor.mShoreInnerTopRightAnimSheet; waterAnimTileNumbers[0, 1] = loadingfloor.mShoreLeftAnimSheet; waterAnimTileNumbers[0, 5] = loadingfloor.mWaterAnimSheet; waterAnimTileNumbers[0, 9] = loadingfloor.mShoreRightAnimSheet; waterAnimTileNumbers[0, 2] = loadingfloor.mShoreInnerBottomLeftAnimSheet; waterAnimTileNumbers[0, 6] = loadingfloor.mShoreBottomAnimSheet; waterAnimTileNumbers[0, 10] = loadingfloor.mShoreInnerBottomRightAnimSheet; waterAnimTileNumbers[0, 16] = loadingfloor.mShoreTopLeftAnimSheet; waterAnimTileNumbers[0, 19] = loadingfloor.mShoreTopRightAnimSheet; waterAnimTileNumbers[0, 17] = loadingfloor.mShoreBottomLeftAnimSheet; waterAnimTileNumbers[0, 20] = loadingfloor.mShoreBottomRightAnimSheet; waterAnimTileNumbers[0, 18] = loadingfloor.mShoreDiagonalForwardAnimSheet; waterAnimTileNumbers[0, 21] = loadingfloor.mShoreDiagonalBackAnimSheet; waterAnimTileNumbers[0, 12] = loadingfloor.mShoreInnerTopAnimSheet; waterAnimTileNumbers[0, 13] = loadingfloor.mShoreVerticalAnimSheet; waterAnimTileNumbers[0, 14] = loadingfloor.mShoreInnerBottomAnimSheet; waterAnimTileNumbers[0, 3] = loadingfloor.mShoreInnerLeftAnimSheet; waterAnimTileNumbers[0, 7] = loadingfloor.mShoreHorizontalAnimSheet; waterAnimTileNumbers[0, 11] = loadingfloor.mShoreInnerRightAnimSheet; waterAnimTileNumbers[1, 15] = loadingfloor.mShoreSurroundedAnimX; waterAnimTileNumbers[1, 0] = loadingfloor.mShoreInnerTopLeftAnimX; waterAnimTileNumbers[1, 4] = loadingfloor.mShoreTopAnimX; waterAnimTileNumbers[1, 8] = loadingfloor.mShoreInnerTopRightAnimX; waterAnimTileNumbers[1, 1] = loadingfloor.mShoreLeftAnimX; waterAnimTileNumbers[1, 5] = loadingfloor.mWaterAnimX; waterAnimTileNumbers[1, 9] = loadingfloor.mShoreRightAnimX; waterAnimTileNumbers[1, 2] = loadingfloor.mShoreInnerBottomLeftAnimX; waterAnimTileNumbers[1, 6] = loadingfloor.mShoreBottomAnimX; waterAnimTileNumbers[1, 10] = loadingfloor.mShoreInnerBottomRightAnimX; waterAnimTileNumbers[1, 16] = loadingfloor.mShoreTopLeftAnimX; waterAnimTileNumbers[1, 19] = loadingfloor.mShoreTopRightAnimX; waterAnimTileNumbers[1, 17] = loadingfloor.mShoreBottomLeftAnimX; waterAnimTileNumbers[1, 20] = loadingfloor.mShoreBottomRightAnimX; waterAnimTileNumbers[1, 18] = loadingfloor.mShoreDiagonalForwardAnimX; waterAnimTileNumbers[1, 21] = loadingfloor.mShoreDiagonalBackAnimX; waterAnimTileNumbers[1, 12] = loadingfloor.mShoreInnerTopAnimX; waterAnimTileNumbers[1, 13] = loadingfloor.mShoreVerticalAnimX; waterAnimTileNumbers[1, 14] = loadingfloor.mShoreInnerBottomAnimX; waterAnimTileNumbers[1, 3] = loadingfloor.mShoreInnerLeftAnimX; waterAnimTileNumbers[1, 7] = loadingfloor.mShoreHorizontalAnimX; waterAnimTileNumbers[1, 11] = loadingfloor.mShoreInnerRightAnimX; for (int i = 0; i < 22; i++) { picWaterAnimTileset[i].Image = Graphics.GraphicsManager.Tiles[waterAnimTileNumbers[0, i]][waterAnimTileNumbers[1, i]]; } lblSaveLoadMessage.Text = "Water Anim Tile settings loaded"; } else if (pnlRDungeonAttributes != null && pnlRDungeonAttributes.Visible == true) { cbGroundType.SelectItem((int)loadingfloor.GroundTile.Type); nudGroundData1.Value = loadingfloor.GroundTile.Data1; nudGroundData2.Value = loadingfloor.GroundTile.Data2; nudGroundData3.Value = loadingfloor.GroundTile.Data3; txtGroundString1.Text = loadingfloor.GroundTile.String1; txtGroundString2.Text = loadingfloor.GroundTile.String2; txtGroundString3.Text = loadingfloor.GroundTile.String3; cbHallType.SelectItem((int)loadingfloor.HallTile.Type); nudHallData1.Value = loadingfloor.HallTile.Data1; nudHallData2.Value = loadingfloor.HallTile.Data2; nudHallData3.Value = loadingfloor.HallTile.Data3; txtHallString1.Text = loadingfloor.HallTile.String1; txtHallString2.Text = loadingfloor.HallTile.String2; txtHallString3.Text = loadingfloor.HallTile.String3; cbWaterType.SelectItem((int)loadingfloor.WaterTile.Type); nudWaterData1.Value = loadingfloor.WaterTile.Data1; nudWaterData2.Value = loadingfloor.WaterTile.Data2; nudWaterData3.Value = loadingfloor.WaterTile.Data3; txtWaterString1.Text = loadingfloor.WaterTile.String1; txtWaterString2.Text = loadingfloor.WaterTile.String2; txtWaterString3.Text = loadingfloor.WaterTile.String3; cbWallType.SelectItem((int)loadingfloor.WallTile.Type); nudWallData1.Value = loadingfloor.WallTile.Data1; nudWallData2.Value = loadingfloor.WallTile.Data2; nudWallData3.Value = loadingfloor.WallTile.Data3; txtWallString1.Text = loadingfloor.WallTile.String1; txtWallString2.Text = loadingfloor.WallTile.String2; txtWallString3.Text = loadingfloor.WallTile.String3; lblSaveLoadMessage.Text = "Attribute settings loaded"; } else if (pnlRDungeonItems != null && pnlRDungeonItems.Visible == true) { itemList.Clear(); lbxItems.Items.Clear(); for (int item = 0; item < loadingfloor.Items.Count; item++) { EditableRDungeonItem newItem = new EditableRDungeonItem(); newItem.ItemNum = loadingfloor.Items[item].ItemNum; newItem.MinAmount = loadingfloor.Items[item].MinAmount; newItem.MaxAmount = loadingfloor.Items[item].MaxAmount; newItem.AppearanceRate = loadingfloor.Items[item].AppearanceRate; newItem.StickyRate = loadingfloor.Items[item].StickyRate; newItem.Tag = loadingfloor.Items[item].Tag; newItem.Hidden = loadingfloor.Items[item].Hidden; newItem.OnGround = loadingfloor.Items[item].OnGround; newItem.OnWater = loadingfloor.Items[item].OnWater; newItem.OnWall = loadingfloor.Items[item].OnWall; itemList.Add(newItem); lbxItems.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (item + 1) + ": (" + newItem.AppearanceRate + "%) " + newItem.MinAmount + "-" + newItem.MaxAmount + " " + Items.ItemHelper.Items[newItem.ItemNum].Name + " (" + newItem.StickyRate + "% Sticky)")); } lblSaveLoadMessage.Text = "Item settings loaded"; } else if (pnlRDungeonNpcs != null && pnlRDungeonNpcs.Visible == true) { nudNpcSpawnTime.Value = loadingfloor.NpcSpawnTime; nudNpcMin.Value = loadingfloor.NpcMin; nudNpcMax.Value = loadingfloor.NpcMax; npcList.Clear(); lbxNpcs.Items.Clear(); for (int npc = 0; npc < loadingfloor.Npcs.Count; npc++) { MapNpcSettings newNpc = new MapNpcSettings(); newNpc.NpcNum = loadingfloor.Npcs[npc].NpcNum; newNpc.MinLevel = loadingfloor.Npcs[npc].MinLevel; newNpc.MaxLevel = loadingfloor.Npcs[npc].MaxLevel; newNpc.AppearanceRate = loadingfloor.Npcs[npc].AppearanceRate; newNpc.StartStatus = loadingfloor.Npcs[npc].StartStatus; newNpc.StartStatusCounter = loadingfloor.Npcs[npc].StartStatusCounter; newNpc.StartStatusChance = loadingfloor.Npcs[npc].StartStatusChance; npcList.Add(newNpc); lbxNpcs.Items.Add(new ListBoxTextItem(Client.Logic.Graphics.FontManager.LoadFont("tahoma", 10), (npc + 1) + ": " + "(" + newNpc.AppearanceRate + "%) " + "Lv." + newNpc.MinLevel + "-" + newNpc.MaxLevel + " " + Npc.NpcHelper.Npcs[newNpc.NpcNum].Name + " [" + newNpc.StartStatusChance + "% " + newNpc.StartStatus.ToString() + "]")); } lblSaveLoadMessage.Text = "Npc settings loaded"; } else if (pnlRDungeonTraps != null && pnlRDungeonTraps.Visible == true) { trapList.Clear(); lbxTraps.Items.Clear(); for (int traps = 0; traps < loadingfloor.SpecialTiles.Count; traps++) { EditableRDungeonTrap newTile = new EditableRDungeonTrap(); newTile.SpecialTile.Ground = loadingfloor.SpecialTiles[traps].SpecialTile.Ground; newTile.SpecialTile.GroundAnim = loadingfloor.SpecialTiles[traps].SpecialTile.GroundAnim; newTile.SpecialTile.Mask = loadingfloor.SpecialTiles[traps].SpecialTile.Mask; newTile.SpecialTile.Anim = loadingfloor.SpecialTiles[traps].SpecialTile.Anim; newTile.SpecialTile.Mask2 = loadingfloor.SpecialTiles[traps].SpecialTile.Mask2; newTile.SpecialTile.M2Anim = loadingfloor.SpecialTiles[traps].SpecialTile.M2Anim; newTile.SpecialTile.Fringe = loadingfloor.SpecialTiles[traps].SpecialTile.Fringe; newTile.SpecialTile.FAnim = loadingfloor.SpecialTiles[traps].SpecialTile.FAnim; newTile.SpecialTile.Fringe2 = loadingfloor.SpecialTiles[traps].SpecialTile.Fringe2; newTile.SpecialTile.F2Anim = loadingfloor.SpecialTiles[traps].SpecialTile.F2Anim; newTile.SpecialTile.GroundSet = loadingfloor.SpecialTiles[traps].SpecialTile.GroundSet; newTile.SpecialTile.GroundAnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.GroundAnimSet; newTile.SpecialTile.MaskSet = loadingfloor.SpecialTiles[traps].SpecialTile.MaskSet; newTile.SpecialTile.AnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.AnimSet; newTile.SpecialTile.Mask2Set = loadingfloor.SpecialTiles[traps].SpecialTile.Mask2Set; newTile.SpecialTile.M2AnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.M2AnimSet; newTile.SpecialTile.FringeSet = loadingfloor.SpecialTiles[traps].SpecialTile.FringeSet; newTile.SpecialTile.FAnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.FAnimSet; newTile.SpecialTile.Fringe2Set = loadingfloor.SpecialTiles[traps].SpecialTile.Fringe2Set; newTile.SpecialTile.F2AnimSet = loadingfloor.SpecialTiles[traps].SpecialTile.F2AnimSet; newTile.SpecialTile.Type = loadingfloor.SpecialTiles[traps].SpecialTile.Type; newTile.SpecialTile.Data1 = loadingfloor.SpecialTiles[traps].SpecialTile.Data1; newTile.SpecialTile.Data2 = loadingfloor.SpecialTiles[traps].SpecialTile.Data2; newTile.SpecialTile.Data3 = loadingfloor.SpecialTiles[traps].SpecialTile.Data3; newTile.SpecialTile.String1 = loadingfloor.SpecialTiles[traps].SpecialTile.String1; newTile.SpecialTile.String2 = loadingfloor.SpecialTiles[traps].SpecialTile.String2; newTile.SpecialTile.String3 = loadingfloor.SpecialTiles[traps].SpecialTile.String3; newTile.AppearanceRate = loadingfloor.SpecialTiles[traps].AppearanceRate; trapList.Add(newTile); lbxTraps.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (traps + 1) + ": " + newTile.SpecialTile.Type + "/" + newTile.SpecialTile.Data1 + "/" + newTile.SpecialTile.Data2 + "/" + newTile.SpecialTile.Data3)); } lblSaveLoadMessage.Text = "Trap settings loaded"; } else if (pnlRDungeonWeather != null && pnlRDungeonWeather.Visible == true) { lbxWeather.Items.Clear(); for (int weather = 0; weather < loadingfloor.Weather.Count; weather++) { lbxWeather.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), (weather + 1) + ":" + (int)loadingfloor.Weather[weather] + ": " + Enum.GetName(typeof(Enums.Weather), loadingfloor.Weather[weather]))); } lblSaveLoadMessage.Text = "Weather settings loaded"; } else if (pnlRDungeonGoal != null && pnlRDungeonGoal.Visible == true) { switch (loadingfloor.GoalType) { case Enums.RFloorGoalType.NextFloor: { optNextFloor.Checked = true; } break; case Enums.RFloorGoalType.Map: { optMap.Checked = true; } break; case Enums.RFloorGoalType.Scripted: { optScripted.Checked = true; } break; default: { optNextFloor.Checked = true; } break; } nudData1.Value = loadingfloor.GoalMap; nudData2.Value = loadingfloor.GoalX; nudData3.Value = loadingfloor.GoalY; lblSaveLoadMessage.Text = "Goal settings loaded"; } else if (pnlRDungeonChambers != null && pnlRDungeonChambers.Visible == true) { chamberList.Clear(); lbxChambers.Items.Clear(); for (int chamber = 0; chamber < loadingfloor.Chambers.Count; chamber++) { EditableRDungeonChamber newChamber = new EditableRDungeonChamber(); newChamber.ChamberNum = loadingfloor.Chambers[chamber].ChamberNum; newChamber.String1 = loadingfloor.Chambers[chamber].String1; newChamber.String2 = loadingfloor.Chambers[chamber].String2; newChamber.String3 = loadingfloor.Chambers[chamber].String3; chamberList.Add(newChamber); lbxChambers.Items.Add(new ListBoxTextItem(Graphics.FontManager.LoadFont("tahoma", 10), "#" + loadingfloor.Chambers[chamber].ChamberNum + "/" + loadingfloor.Chambers[chamber].String1 + "/" + loadingfloor.Chambers[chamber].String2 + "/" + loadingfloor.Chambers[chamber].String3)); } lblSaveLoadMessage.Text = "Chamber settings loaded"; } else if (pnlRDungeonMisc != null && pnlRDungeonMisc.Visible == true) { nudDarkness.Value = loadingfloor.Darkness; if (loadingfloor.Music == "") { lbxMusic.SelectItem(0); } else { for (int i = 0; i < lbxMusic.Items.Count; i++) { if (lbxMusic.Items[i].TextIdentifier == loadingfloor.Music) { lbxMusic.SelectItem(i); } } } lblSaveLoadMessage.Text = "Misc settings loaded"; } }