2017-10-20 02:00:49 +00:00
|
|
|
class ExtWidget_PartyInGame extends KFGFxWidget_PartyInGame;
|
|
|
|
|
|
|
|
var class<Ext_PerkBase> PPerkSlots[6];
|
|
|
|
var byte PPerkLevels[6];
|
|
|
|
|
2017-10-20 07:02:53 +00:00
|
|
|
struct ExtMemberSlotStruct
|
|
|
|
{
|
|
|
|
var class<Ext_PerkBase> PerkClass;
|
|
|
|
|
|
|
|
structdefaultproperties
|
|
|
|
{
|
|
|
|
PerkClass=none
|
|
|
|
}
|
|
|
|
};
|
|
|
|
var ExtMemberSlotStruct ExtMemberSlots[13];
|
|
|
|
|
2020-11-28 20:04:55 +00:00
|
|
|
function GFxObject RefreshSlot(int SlotIndex, KFPlayerReplicationInfo KFPRI)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
|
|
|
local string PlayerName;
|
|
|
|
local UniqueNetId AdminId;
|
|
|
|
local bool bIsLeader;
|
|
|
|
local bool bIsMyPlayer;
|
2017-10-20 07:02:53 +00:00
|
|
|
local ExtPlayerController EPC;
|
2020-01-09 11:05:13 +00:00
|
|
|
local GFxObject PlayerInfoObject, PerkIconObject;
|
2017-10-20 02:00:49 +00:00
|
|
|
local ExtPlayerReplicationInfo EPRI;
|
|
|
|
|
|
|
|
PlayerInfoObject = CreateObject("Object");
|
2017-10-20 07:02:53 +00:00
|
|
|
EPC = ExtPlayerController(GetPC());
|
|
|
|
|
2020-11-28 20:12:58 +00:00
|
|
|
if (KFPRI != none)
|
2017-10-20 07:02:53 +00:00
|
|
|
{
|
|
|
|
EPRI = ExtPlayerReplicationInfo(KFPRI);
|
|
|
|
}
|
2020-11-28 20:12:58 +00:00
|
|
|
if (OnlineLobby != none)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
2020-11-28 20:04:55 +00:00
|
|
|
OnlineLobby.GetLobbyAdmin(OnlineLobby.GetCurrentLobbyId(), AdminId);
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|
2017-10-20 07:02:53 +00:00
|
|
|
bIsLeader = EPRI.UniqueId == AdminId;
|
2017-10-20 02:00:49 +00:00
|
|
|
PlayerInfoObject.SetBool("bLeader", bIsLeader);
|
2017-10-20 07:02:53 +00:00
|
|
|
bIsMyPlayer = EPC.PlayerReplicationInfo.UniqueId == KFPRI.UniqueId;
|
|
|
|
ExtMemberSlots[SlotIndex].PerkClass = EPRI.ECurrentPerk;
|
2017-10-20 02:00:49 +00:00
|
|
|
PlayerInfoObject.SetBool("myPlayer", bIsMyPlayer);
|
2020-11-28 20:12:58 +00:00
|
|
|
if (ExtMemberSlots[SlotIndex].PerkClass != none)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
2020-01-09 11:05:13 +00:00
|
|
|
PerkIconObject = CreateObject("Object");
|
|
|
|
PerkIconObject.SetString("perkIcon", ExtMemberSlots[SlotIndex].PerkClass.static.GetPerkIconPath(EPRI.ECurrentPerkLevel));
|
|
|
|
PlayerInfoObject.SetObject("perkImageSource", PerkIconObject);
|
2020-11-28 19:53:57 +00:00
|
|
|
|
2017-10-20 07:02:53 +00:00
|
|
|
PlayerInfoObject.SetString("perkLevel", string(EPRI.ECurrentPerkLevel));
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|
2020-11-28 20:12:58 +00:00
|
|
|
if (!bIsMyPlayer)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
2017-10-20 07:02:53 +00:00
|
|
|
PlayerInfoObject.SetBool("muted", EPC.IsPlayerMuted(EPRI.UniqueId));
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|
2020-11-28 20:12:58 +00:00
|
|
|
if (class'WorldInfo'.static.IsE3Build())
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
2017-10-20 07:02:53 +00:00
|
|
|
PlayerName = EPRI.PlayerName;
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2017-10-20 07:02:53 +00:00
|
|
|
PlayerName = EPRI.PlayerName;
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|
|
|
|
PlayerInfoObject.SetString("playerName", PlayerName);
|
2020-11-28 20:12:58 +00:00
|
|
|
if (class'WorldInfo'.static.IsConsoleBuild(CONSOLE_Orbis))
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
2017-10-20 07:02:53 +00:00
|
|
|
PlayerInfoObject.SetString("profileImageSource", "img://"$KFPC.GetPS4Avatar(PlayerName));
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|
|
|
|
else
|
|
|
|
{
|
2017-10-20 07:02:53 +00:00
|
|
|
PlayerInfoObject.SetString("profileImageSource", "img://"$KFPC.GetSteamAvatar(EPRI.UniqueId));
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|
2020-11-28 20:12:58 +00:00
|
|
|
if (KFGRI != none)
|
2017-10-20 02:00:49 +00:00
|
|
|
{
|
2017-10-20 07:02:53 +00:00
|
|
|
PlayerInfoObject.SetBool("ready", EPRI.bReadyToPlay && !KFGRI.bMatchHasBegun);
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|
|
|
|
|
2017-10-20 07:02:53 +00:00
|
|
|
return PlayerInfoObject;
|
|
|
|
}
|
|
|
|
|
|
|
|
DefaultProperties
|
|
|
|
{
|
2017-10-20 02:00:49 +00:00
|
|
|
}
|