예제 #1
0
            public LandClaimMapData(
                ILogicObject area,
                WorldMapController worldMapController,
                ClientWorldMapLandClaimsGroupVisualizer landClaimGroupVisualizer,
                bool isFounder)
            {
                this.area = area;

                this.worldMapController       = worldMapController;
                this.landClaimGroupVisualizer = landClaimGroupVisualizer;

                // add land claim mark control to map
                this.markControl = new WorldMapMarkLandClaim()
                {
                    IsFounder = isFounder, Area = area
                };
                var canvasPosition = this.GetAreaCanvasPosition();

                Canvas.SetLeft(this.markControl, canvasPosition.X);
                Canvas.SetTop(this.markControl, canvasPosition.Y);
                Panel.SetZIndex(this.markControl, 12);

                worldMapController.AddControl(this.markControl);
                this.landClaimGroupVisualizer.Register(this.area);

                ClientUpdateHelper.UpdateCallback += this.UpdateCallback;
            }
예제 #2
0
        public ClientWorldMapLandClaimVisualizer(
            WorldMapController worldMapController,
            ClientWorldMapLandClaimsGroupVisualizer landClaimGroupVisualizer)
        {
            this.worldMapController       = worldMapController;
            this.landClaimGroupVisualizer = landClaimGroupVisualizer;

            ClientLandClaimAreaManager.AreaAdded   += this.AreaAddedHandler;
            ClientLandClaimAreaManager.AreaRemoved += this.AreaRemovedHandler;

            foreach (var area in ClientLandClaimAreaManager.EnumerateAreaObjects())
            {
                this.AreaAddedHandler(area);
            }
        }
예제 #3
0
        protected override void OnLoaded()
        {
            var controller = this.controlWorldMap.WorldMapController;

            var landClaimGroupVisualizer = new ClientWorldMapLandClaimsGroupVisualizer(controller);

            this.visualisers = new IWorldMapVisualizer[]
            {
                landClaimGroupVisualizer,
                new ClientWorldMapLandClaimVisualizer(controller, landClaimGroupVisualizer),
                new ClientWorldMapBedVisualizer(controller),
                new ClientWorldMapDroppedItemsVisualizer(controller),
                new ClientWorldMapTradingTerminalsVisualizer(controller),
                new ClientWorldMapResourcesVisualizer(controller),
                new ClientWorldMapPartyMembersVisualizer(controller)
            };
        }