Code:
-----------------------------
Replace \zone\client_process.cpp -line 1275 ish
-----------------------------
else if (gmskill->skillbank == 0x00)
{
// normal skills go here
if (gmskill->skill_id > HIGHEST_SKILL)
{
cout << "Wrong Training Skill (abilities)" << endl;
DumpPacket(app);
return;
}
int8 skilllevel = GetRawSkill(gmskill->skill_id);
//if ( skilllevel == 255)
//{
// // Client never gets this skill; check for gm status or fail
// return;
//}
//else if (skilllevel == 254)
//{
// // Client training new skill for the first time set the skill to level-1
// int16 t_level = database.GetTrainlevel(GetClass(), gmskill->skill_id);
// //cout<<"t_level:"<<t_level<<endl;
// if (t_level == 66 || t_level == 0)
// {
// return;
// }
// //m_pp.skills[gmskill->skill_id + 1] = t_level;
// SetSkill(gmskill->skill_id, t_level);
//}
if (skilllevel == 0) {
int16 t_level = database.GetTrainlevel(GetRace(), GetClass(), gmskill->skill_id);
if (t_level == 66 || t_level == 0)
{
return;
}
SetSkill(gmskill->skill_id, t_level);
}
else if (skilllevel <= 251)
{
// Client train a valid skill
// FIXME If the client doesn't do the "You are more skilled than I" check we should do it here
SetSkill(gmskill->skill_id, skilllevel + 1);
}
else
{
// Log a warning someones been hacking
LogFile->write(EQEMuLog::Error, "OP_GMTrainSkill: failed client: %s", GetName());
return;
}
-----------------
replace \zone\client_packet.cpp -line 5800 ish (redundant code)
-----------------
////validate skills
//for (int sk = 1; sk < MAX_PP_SKILL; sk++) {
// //int cap = GetSkillCap(sk-1);
// //int cap = MaxSkill(sk-1, GetClass(), GetLevel());
// int cap = MaxSkill( sk-1, GetClass(), GetRace(), GetLevel());
// if (cap >= 254)
// m_pp.skills[sk] = cap;
//}
----------------------------
insert \world\net.cpp -line 205 ish
----------------------------
LogFile->write(EQEMuLog::Status, "Loading start skills..");
database.LoadClassSkill(false);
database.LoadClassSkill(true);
--------------
insert \world\client.h -line 70 ish
--------------
void SetClassStartingSkills( PlayerProfile_Struct *pp ); //nolonger used
void SetRaceStartingSkills( PlayerProfile_Struct *pp ); //nolonger used
void SetStartingSkills( PlayerProfile_Struct *pp );
-------------------------------
insert \world\client.cpp -line 1300 ish
--------------------------------
void Client::SetStartingSkills( PlayerProfile_Struct *pp )
{
for (int8 skill=0;skill<=HIGHEST_SKILL;skill++) {
StartSkill = database.GetMaxSkill(skill,(int8)(pp->class_),(int16)(pp->race),0);
if (StartSkill > 0)
pp->skills[skill+1] = StartSkill;
}
}