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
  #1  
Old 01-22-2010, 12:57 PM
bad_captain
Developer
 
Join Date: Feb 2009
Location: Cincinnati, OH
Posts: 512
Default Focus Effect - > Max Level effectiveness reduction question

Is there a way to make a focus effect max level an actual max level and not begin effectiveness reduction?

Code:
                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;
		}
This code checks to see if the spell level is > maxlevel for the focus effect, then reduces the effectiveness by the lvldiff, which should be specified in the spell table.

The focus effect in question (Pet Focus) has 0 for base2[i], which should be a percentage to reduce per level. With a 0 for per lvl reduction, spell.base2[i]*lvldiff; will = 0, which means lvl modifier will stay at 100. Unless I'm wrong, this means the focus effect will stay at 100% effectiveness for every level, no matter the maxlevel.

Would there be any issue with changing
Code:
if(lvlModifier < 1)
     return 0;
to

Code:
if((lvlModifier < 1) || (spell.base2[i] == 0))
	return 0;
This would make any focus effect which has a per level over maxlevel reduction percentage of 0 stop working completely if the spell level is above the focus effects maxlevel.

If I get this worked out, then I will have finished a relatively scalable pet focus solution, but I want to make sure it will not adversely affect any other spells or code, as I'm not that familiar with spells.
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 06:15 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