PDA

View Full Version : Questions on some source code


ChaosSlayerZ
10-23-2011, 05:03 PM
I am looking at

http://projecteqemu.googlecode.com/svn/trunk/EQEmuServer/zone/maxskill.h

Take a look for example at this:


// Hybrids
case RANGER: case RANGERGM:{
r_value = 5 + (level*5);
if ( level > 50 ){
if ( r_value > 250 )
r_value = 250;
switch (skillid) {
case PIERCING:{
if ( r_value > 240 )
r_value = 240;
break;
}
default: break;
}
}



If I am reading this right, if ranger ever gets skill in piercing above 240, its forcefully treated as 240 MAX.
Same thing happens to say priests hand to hand skill, which is force caped at 75 etc.

Now I am confused, if that is so, then Skill table in Db is rather useless. If go in and set custom skill caps per level for various classes (like giving priests same hand to hand skill per level as monks have), they would be irrelevant, as this little part of source code above will effectively ignore them, and cap my skills anyway.

Shouldn't server just read the proper values from the Db skill table, cause that what its for? In other words, this forceful capping contradicts supposed freedom of customization granted by the skills table.

Would any devs care to comment?

Derision
10-23-2011, 05:15 PM
Looks like an old header file that isn't used any more. The one that is used is

zone/client.cpp

int16 Client::MaxSkill(SkillType skillid, int16 class_, int16 level) const {
return(database.GetSkillCap(class_, skillid, level));
}



Delete zone/maxskill.h and everything still compiles, ergo it isn't used anymore.

ChaosSlayerZ
10-23-2011, 06:05 PM
ah cool, false alarm then =)
Thanks Derision! =)