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

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

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #11  
Old 09-24-2015, 05:49 AM
AdrianD
Discordant
 
Join Date: Dec 2013
Posts: 297
Default

Thanks Uleat.

I understand the concept but the vocab is still a little beyond me.

I figured to add to this thread with a different snippet since the same question applies. It appears to work with 12 > SkillMeditate > 0 in game.

Both #showstats and watching ticks are accurate although client mana# jumps around. Not sure when it normalizes but, a level 50 at max meditate (235) shows the ticks perfectly for a titanium client.

Does this look right/could it be better?

Comments within the code below:
Code:
int32 Client::CalcBaseManaRegen()
{
	uint8 clevel = GetLevel();
	int32 regen = 0;
	if (IsSitting() || (GetHorseId() != 0)) {
		if (HasSkill(SkillMeditate) && GetSkill(SkillMeditate) > 11) { // added GetSkill(SkillMeditate) > 11 so obtaining meditate isn't an immediate detriment at low levels
			regen = ((GetSkill(SkillMeditate) / 12)) + 1; // changed equation
		}
		else {
			regen = 2;
		}
	}
	else {
		regen = 1; // changed to 1 from 2
	}
	return regen;
}

int32 Client::CalcManaRegen()
{
	uint8 clevel = GetLevel();
	int32 regen = 0;
	//this should be changed so we dont med while camping, etc...
	if (IsSitting() || (GetHorseId() != 0)) {
		BuffFadeBySitModifier();
		if (HasSkill(SkillMeditate) && GetSkill(SkillMeditate) > 11) { // added GetSkill(SkillMeditate) > 11 so obtaining meditate isn't an immediate detriment at low levels
			regen = ((GetSkill(SkillMeditate) / 12)) + 1;  // changed equation
			regen += spellbonuses.ManaRegen + itembonuses.ManaRegen;
			CheckIncreaseSkill(SkillMeditate, nullptr, -5);
		}
		else {
			regen = 2 + spellbonuses.ManaRegen + itembonuses.ManaRegen;
		}
	}
	else {
		this->medding = false;
		regen = 1 + spellbonuses.ManaRegen + itembonuses.ManaRegen; // changed to 1 from 2
	}
	//AAs
	regen += aabonuses.ManaRegen;
	return (regen * RuleI(Character, ManaRegenMultiplier) / 100);
}
I'm open to all critique.

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