View Single Post
  #1  
Old 09-22-2015, 04:45 PM
AdrianD
Discordant
 
Join Date: Dec 2013
Posts: 297
Default Acceptable/efficient syntax

I made a small change to remove max lvl 1 starting skills in client.cpp.

It appears to work after logging in but, I want to be certain the syntax is correct and if it could be done better.

My comments inside:

Code:
void Client::SetClassStartingSkills(PlayerProfile_Struct *pp)
{
	for (uint32 i = 0; i <= HIGHEST_SKILL; ++i) {
		if (pp->skills[i] == 0); /* added ; just before this comment  commented out 9-22-15 to test starting skills (I do not want max skills at lvl 1)
								{
			// Skip specialized, tradeskills (fishing excluded), Alcohol Tolerance, and Bind Wound
			if (EQEmu::IsSpecializedSkill((SkillUseTypes)i) ||
					(EQEmu::IsTradeskill((SkillUseTypes)i) && i != SkillFishing) ||
					i == SkillAlcoholTolerance || i == SkillBindWound)
				continue;

			pp->skills[i] = database.GetSkillCap(pp->class_, (SkillUseTypes)i, 1);
		} */
	}
}
Thank you.

EDIT: I notice the client shows skills with values > 0 but the DB does not. I suppose the addition of quite a few more lines of code will be needed to account for the removal of the segment above to make accurate.

If this doesn't belong here please move it, thanks.
Reply With Quote