Beispiel #1
0
void MWMechanics::NpcStats::useSkill (int skillIndex, const ESM::Class& class_, int usageType)
{
    float base = getSkill (skillIndex).getBase();

    int level = static_cast<int> (base);

    base += getSkillGain (skillIndex, class_, usageType);

    if (static_cast<int> (base)!=level)
        base = level+1;

    getSkill (skillIndex).setBase (base);
}
Beispiel #2
0
void MWMechanics::NpcStats::useSkill (int skillIndex, const ESM::Class& class_, int usageType)
{
    // Don't increase skills as a werewolf
    if(mIsWerewolf)
        return;

    MWMechanics::SkillValue& value = getSkill (skillIndex);

    value.setProgress(value.getProgress() + getSkillGain (skillIndex, class_, usageType));

    if (value.getProgress()>=1)
    {
        // skill leveled up
        increaseSkill(skillIndex, class_, false);
    }
}
Beispiel #3
0
void MWMechanics::NpcStats::useSkill (int skillIndex, const ESM::Class& class_, int usageType)
{
    // Don't increase skills as a werewolf
    if(mIsWerewolf)
        return;

    float base = getSkill (skillIndex).getBase();

    int level = static_cast<int> (base);

    base += getSkillGain (skillIndex, class_, usageType);

    if (static_cast<int> (base)!=level)
    {
        // skill leveled up
        increaseSkill(skillIndex, class_, false);
    }
    else
        getSkill (skillIndex).setBase (base);
}