2017-10-20 02:00:49 +00:00
|
|
|
class ExtTraderContainer_PlayerInfo extends KFGFxTraderContainer_PlayerInfo;
|
|
|
|
|
|
|
|
function SetPerkInfo()
|
|
|
|
{
|
|
|
|
local Ext_PerkBase CurrentPerk;
|
|
|
|
local ExtPlayerController KFPC;
|
|
|
|
local float V;
|
|
|
|
|
|
|
|
KFPC = ExtPlayerController(GetPC());
|
2020-11-28 20:12:58 +00:00
|
|
|
if (KFPC!=none && KFPC.ActivePerkManager!=None && KFPC.ActivePerkManager.CurrentPerk!=None)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
|
|
|
CurrentPerk = KFPC.ActivePerkManager.CurrentPerk;
|
|
|
|
SetString("perkName", CurrentPerk.PerkName);
|
|
|
|
SetString("perkIconPath", CurrentPerk.GetPerkIconPath(CurrentPerk.CurrentLevel));
|
|
|
|
SetInt("perkLevel", CurrentPerk.CurrentLevel);
|
|
|
|
V = CurrentPerk.GetProgressPercent()*100.f;
|
|
|
|
SetInt("xpBarValue", int(V));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
function SetPerkList()
|
|
|
|
{
|
|
|
|
local GFxObject PerkObject;
|
|
|
|
local GFxObject DataProvider;
|
|
|
|
local ExtPlayerController KFPC;
|
|
|
|
local byte i;
|
|
|
|
local float PerkPercent;
|
|
|
|
local Ext_PerkBase P;
|
|
|
|
|
|
|
|
KFPC = ExtPlayerController(GetPC());
|
2020-11-28 20:12:58 +00:00
|
|
|
if (KFPC != none && KFPC.ActivePerkManager!=None)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
2020-11-28 19:53:57 +00:00
|
|
|
DataProvider = CreateArray();
|
2017-10-20 02:00:49 +00:00
|
|
|
|
|
|
|
for (i = 0; i < KFPC.ActivePerkManager.UserPerks.Length; i++)
|
|
|
|
{
|
|
|
|
P = KFPC.ActivePerkManager.UserPerks[i];
|
2020-11-28 20:04:55 +00:00
|
|
|
PerkObject = CreateObject("Object");
|
2017-10-20 02:00:49 +00:00
|
|
|
PerkObject.SetString("name", P.PerkName);
|
|
|
|
PerkObject.SetString("perkIconSource", P.GetPerkIconPath(P.CurrentLevel));
|
|
|
|
PerkObject.SetInt("level", P.CurrentLevel);
|
|
|
|
|
|
|
|
PerkPercent = P.GetProgressPercent()*100.f;
|
|
|
|
PerkObject.SetInt("perkXP", int(PerkPercent));
|
|
|
|
|
|
|
|
DataProvider.SetElementObject(i, PerkObject);
|
|
|
|
}
|
|
|
|
|
|
|
|
SetObject("perkList", DataProvider);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
defaultproperties
|
|
|
|
{
|
|
|
|
}
|