EQEmulator Forums

EQEmulator Forums (https://www.eqemulator.org/forums/index.php)
-   Quests::Q&A (https://www.eqemulator.org/forums/forumdisplay.php?f=599)
-   -   Thirst/Starvation Effects (https://www.eqemulator.org/forums/showthread.php?t=39863)

chasem 07-18-2015 09:46 AM

Thirst/Starvation Effects
 
Wondering if anyone has found a way to implement thirst/starvation effects. I have been tinkering with having a persistent detrimental HP/Mana regen buff on all players that food and water negate.

Hoping there's a less cumbersome way that someone has come up with and is willing to share.

Thanks in advance!

rencro 07-18-2015 10:48 AM

In zone client_process

Code:

void Client::DoHPRegen() {
        if (Hungry())
                return;

       
        SetHP(GetHP() + CalcHPRegen() + RestRegenHP);
        SendHPUpdate();
}

void Client::DoManaRegen() {
        if (Thirsty())
                return;

       
        if (GetMana() >= max_mana && spellbonuses.ManaRegen >= 0)
                return;

        SetMana(GetMana() + CalcManaRegen() + RestRegenMana);
        SendManaUpdatePacket();
}

Can also do this for Endurance. BTW dont you think its unfair that melees have a resource drained from them if they jump. Just venting (and I removed that silly penalty)

Maybe makes more sense to make all three (hp regen, mana regen, end regen) depend on both water and food.

Shendare 07-18-2015 01:01 PM

Or even decrement by 1 each tick or something.

Go AFK for three in-game days? Die of thirst!

MWAhahahahahahaha!

chasem 07-18-2015 02:05 PM

Awesomesauce! That's perfect. Thanks so much.


All times are GMT -4. The time now is 10:17 PM.

Powered by vBulletin®, Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.