예제 #1
0
        private void AreaAddedHandler(ILogicObject area)
        {
            if (!LandClaimSystem.ClientIsOwnedArea(area))
            {
                return;
            }

            if (this.visualizedAreas.ContainsKey(area))
            {
                Api.Logger.Error("Land claim area already has the map visualizer: " + area);
                return;
            }

            this.visualizedAreas[area] = new LandClaimMapData(area, this.worldMapController);
        }
예제 #2
0
        private static bool IsOwner(ILogicObject areasGroup)
        {
            if (areasGroup.ClientHasPrivateState)
            {
                return(true);
            }

            var areas = LandClaimSystem.ClientGetKnownAreasForGroup(areasGroup);

            foreach (var area in areas)
            {
                if (LandClaimSystem.ClientIsOwnedArea(area))
                {
                    return(true);
                }
            }

            return(false);
        }
예제 #3
0
        private void AreaAddedHandler(ILogicObject area)
        {
            if (!LandClaimSystem.ClientIsOwnedArea(area))
            {
                return;
            }

            if (this.visualizedAreas.ContainsKey(area))
            {
                Api.Logger.Error("Land claim area already has the map visualizer: " + area);
                return;
            }

            var isFounder = string.Equals(LandClaimArea.GetPrivateState(area).LandClaimFounder,
                                          ClientCurrentCharacterHelper.Character.Name,
                                          StringComparison.Ordinal);

            this.visualizedAreas[area] = new LandClaimMapData(area,
                                                              this.worldMapController,
                                                              this.landClaimGroupVisualizer,
                                                              isFounder: isFounder);
        }