|
|
|
@ -298,8 +298,8 @@ bool sortBySkill (const UnitInfo *d1, const UnitInfo *d2)
|
|
|
|
|
{
|
|
|
|
|
if (sort_skill != job_skill::NONE)
|
|
|
|
|
{
|
|
|
|
|
df::unit_skill *s1 = binsearch_in_vector<df::unit_skill,df::enum_field<df::job_skill,int16_t>>(d1->unit->status.current_soul->skills, &df::unit_skill::id, sort_skill);
|
|
|
|
|
df::unit_skill *s2 = binsearch_in_vector<df::unit_skill,df::enum_field<df::job_skill,int16_t>>(d2->unit->status.current_soul->skills, &df::unit_skill::id, sort_skill);
|
|
|
|
|
df::unit_skill *s1 = binsearch_in_vector<df::unit_skill,df::job_skill>(d1->unit->status.current_soul->skills, &df::unit_skill::id, sort_skill);
|
|
|
|
|
df::unit_skill *s2 = binsearch_in_vector<df::unit_skill,df::job_skill>(d2->unit->status.current_soul->skills, &df::unit_skill::id, sort_skill);
|
|
|
|
|
int l1 = s1 ? s1->rating : 0;
|
|
|
|
|
int l2 = s2 ? s2->rating : 0;
|
|
|
|
|
int e1 = s1 ? s1->experience : 0;
|
|
|
|
@ -1030,7 +1030,7 @@ void viewscreen_unitlaborsst::render()
|
|
|
|
|
fg = 9;
|
|
|
|
|
if (columns[col_offset].skill != job_skill::NONE)
|
|
|
|
|
{
|
|
|
|
|
df::unit_skill *skill = binsearch_in_vector<df::unit_skill,df::enum_field<df::job_skill,int16_t>>(unit->status.current_soul->skills, &df::unit_skill::id, columns[col_offset].skill);
|
|
|
|
|
df::unit_skill *skill = binsearch_in_vector<df::unit_skill,df::job_skill>(unit->status.current_soul->skills, &df::unit_skill::id, columns[col_offset].skill);
|
|
|
|
|
if ((skill != NULL) && (skill->rating || skill->experience))
|
|
|
|
|
{
|
|
|
|
|
int level = skill->rating;
|
|
|
|
@ -1086,7 +1086,7 @@ void viewscreen_unitlaborsst::render()
|
|
|
|
|
}
|
|
|
|
|
else
|
|
|
|
|
{
|
|
|
|
|
df::unit_skill *skill = binsearch_in_vector<df::unit_skill,df::enum_field<df::job_skill,int16_t>>(unit->status.current_soul->skills, &df::unit_skill::id, columns[sel_column].skill);
|
|
|
|
|
df::unit_skill *skill = binsearch_in_vector<df::unit_skill,df::job_skill>(unit->status.current_soul->skills, &df::unit_skill::id, columns[sel_column].skill);
|
|
|
|
|
if (skill)
|
|
|
|
|
{
|
|
|
|
|
int level = skill->rating;
|
|
|
|
|