Ahh lol, good idea! I didn't even notice that conversion was there. Looks like this take a little extra work out of checking req level too
I will test out the code and see how it goes. If all seems ok, I think this should be ready for adding to SVN at any time.
Though, I think maybe keeping it like this might be slightly better. This way, it doesn't have to check equipable items to see if they are food. Pretty minor, but every bit helps:
Code:
const Item_Struct *item = inst->GetItem();
if (GetLevel() < item->ReqLevel)
{
return;
}
if (!inst->IsEquipable(GetBaseRace(),GetClass()))
{
if (item->ItemType != ItemTypeFood && item->ItemType != ItemTypeDrink)
return;
}
Oh, and while looking at the code I submitted above, I can't for the life of me figure out why it is actually working for Drinks too. I checked and confirmed that it is indeed the same code I am running on the server now. And, it is only checking for ItemTypeFood, but doing it twice... And somehow, Drinks still work.
Either way, I will get this tested and submitted tonight if it looks good.