adds a check to see if the parcel dataset has loaded before processing
This commit is contained in:
parent
53d95f0e2a
commit
8eff843938
1 changed files with 18 additions and 11 deletions
|
|
@ -55,6 +55,8 @@ namespace BSB.Commands.CMD_Parcel
|
|||
if (get_flags.Count > 0)
|
||||
{
|
||||
int localid = bot.GetClient.Parcels.GetParcelLocalID(bot.GetClient.Network.CurrentSim, bot.GetClient.Self.SimPosition);
|
||||
if (bot.GetClient.Network.CurrentSim.Parcels.ContainsKey(localid) == true)
|
||||
{
|
||||
Parcel p = bot.GetClient.Network.CurrentSim.Parcels[localid];
|
||||
StringBuilder reply = new StringBuilder();
|
||||
string addon = "";
|
||||
|
|
@ -72,6 +74,11 @@ namespace BSB.Commands.CMD_Parcel
|
|||
return bot.GetCommandsInterface.SmartCommandReply(target, reply.ToString(), CommandName);
|
||||
}
|
||||
else
|
||||
{
|
||||
Failed("Enhance your carm");
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
return Failed("No accepted flags");
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue