Sample Code for Core bug 36
Posted: Sat Jul 28, 2012 9:12 pm
Core bug 36: Weapon Skill list building ignores cap by job level
charutils.cpp
core line 1422
replaced
if ((PChar->RealSkills.skill[skill]/10) >= PSkill->getSkillLevel() && (PSkill->getJob(curMainJob) > 0 || PSkill->getJob(curSubJob) > 0))
with
if (PChar->GetSkill(skill) >= PSkill->getSkillLevel() && (PSkill->getJob(curMainJob) > 0 || PSkill->getJob(curSubJob) > 0))
Using RealSkills.skill[skill]/10 is pulling a player's max skill regardless of their level. Pulling their current skill level with GetSkill(skill) can remedy that. Only did a few tests on it and appeared to be fine.
charutils.cpp
core line 1422
replaced
if ((PChar->RealSkills.skill[skill]/10) >= PSkill->getSkillLevel() && (PSkill->getJob(curMainJob) > 0 || PSkill->getJob(curSubJob) > 0))
with
if (PChar->GetSkill(skill) >= PSkill->getSkillLevel() && (PSkill->getJob(curMainJob) > 0 || PSkill->getJob(curSubJob) > 0))
Using RealSkills.skill[skill]/10 is pulling a player's max skill regardless of their level. Pulling their current skill level with GetSkill(skill) can remedy that. Only did a few tests on it and appeared to be fine.