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; }
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); } }
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) }; }