Food/Drink Stats - Fixed
Tonight, I finally got around to looking into why food stats weren't adding to actual stats (shown in #showstats). It turns out that all of the code to calculate food was already there, but the code for calculating item bonuses wasn't allowing food/drink to work.
In bonuses.cpp around line 182, after this: Code:
if (!inst->IsEquipable(GetBaseRace(),GetClass())) Code:
if ((!inst->GetItem()->ItemType == ItemTypeFood) && (!inst->GetItem()->ItemType == ItemTypeFood)) And that whole IF should look like this when you are done adding it: Code:
if (!inst->IsEquipable(GetBaseRace(),GetClass())) |
Quote:
Code:
void Client::AddItemBonuses(const ItemInst *inst, StatBonuses* newbon, bool isAug) { |
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 :D 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(); Either way, I will get this tested and submitted tonight if it looks good. |
This is the current server code and it doesn't look like bonus' are working. any thoughts?
Code:
const EQEmu::ItemBase *item = inst->GetItem(); |
I don't think that we handle food/drink correctly...
It will be addressed in the inventory rework since I'm having to rewrite all code that touches items. |
Quote:
|
All times are GMT -4. The time now is 11:46 AM. |
Powered by vBulletin®, Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.