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