protected override bool Process(Player player, RealmTime time, string args)
{
if (args.Length == 0)
{
player.SendHelp("Usage: /gimme <Itemname>");
return false;
}
ushort objType;
if (!player.Manager.GameData.IdToObjectType.TryGetValue(args, out objType))
{
player.SendError("Unknown item type!");
return false;
}
for (int i = 0; i < player.Inventory.Length; i++)
if (player.Inventory[i] == null)
{
player.Inventory[i] = player.Manager.GameData.Items[objType];
player.UpdateCount++;
player.SaveToCharacter();
player.SendInfo("Success!");
return true;
}
player.SendError("Not enough space in inventory!");
return false;
}