Go Back   EQEmulator Home > EQEmulator Forums > Support > Support::Windows Servers

Support::Windows Servers Support forum for Windows EQEMu users.

Reply
 
Thread Tools Display Modes
  #1  
Old 12-30-2014, 12:10 PM
Missneye's Avatar
Missneye
Fire Beetle
 
Join Date: Nov 2014
Posts: 21
Unhappy Mana Regen Issue

Hello! I am currently running my own private server and everything has been great. I've spent several weeks editing hundreds of things, but there's one issue...whenever I edit Character:RestRegenPercent, it only affects health. It does absolutely nothing to mana or endurance regeneration, they both just use natural and worn regen. Both can be changed successfully by editing Character:ManaRegenMultiplier and Character:EnduranceRegenMultiplier, but I don't want a major increase while standing.

I have not edited mana regen in any way outside of the multiplier rule.

Is there any reason for this to be happening?
Is there a file somewhere I could edit that holds all of the regen code?

The confusing part is why health will regenerate while resting just fine and mana doesn't. I can only assume there is some code missing somewhere that I need to add in.

Thank you!
Reply With Quote
  #2  
Old 12-30-2014, 12:14 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

How does rest work on Live? Does it regen mana/endurance as well as Health? If so, then we can probably change the rest code to handle all 3 if it isn't already (which is how it sounds based on this report). If only Health is regen'ed on Live (or if it was that way at the time that the PEQ content is up to), then we would have to add an additional custom rule to allow for also regen'ing mana and endurance while in rest state.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #3  
Old 12-30-2014, 12:26 PM
Missneye's Avatar
Missneye
Fire Beetle
 
Join Date: Nov 2014
Posts: 21
Default

Quote:
Originally Posted by trevius View Post
How does rest work on Live? Does it regen mana/endurance as well as Health? If so, then we can probably change the rest code to handle all 3 if it isn't already (which is how it sounds based on this report). If only Health is regen'ed on Live (or if it was that way at the time that the PEQ content is up to), then we would have to add an additional custom rule to allow for also regen'ing mana and endurance while in rest state.
On live, all three of them regen 3-4% per tick. My problem is that I can set RestRegen to 5 and health will regen 5% each tick when sitting and out of combat, while mana and endurance are the same as when standing.

I know that all 3 work fine for everyone that has recently installed EQEmu or something similar like AXClassic. I also read a few different posts that dealt with the code put into RestRegen. It seems mana and endurance just need to match the formula that health has, but I'm not even sure which file contains that code. I'd imagine it's a .cpp or .h file somewhere, I just can't seem to find it.

Also, I am using the Titanium client if that makes any difference.

Edit: If I were to add a custom rule for this, how would I go about doing it? I've done very little with code outside of HeidiSQL and a few perl scripts for NPCs.
Reply With Quote
  #4  
Old 12-30-2014, 01:07 PM
Coenxai's Avatar
Coenxai
Hill Giant
 
Join Date: Dec 2013
Posts: 151
Default

I wasn't aware Titanium supported a rested state?

Code:
void Client::CalcRestState() {

	// This method calculates rest state HP and mana regeneration.
	// The client must have been out of combat for RuleI(Character, RestRegenTimeToActivate) seconds,
	// must be sitting down, and must not have any detrimental spells affecting them.
	//
	if(!RuleI(Character, RestRegenPercent))
		return;

	RestRegenHP = RestRegenMana = RestRegenEndurance = 0;

	if(AggroCount || !IsSitting())
		return;

	if(!rest_timer.Check(false))
		return;

	uint32 buff_count = GetMaxTotalSlots();
	for (unsigned int j = 0; j < buff_count; j++) {
		if(buffs[j].spellid != SPELL_UNKNOWN) {
			if(IsDetrimentalSpell(buffs[j].spellid) && (buffs[j].ticsremaining > 0))
				if(!DetrimentalSpellAllowsRest(buffs[j].spellid))
					return;
		}
	}

	RestRegenHP = (GetMaxHP() * RuleI(Character, RestRegenPercent) / 100);

	RestRegenMana = (GetMaxMana() * RuleI(Character, RestRegenPercent) / 100);

	if(RuleB(Character, RestRegenEndurance))
		RestRegenEndurance = (GetMaxEndurance() * RuleI(Character, RestRegenPercent) / 100);
}
Looks and works fine for me on Underfoot. Make sure you're using the appropriate rule set for the zone you're in.
Reply With Quote
  #5  
Old 12-30-2014, 01:27 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

Titanium doesn't support rest regen like that.
Reply With Quote
  #6  
Old 12-30-2014, 01:48 PM
Missneye's Avatar
Missneye
Fire Beetle
 
Join Date: Nov 2014
Posts: 21
Default

Now that's what I don't understand...didn't DoDH and earlier still have some sort of resting bonus for mana? Why only for health?

Also, whether it'll work or not, where exactly do I put that code? That's what I'm unfamiliar with.

Edit: I just noticed the download for RoF2 client on the homepage. I would be able to download that and easily transfer my database, right? Or would I need an entirely new install of EQEmu? I imagine that would fix this "bug".
Reply With Quote
  #7  
Old 12-30-2014, 02:02 PM
demonstar55
Demi-God
 
Join Date: Apr 2008
Location: MA
Posts: 1,165
Default

If your server is up to date, you shouldn't have to do anything. Although RoF2 isn't entirely stable, but we need more testers to find the remaining bugs!
Reply With Quote
  #8  
Old 12-30-2014, 02:04 PM
Coenxai's Avatar
Coenxai
Hill Giant
 
Join Date: Dec 2013
Posts: 151
Default

I have absolutely no idea what live had for resting. Anyway, you don't need to put that code anywhere. It's already in the source. Yes, anything above SoF+ will allow you to rest.
__________________
"The true sign of intelligence is not knowledge but imagination."
Reply With Quote
  #9  
Old 12-30-2014, 02:09 PM
Missneye's Avatar
Missneye
Fire Beetle
 
Join Date: Nov 2014
Posts: 21
Default

Still don't get why health works and mana doesn't. But whatever, I'll just update the client. Thanks, guys!
Reply With Quote
Reply

Tags
character, endurance, health, mana, regen

Thread Tools
Display Modes

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 01:43 PM.


 

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 - 2024, Jelsoft Enterprises Ltd.
Template by Bluepearl Design and vBulletin Templates - Ver3.3