Fix 95% of food/water consumption issues, if there are additional modifiers for race/class combos - those will need to be applied

Mods properly calculated

Stages should be put in place if not already:
https://wiki.project1999.com/Food_and_drink#Stages_of_Hunger_and_Thirst

Values stored in the database are 0-6000, previously we capped it at 6000 but previous math would have normal values in the 60k+ range in order for food to be consumed at a reasonable rate. We are now using more native logic where 1 = 1 minute, following logic:

(Minutes)
0 -  5	- This is a snack.
6 -  20	- This is a meal.
21 - 30	- This is a hearty meal.
31 - 40	- This is a banquet size meal.
41 - 50	- This meal is a feast!
51 - 60	- This is an enduring meal!
61 - X	- This is a miraculous meal!
This commit is contained in:
Akkadius
2017-09-17 09:48:10 -05:00
parent b71f3031bc
commit e88cd61097
5 changed files with 81 additions and 44 deletions
+9 -5
View File
@@ -8702,6 +8702,8 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
}
else
{
/*
//This is food/drink - consume it
if (item->ItemType == EQEmu::item::ItemTypeFood && m_pp.hunger_level < 5000)
{
@@ -8723,19 +8725,21 @@ void Client::Handle_OP_ItemVerifyRequest(const EQApplicationPacket *app)
//CheckIncreaseSkill(ALCOHOL_TOLERANCE, nullptr, 25);
}
if (m_pp.hunger_level > 6000)
m_pp.hunger_level = 6000;
if (m_pp.thirst_level > 6000)
m_pp.thirst_level = 6000;
EQApplicationPacket *outapp2 = nullptr;
outapp2 = new EQApplicationPacket(OP_Stamina, sizeof(Stamina_Struct));
Stamina_Struct* sta = (Stamina_Struct*)outapp2->pBuffer;
if (m_pp.hunger_level > 6000)
sta->food = 6000;
if (m_pp.thirst_level > 6000)
sta->water = 6000;
sta->food = m_pp.hunger_level;
sta->water = m_pp.thirst_level;
QueuePacket(outapp2);
safe_delete(outapp2);
*/
}
}