From b6e9e9e1d681d32b4dd537efd813ed09e075f52a Mon Sep 17 00:00:00 2001 From: Madpeter Date: Mon, 27 Apr 2020 04:21:35 +0100 Subject: [PATCH] sets the lower limit to L$0 also sets the parcel for sale and to not transfer objects on sale. --- Core/Commands/Parcel/SetParcelSale.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/Core/Commands/Parcel/SetParcelSale.cs b/Core/Commands/Parcel/SetParcelSale.cs index 2e06f32..534bcf4 100644 --- a/Core/Commands/Parcel/SetParcelSale.cs +++ b/Core/Commands/Parcel/SetParcelSale.cs @@ -14,7 +14,7 @@ namespace BSB.Commands.CMD_Parcel public override string[] ArgHints { get { return new[] { "L$ amount to mark the parcel for sale as" }; } } public override int MinArgs { get { return 1; } } - public override string Helpfile { get { return "Sets the current parcel for sale for L$[ARG 1] "; } } + public override string Helpfile { get { return "Sets the current parcel for sale for L$[ARG 1] (Also marks the parcel for sale)"; } } public override bool CallFunction(string[] args) { @@ -26,11 +26,13 @@ namespace BSB.Commands.CMD_Parcel { if (int.TryParse(args[0], out int price) == true) { - if (price >= 1) + if (price >= 0) { if (price <= 99999) { p.SalePrice = price; + parcel_static.ParcelSetFlag(ParcelFlags.ForSale, p, true); + parcel_static.ParcelSetFlag(ParcelFlags.ForSaleObjects, p, false); p.Update(bot.GetClient.Network.CurrentSim, false); return true; } @@ -41,7 +43,7 @@ namespace BSB.Commands.CMD_Parcel } else { - return Failed("Price must be 1 or more"); + return Failed("Price must be 0 or more"); } } else