public bool HasItem(int type)
{
for (int index = 0; index < 58; ++index)
{
if (type == this.inventory[index].itemId && this.inventory[index].stack > 0)
return true;
}
return false;
}