SecondBot/Secondbot/Core/Commands/Estate/EstateParcelReclaim.cs
2021-02-14 01:21:35 +00:00

25 lines
887 B
C#

namespace BSB.Commands.Estate
{
public class EstateParcelReclaim : CoreCommand
{
public override string Helpfile { get { return "Reclaims ownership of the current parcel"; } }
public override bool CallFunction(string[] args)
{
if (base.CallFunction(args) == true)
{
if (bot.GetClient.Network.CurrentSim.IsEstateManager == true)
{
int localid = bot.GetClient.Parcels.GetParcelLocalID(bot.GetClient.Network.CurrentSim, bot.GetClient.Self.SimPosition);
bot.GetClient.Parcels.Reclaim(bot.GetClient.Network.CurrentSim, localid);
return true;
}
else
{
return Failed("Not an estate manager here");
}
}
return false;
}
}
}