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
  #4  
Old 02-03-2010, 11:20 AM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default

Also, I believe the calculation for post max level decay is incorrect. It is my understanding that a 30% focus effect that falls off 5% per level would completely decay in 6 levels. 95% of focus effects fall off 5% per level, even ones that have a focus effect of 75%, with a few at 10%. It appears the code only takes off 5% of 30, which would be 28.5% after 1 level, and would take 20 levels to completely fall off.

Code:
int lvlModifier = 100;

.....


case SE_LimitMaxLevel:{
			int lvldiff = (spell.classes[(GetClass()%16) - 1]) - focus_spell.base[i];

			if(lvldiff > 0){ //every level over cap reduces the effect by spell.base2[i] percent
				lvlModifier -= spell.base2[i]*lvldiff;
				if(lvlModifier < 1)
					return 0;
			}
			break;
		}

....

return(value*lvlModifier/100);
So currently, for a 1 level difference, lvlModifier -= spell.base2[i]*lvldiff would be 100 -= 5*1 which equals 95. Then, it would return 30 * 95/100, which would be 28.5.

It seems like it should be
Code:
int lvlModifier = 0;

.....

case SE_LimitMaxLevel:{
			int lvldiff = (spell.classes[(GetClass()%16) - 1]) - focus_spell.base[i];

			if(lvldiff > 0){ //every level over cap reduces the effect by spell.base2[i] percent
				lvlModifier = spell.base2[i]*lvldiff;  //%perLvl * lvls
				if(lvlModifier >= value)  //too many lvl diff. - effectiveness now 0
					return 0;
			}
			break;
		}

....

return(value - lvlModifier);
So with this code, for a 1 level difference, lvlModifier = spell.base2[i]*lvldiff would be lvlModifier = 5*1 which equals 5. Then, it would return 30 - 5, which would be 25, leaving it at 25% focus effect.

Unless I am incorrect in my understanding of how the falloff works, then I guess disregard. But as a Magician summoning focus effect items all the time, I'm almost certain I remember talk of focus effects losing effectiveness after 4-5 levels.
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 03:21 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