Sample Code for Core bug 36

Post Reply
xworndownx
Posts: 12
Joined: Fri Jul 27, 2012 1:25 pm

Sample Code for Core bug 36

Post by xworndownx » 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.

Loraunt
Developer
Posts: 15
Joined: Thu Jul 19, 2012 9:45 pm

Re: Sample Code for Core bug 36

Post by Loraunt » Sun Jul 29, 2012 12:05 pm


Post Reply