Go Back   EQEmulator Home > EQEmulator Forums > Development > Development::Development

Development::Development Forum for development topics and for those interested in EQEMu development. (Not a support forum)

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 10-09-2006, 07:42 AM
KLS
Administrator
 
Join Date: Sep 2006
Posts: 1,348
Default

I store the endurance in the Player Profile in this so you should zone with the endurance you had in your PP from the last known save. The problem is that right now endurance isn't tracked at all by the server so you can't save what you can't track.

I looked at the code this morn after I had finished writing it last night and noticed a few oversights on my part. I send two manachange packets per tic and this could be combined with the one that's sent for mana. Would need to be reconfigured to work if you don't have any mana, perhaps in a similar way by tracking the last changed endurance as well. Right now the way I did it is horribly inefficient.

Another was my CalcMaxEnd(), the code I used allocated a lot of pointless variables, and I also got it from someone else and while I can't really change the wording of the formula and while I take no credit for the function I didn't think it right to keep the entire function exactly the same as it was.
Code:
void Client::CalcMaxEnd()
{
	int Stats = GetSTR()+GetSTA()+GetDEX()+GetAGI();
	max_end = ( int( min( Stats, 800 ) / 4 ) * 0.075 * GetLevel() );
	max_end += int( max( ( min( Stats, 800 ) - 400 ), 0 ) / 4 ) * ( 0.075 * GetLevel() );
	max_end += int( max( ( min( Stats, 800 ) - 400 ), 0 ) / 8 ) * ( 0.075 * GetLevel() );
	max_end += int( max( Stats - 800, 0 ) / 8 ) * ( 0.075 * GetLevel() ) * 2;
	max_end += int( max( Stats - 800, 0 ) / 16 ) * ( 0.075 * GetLevel() );
	max_end += GetLevel()*15 + spellbonuses.Endurance + itembonuses.Endurance;
}
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:32 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