View Single Post
  #3  
Old 11-24-2008, 07:53 AM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

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.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!

Last edited by trevius; 11-24-2008 at 04:12 PM..
Reply With Quote