Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::General Support

Support::General Support Post all topics here having to do with errors while trying to connect to an EQEMu server but not about the setup/running of the Server itself.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 01-07-2018, 09:07 PM
Kingly_Krab
Administrator
 
Join Date: May 2013
Location: United States
Posts: 1,603
Default

Okay so there's a timer for consuming food, it looks like this.
Code:
if (consume_food_timer.Check())
    DoStaminaHungerUpdate();
DoStaminaHungerUpdate checks first that you're not in zone 151 (Bazaar) and that you don't have a GM flag active, then it goes to work updating your thirst and hunger level based on the rule value you mentioned.
Code:
void Client::DoStaminaHungerUpdate()
{
    auto outapp = new EQApplicationPacket(OP_Stamina, sizeof(Stamina_Struct));
    Stamina_Struct *sta = (Stamina_Struct *)outapp->pBuffer;

    Log(Logs::General, Logs::Food, "Client::DoStaminaHungerUpdate() hunger_level: %i thirst_level: %i before loss",
        m_pp.hunger_level, m_pp.thirst_level);

    if (zone->GetZoneID() != 151 && !GetGM()) {
        int loss = RuleI(Character, FoodLossPerUpdate);
        if (GetHorseId() != 0)
            loss *= 3;

        m_pp.hunger_level = EQEmu::Clamp(m_pp.hunger_level - loss, 0, 6000);
        m_pp.thirst_level = EQEmu::Clamp(m_pp.thirst_level - loss, 0, 6000);
        if (spellbonuses.hunger) {
            m_pp.hunger_level = EQEmu::ClampLower(m_pp.hunger_level, 3500);
            m_pp.thirst_level = EQEmu::ClampLower(m_pp.thirst_level, 3500);
        }
        sta->food = m_pp.hunger_level;
        sta->water = m_pp.thirst_level;
    } else {
        // No auto food/drink consumption in the Bazaar
        sta->food = 6000;
        sta->water = 6000;
    }

    Log(Logs::General, Logs::Food,
        "Client::DoStaminaHungerUpdate() Current hunger_level: %i = (%i minutes left) thirst_level: %i = (%i "
        "minutes left) - after loss",
        m_pp.hunger_level, m_pp.hunger_level, m_pp.thirst_level, m_pp.thirst_level);

    FastQueuePacket(&outapp);
}
If you wanted to remove the need to even eat food, I'd think you could just remove the food consumption timer check. Thought I'd throw my input on an otherwise unanswered question.
Reply With Quote
 


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

   

All times are GMT -4. The time now is 12:26 AM.


 

Everquest is a registered trademark of Daybreak Game Company LLC.
EQEmulator is not associated or affiliated in any way with Daybreak Game Company LLC.
Except where otherwise noted, this site is licensed under a Creative Commons License.
       
Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3