• New Horizons on Maelstrom
    Maelstrom New Horizons


    Visit our website www.piratehorizons.com to quickly find download links for the newest versions of our New Horizons mods Beyond New Horizons and Maelstrom New Horizons!

Not a Bug Unneeded function

Levis

Find(Rum) = false;
Staff member
Administrator
Creative Support
Programmer
Storm Modder
@Pieter Boelen this function is useless 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 <--
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?
 
Isn't that the special function I wrote ages ago to make only a doctor's defence skill count for healing wounded crew?
If so, are you sure we should want it removed? I always hoped that logic could be expanded on, but so far that never happened.

Using the captain's skill is most definitely NOT the same. :no
 
Isn't that the special function I wrote ages ago to make only a doctor's defence skill count for healing wounded crew?
If so, are you sure we should want it removed? I always hoped that logic could be expanded on, but so far that never happened.

Using the captain's skill is most definitely NOT the same. :no
The doctor contributes 100% of the skills to the captain for the defense perk at least so effectivly it would be the same right. but I'm fine with keeping it the same for now.
 
Other officers can contribute defence as well.
That code is in place so that it is only the doctor's defence that actually gets used.
In other words: Even a Superman player would STILL need a doctor to be able to make use of that benefit.
Which is exactly the point. :cheeky
 
Back
Top