Example #1
0
        public string Execute([CurrentCharacterIfNull] ICharacter character)
        {
            using var tempAreas = Api.Shared.GetTempList <ILogicObject>();

            LandClaimSystem.SharedGetAreasInBounds(
                new RectangleInt(character.TilePosition.X, character.TilePosition.Y, 1, 1),
                tempAreas,
                addGracePadding: false);

            foreach (var logicObject in tempAreas)
            {
                LandClaimSystem.ServerSetRaidblock(logicObject);
            }

            return(string.Empty);
        }
        public string Execute([CurrentCharacterIfNull] ICharacter character)
        {
            using var tempAreas = Api.Shared.GetTempList <ILogicObject>();

            LandClaimSystem.SharedGetAreasInBounds(
                new RectangleInt(character.TilePosition.X, character.TilePosition.Y, 1, 1),
                tempAreas,
                addGracePadding: false);

            foreach (var logicObject in tempAreas.AsList())
            {
                LandClaimSystem.ServerSetRaidblock(logicObject,
                                                   byCharacter: null,
                                                   durationMultiplier: 1.0,
                                                   isStructureDestroyed: true);
            }

            return(string.Empty);
        }