enderalse/source/scripts/_00e_func_getpointsinclass.psc

21 lines
527 B
Plaintext
Raw Normal View History

Scriptname _00E_Func_GetPointsInClass Hidden
int Function Run(Formlist akClassPerkformlist) Global
Actor PlayerREF = Game.GetForm(0x14) as Actor
Form[] perkForms = akClassPerkformlist.ToArray()
int PointsSpentInClass
int iClassIndex = 0
While iClassIndex < perkForms.Length
Perk iPerk = perkForms[iClassIndex] as Perk
If iPerk && PlayerREF.HasPerk(iPerk)
PointsSpentInClass += 1
EndIf
iClassIndex += 1
EndWhile
Return PointsSpentInClass
EndFunction