bWolfie
I'm the man
Hello,
I'm trying to make a plugin which will automatically store an item by type. I'm testing at the moment with IT_ETC but I can't get it to work.
How to correctly check item type?
Thanks
I'm trying to make a plugin which will automatically store an item by type. I'm testing at the moment with IT_ETC but I can't get it to work.
How to correctly check item type?
Thanks
Code:
struct item_data* id;
for (i = 0; i < MAX_INVENTORY; i++)
{
id = 0;
if (sd->status.inventory[i].amount)
{
id = itemdb_type(sd->status.inventory[i].nameid);
if (id && id->type == IT_ETC)
storage->add(sd, i, sd->status.inventory[i].amount);
}
}