@Pieter Boelen this function is useless right?
If the officer is part of your party he or she will contribute the skills to the captain.
It's now only used for the wounded crew calculation, and in that case it can just use the skill of the captain right?
Code:
int CharacterGetOfficerSkill(ref _refCharacter, string OfficerType, string skillName)
{
int i, cn;
int skillvalue = 0;
if(IsMainCharacter(_refCharacter))
{
int num = GetPassengersQuantity(_refCharacter);
for(i = 0; i < num; i++)
{
cn = GetPassenger(_refCharacter, i);
if(cn < 0) continue;
if(GetAttribute(GetCharacter(cn),"quest.officertype") == OfficerType &&
!IsPrisoner(GetCharacter(cn)) && !IsCompanion(GetCharacter(cn)))
{
if(CalcCharacterSkill(GetCharacter(cn), skillName) > skillvalue)
skillvalue = CalcCharacterSkill(GetCharacter(cn), skillName);
}
}
}
else
{
for(i = 1; i < OFFICER_MAX; i++)
{
cn = GetOfficersIndex(&_refCharacter,i);
if(cn < 0) continue;
if(GetAttribute(GetCharacter(cn),"quest.officertype") == OfficerType &&
!IsPrisoner(GetCharacter(cn)) && !IsCompanion(GetCharacter(cn)))
{
if(CalcCharacterSkill(GetCharacter(cn), skillName) > skillvalue)
skillvalue = CalcCharacterSkill(GetCharacter(cn), skillName);
}
}
}
return skillvalue;
}
// PB <--
It's now only used for the wounded crew calculation, and in that case it can just use the skill of the captain right?