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

Archive::Development Archive area for Development's posts that were moved here after an inactivity period of 90 days.

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 05-29-2003, 11:50 AM
loudent2
Sarnak
 
Join Date: Apr 2003
Posts: 95
Default

I'm not suggesting you read the database everytime.

Wouldn't it be preferable that you have some class that wraps 2 values. (lets call it CClassSkillCap) Skill cap and Per-Level skill cap. You then have a class that is wraps a vector of classes(eq classes) that each has a vector CClassSkillCap. One for each skill.

Whether you store these in the database or they're hard coded in the source they're read once on start-up. Then when you need to check for max skill you pass in race, class and level

pseudo-pseudo code:

maxskilllevel = Classvector[class].Classskillcap[skill].m_skillcap;
plvlmaxlevel = ((level+1) * (Classvector[class].Classskillcap[skill].m_plvlskillcap))

rlevel = (maxskilllevel > plvlmaxlevel) ? plvlmaxlevel : maxskilllevel;



There might have to be a couple tweaks to handle special advancements, trade skills and race based overrides but it should clean up a great deal of those class switch statements. With the list centralized it would be easier to make edits. The reason I suggested it go in the database is because it would allow world serverops to alter values for their world without re-building the source.
__________________
Ignorance is Bliss
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 10:27 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