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-08-2008, 12:46 PM
kavren
Sarnak
 
Join Date: Feb 2007
Posts: 50
Default PC HP and MANA regen & sitting

Is there a way for me to adjust my server so that I can tweak HP and Mana regen time for characters that are sitting?

I would like to have the ability to both lower and increase the regen times, just for curiosities sake.
Reply With Quote
  #2  
Old 12-08-2008, 12:58 PM
kavren
Sarnak
 
Join Date: Feb 2007
Posts: 50
Default

This is specifically in reference to "sitting". When standing, I want the PC's to have different regen stats than from when they where sitting.
Reply With Quote
  #3  
Old 12-08-2008, 05:28 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

I don't think there is a currently a rule for that. But, it wouldn't be hard to edit that in the source if you wanted to.

in client_process.cpp
Code:
void Client::DoManaRegen() {
	if (GetMana() >= max_mana)
		return;
	int32 level=GetLevel();
	int32 regen = 0;
	if (IsSitting() ||(GetHorseId() != 0)) {		//this should be changed so we dont med while camping, etc...
		if(HasSkill(MEDITATE)) {
			medding = true;
			regen = (((GetSkill(MEDITATE)/10)+(level-(level/4)))/4)+4;
			regen += spellbonuses.ManaRegen + itembonuses.ManaRegen;
			CheckIncreaseSkill(MEDITATE, -10);
		}
		else
			regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(level/5);
	}
	else {
		medding = false;
		regen = 2+spellbonuses.ManaRegen+itembonuses.ManaRegen+(level/5);
	}
	regen += GetAA(aaMentalClarity);
	regen += GetAA(aaBodyAndMindRejuvenation);
	regen = (regen * RuleI(Character, ManaRegenMultiplier)) / 100;
	
	SetMana(GetMana() + regen);
	SendManaUpdatePacket();
}
You can just change the line in RED and add or subtract whatever you want. Or you could add another line above it and multiply by something like this:

Code:
regen *= 5;
That would multiple your total regen by 5 before adding in the item and spell bonuses.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
  #4  
Old 12-08-2008, 06:04 PM
kavren
Sarnak
 
Join Date: Feb 2007
Posts: 50
Default

I'm not very good at coding, so this may sound dumb, but...

Doesn't the line "if(HasSkill(MEDITATE))" mean that a person would not only have to be sitting, but also have this skill "meditate"? Which I don't know what that is.

Also,

If I changed this:

Code:
			medding = true;
			regen = (((GetSkill(MEDITATE)/10)+(level-(level/4)))/4)+4;
			regen += spellbonuses.ManaRegen + itembonuses.ManaRegen;
to this:

Code:
			medding = true;
			regen = (((GetSkill(MEDITATE)/10)+(level-(level/4)))/4)+4;
			regen *= 1.2; 
			regen += spellbonuses.ManaRegen + itembonuses.ManaRegen;
Would that increase mana regen by 1.2 percent?
Would it have an effect on HP regen?
Reply With Quote
  #5  
Old 12-08-2008, 06:18 PM
Kobaz
Hill Giant
 
Join Date: Nov 2008
Location: Gold Coast, Oz
Posts: 119
Default

That would increase regen by 20% before items and spells are taken into account. You want

Code:
regen *= 1.012
to get a 1.2% increase.
Reply With Quote
  #6  
Old 12-08-2008, 10:13 PM
kavren
Sarnak
 
Join Date: Feb 2007
Posts: 50
Default

Doesn't the line "if(HasSkill(MEDITATE))" mean that a person would not only have to be sitting, but also have this skill "meditate"? Which I don't know what that is.

Also, does this affect HP in any way, or just mana?
Reply With Quote
  #7  
Old 12-08-2008, 10:30 PM
trevius's Avatar
trevius
Developer
 
Join Date: Aug 2006
Location: USA
Posts: 5,946
Default

Meditate is a skill that that all casting classes get at low level (train it at your class GM trainer). Meditate is what makes you regenerate mana faster when sitting. The higher your skill in Meditate is, the faster you regen mana. You could set it to just regenerate when sitting without having meditate, but that wouldn't exactly be in line with how EQ works.

These changes don't effect HP regen, you would have to change code in DoHPRegen for that.
__________________
Trevazar/Trevius Owner of: Storm Haven
Everquest Emulator FAQ (Frequently Asked Questions) - Read It!
Reply With Quote
Reply


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