1414
1515using WeifenLuo . WinFormsUI . Docking ;
1616using Graphics = System . Drawing . Graphics ;
17- using MapAttribute = Intersect . Enums . MapAttribute ;
1817
1918namespace Intersect . Editor . Forms . DockingElements ;
2019
@@ -576,112 +575,112 @@ public int GetAttributeFromEditor()
576575 {
577576 if ( rbBlocked . Checked == true )
578577 {
579- return ( int ) MapAttribute . Blocked ;
578+ return ( int ) MapAttributeType . Blocked ;
580579 }
581580 else if ( rbItem . Checked == true )
582581 {
583- return ( int ) MapAttribute . Item ;
582+ return ( int ) MapAttributeType . Item ;
584583 }
585584 else if ( rbZDimension . Checked == true )
586585 {
587- return ( int ) MapAttribute . ZDimension ;
586+ return ( int ) MapAttributeType . ZDimension ;
588587 }
589588 else if ( rbNPCAvoid . Checked == true )
590589 {
591- return ( int ) MapAttribute . NpcAvoid ;
590+ return ( int ) MapAttributeType . NpcAvoid ;
592591 }
593592 else if ( rbWarp . Checked == true )
594593 {
595- return ( int ) MapAttribute . Warp ;
594+ return ( int ) MapAttributeType . Warp ;
596595 }
597596 else if ( rbSound . Checked == true )
598597 {
599- return ( int ) MapAttribute . Sound ;
598+ return ( int ) MapAttributeType . Sound ;
600599 }
601600 else if ( rbResource . Checked == true )
602601 {
603- return ( int ) MapAttribute . Resource ;
602+ return ( int ) MapAttributeType . Resource ;
604603 }
605604 else if ( rbAnimation . Checked == true )
606605 {
607- return ( int ) MapAttribute . Animation ;
606+ return ( int ) MapAttributeType . Animation ;
608607 }
609608 else if ( rbGrappleStone . Checked == true )
610609 {
611- return ( int ) MapAttribute . GrappleStone ;
610+ return ( int ) MapAttributeType . GrappleStone ;
612611 }
613612 else if ( rbSlide . Checked == true )
614613 {
615- return ( int ) MapAttribute . Slide ;
614+ return ( int ) MapAttributeType . Slide ;
616615 }
617616 else if ( rbCritter . Checked == true )
618617 {
619- return ( int ) MapAttribute . Critter ;
618+ return ( int ) MapAttributeType . Critter ;
620619 }
621620
622- return ( int ) MapAttribute . Walkable ;
621+ return ( int ) MapAttributeType . Walkable ;
623622 }
624623
625- private MapAttribute SelectedMapAttributeType
624+ private MapAttributeType SelectedMapAttributeType
626625 {
627626 get
628627 {
629628 if ( rbBlocked . Checked )
630629 {
631- return MapAttribute . Blocked ;
630+ return MapAttributeType . Blocked ;
632631 }
633632
634633 if ( rbItem . Checked )
635634 {
636- return MapAttribute . Item ;
635+ return MapAttributeType . Item ;
637636 }
638637
639638 if ( rbZDimension . Checked )
640639 {
641- return MapAttribute . ZDimension ;
640+ return MapAttributeType . ZDimension ;
642641 }
643642
644643 if ( rbNPCAvoid . Checked )
645644 {
646- return MapAttribute . NpcAvoid ;
645+ return MapAttributeType . NpcAvoid ;
647646 }
648647
649648 if ( rbWarp . Checked )
650649 {
651- return MapAttribute . Warp ;
650+ return MapAttributeType . Warp ;
652651 }
653652
654653 if ( rbSound . Checked )
655654 {
656- return MapAttribute . Sound ;
655+ return MapAttributeType . Sound ;
657656 }
658657
659658 if ( rbResource . Checked )
660659 {
661- return MapAttribute . Resource ;
660+ return MapAttributeType . Resource ;
662661 }
663662
664663 if ( rbAnimation . Checked )
665664 {
666- return MapAttribute . Animation ;
665+ return MapAttributeType . Animation ;
667666 }
668667
669668 if ( rbGrappleStone . Checked )
670669 {
671- return MapAttribute . GrappleStone ;
670+ return MapAttributeType . GrappleStone ;
672671 }
673672
674673 if ( rbSlide . Checked )
675674 {
676- return MapAttribute . Slide ;
675+ return MapAttributeType . Slide ;
677676 }
678677
679678 if ( rbCritter . Checked )
680679 {
681- return MapAttribute . Critter ;
680+ return MapAttributeType . Critter ;
682681 }
683682
684- return ( MapAttribute ) byte . MaxValue ;
683+ return ( MapAttributeType ) byte . MaxValue ;
685684 }
686685 }
687686
@@ -692,26 +691,26 @@ public GameObjects.Maps.MapAttribute CreateAttribute()
692691 var attribute = GameObjects . Maps . MapAttribute . CreateAttribute ( attributeType ) ;
693692 switch ( SelectedMapAttributeType )
694693 {
695- case MapAttribute . Walkable :
696- case MapAttribute . Blocked :
697- case MapAttribute . GrappleStone :
698- case MapAttribute . NpcAvoid :
694+ case MapAttributeType . Walkable :
695+ case MapAttributeType . Blocked :
696+ case MapAttributeType . GrappleStone :
697+ case MapAttributeType . NpcAvoid :
699698 break ;
700699
701- case MapAttribute . Item :
700+ case MapAttributeType . Item :
702701 var itemAttribute = attribute as MapItemAttribute ;
703702 itemAttribute . ItemId = ItemBase . IdFromList ( cmbItemAttribute . SelectedIndex ) ;
704703 itemAttribute . Quantity = ( int ) nudItemQuantity . Value ;
705704 itemAttribute . RespawnTime = ( long ) nudItemRespawnTime . Value ;
706705 break ;
707706
708- case MapAttribute . ZDimension :
707+ case MapAttributeType . ZDimension :
709708 var zDimensionAttribute = attribute as MapZDimensionAttribute ;
710709 zDimensionAttribute . GatewayTo = GetEditorDimensionGateway ( ) ;
711710 zDimensionAttribute . BlockedLevel = GetEditorDimensionBlock ( ) ;
712711 break ;
713712
714- case MapAttribute . Warp :
713+ case MapAttributeType . Warp :
715714 var warpAttribute = attribute as MapWarpAttribute ;
716715 warpAttribute . MapId = MapList . OrderedMaps [ cmbWarpMap . SelectedIndex ] . MapId ;
717716 warpAttribute . X = ( byte ) nudWarpX . Value ;
@@ -722,31 +721,31 @@ public GameObjects.Maps.MapAttribute CreateAttribute()
722721 warpAttribute . WarpSound = TextUtils . SanitizeNone ( cmbWarpSound . Text ) ;
723722 break ;
724723
725- case MapAttribute . Sound :
724+ case MapAttributeType . Sound :
726725 var soundAttribute = attribute as MapSoundAttribute ;
727726 soundAttribute . Distance = ( byte ) nudSoundDistance . Value ;
728727 soundAttribute . File = TextUtils . SanitizeNone ( cmbMapAttributeSound . Text ) ;
729728 soundAttribute . LoopInterval = ( int ) nudSoundLoopInterval . Value ;
730729 break ;
731730
732- case MapAttribute . Resource :
731+ case MapAttributeType . Resource :
733732 var resourceAttribute = attribute as MapResourceAttribute ;
734733 resourceAttribute . ResourceId = ResourceBase . IdFromList ( cmbResourceAttribute . SelectedIndex ) ;
735734 resourceAttribute . SpawnLevel = ( byte ) ( rbLevel1 . Checked ? 0 : 1 ) ;
736735 break ;
737736
738- case MapAttribute . Animation :
737+ case MapAttributeType . Animation :
739738 var animationAttribute = attribute as MapAnimationAttribute ;
740739 animationAttribute . AnimationId = AnimationBase . IdFromList ( cmbAnimationAttribute . SelectedIndex ) ;
741740 animationAttribute . IsBlock = chkAnimationBlock . Checked ;
742741 break ;
743742
744- case MapAttribute . Slide :
743+ case MapAttributeType . Slide :
745744 var slideAttribute = attribute as MapSlideAttribute ;
746745 slideAttribute . Direction = ( Direction ) cmbSlideDir . SelectedIndex ;
747746 break ;
748747
749- case MapAttribute . Critter :
748+ case MapAttributeType . Critter :
750749 var critterAttribute = attribute as MapCritterAttribute ;
751750 critterAttribute . Sprite = cmbCritterSprite . Text ;
752751 critterAttribute . AnimationId = AnimationBase . IdFromList ( cmbCritterAnimation . SelectedIndex - 1 ) ;
@@ -780,7 +779,7 @@ public GameObjects.Maps.MapAttribute PlaceAttribute(MapBase mapDescriptor, int x
780779
781780 public bool RemoveAttribute ( MapBase tmpMap , int x , int y )
782781 {
783- if ( tmpMap . Attributes [ x , y ] != null && tmpMap . Attributes [ x , y ] . Type != MapAttribute . Walkable )
782+ if ( tmpMap . Attributes [ x , y ] != null && tmpMap . Attributes [ x , y ] . Type != MapAttributeType . Walkable )
784783 {
785784 tmpMap . Attributes [ x , y ] = null ;
786785
0 commit comments