DayZ 1.24
Loading...
Searching...
No Matches
ClientData Class Reference
Collaboration diagram for ClientData:
[legend]

Static Private Member Functions

static void ResetClientData ()
 
static void AddPlayerBase (Man player)
 
static void RemovePlayerBase (Man player)
 
static void SyncEvent_PreprocessPlayerList (SyncPlayerList player_list)
 
static void SyncEvent_OnRecievedPlayerList (SyncPlayerList player_list)
 
static array< stringGetSimplePlayerList ()
 
static array< stringGetSimplePlayerList (SyncPlayerList list)
 
static void SyncEvent_OnEntityKilled (SyncEntityKillInfo entity_killed_data)
 
static void SyncEvent_OnPlayerIgnitedFireplace (EFireIgniteType igante_type)
 

Static Private Attributes

static ref ScriptInvoker SyncEvent_OnPlayerListUpdate = new ScriptInvoker()
 
static ref ScriptInvoker SyncEvent_OnEntityKilled = new ScriptInvoker()
 
static ref ScriptInvoker SyncEvent_OnPlayerIgnitedFireplace = new ScriptInvoker()
 
static ref array< Man > m_PlayerBaseList = new array<Man>
 
static ref SyncPlayerList m_PlayerList
 
static ref SyncPlayerList m_LastNewPlayers
 
static ref OnlineServices m_OnlineServices
 

Detailed Description

Definition at line 1 of file ClientData.c.

Member Function Documentation

◆ AddPlayerBase()

static void ClientData::AddPlayerBase ( Man player)
inlinestaticprivate

Definition at line 23 of file ClientData.c.

24 {
27 }
PlayerBase GetPlayer()
static ref array< Man > m_PlayerBaseList
Definition ClientData.c:7
proto native CGame GetGame()

References GetGame(), GetPlayer(), and m_PlayerBaseList.

Referenced by ManBase::Init().

◆ GetSimplePlayerList() [1/2]

static array< string > ClientData::GetSimplePlayerList ( )
inlinestaticprivate

Definition at line 84 of file ClientData.c.

85 {
87 if (m_PlayerList && m_PlayerList.m_PlayerList)
88 {
89 for (int i = 0; i < m_PlayerList.m_PlayerList.Count(); i++)
90 {
91 SyncPlayer player = m_PlayerList.m_PlayerList.Get(i);
92 ids.Insert(player.m_UID);
93 }
94 }
95
96 return ids;
97 }
static ref SyncPlayerList m_PlayerList
Definition ClientData.c:8

References m_PlayerList.

Referenced by OnlineServices::GetPendingInviteList(), BiosSessionService::GetSessionPlayerList(), OnlineServices::SetMultiplayState(), and SyncEvent_OnRecievedPlayerList().

◆ GetSimplePlayerList() [2/2]

static array< string > ClientData::GetSimplePlayerList ( SyncPlayerList list)
inlinestaticprivate

Definition at line 99 of file ClientData.c.

100 {
102 if (list)
103 {
104 for (int i = 0; i < list.m_PlayerList.Count(); i++)
105 {
106 SyncPlayer player = list.m_PlayerList.Get(i);
107 ids.Insert(player.m_UID);
108 }
109 }
110
111 return ids;
112 }

◆ RemovePlayerBase()

static void ClientData::RemovePlayerBase ( Man player)
inlinestaticprivate

Definition at line 29 of file ClientData.c.

30 {
32 m_PlayerBaseList.RemoveItem(player);
33 }

References m_PlayerBaseList.

Referenced by ManBase::EEKilled(), and ManBase::~PlayerBase().

◆ ResetClientData()

static void ClientData::ResetClientData ( )
inlinestaticprivate

Definition at line 13 of file ClientData.c.

14 {
16 m_PlayerBaseList.Clear();
17 if (m_PlayerList && m_PlayerList.m_PlayerList)
18 m_PlayerList.m_PlayerList.Clear();
19 if (m_LastNewPlayers && m_LastNewPlayers.m_PlayerList)
20 m_LastNewPlayers.m_PlayerList.Clear();
21 }
static ref SyncPlayerList m_LastNewPlayers
Definition ClientData.c:9

References m_LastNewPlayers, m_PlayerBaseList, and m_PlayerList.

Referenced by CGame::OnEvent().

◆ SyncEvent_OnEntityKilled()

static void ClientData::SyncEvent_OnEntityKilled ( SyncEntityKillInfo entity_killed_data)
inlinestaticprivate

Definition at line 114 of file ClientData.c.

115 {
116 SyncEvent_OnEntityKilled.Invoke(entity_killed_data.m_EntityVictim, entity_killed_data.m_EntityKiller, entity_killed_data.m_EntitySource, entity_killed_data.m_IsHeadShot);
117 }
static ref ScriptInvoker SyncEvent_OnEntityKilled
Definition ClientData.c:4

References SyncEvent_OnEntityKilled.

◆ SyncEvent_OnPlayerIgnitedFireplace()

static void ClientData::SyncEvent_OnPlayerIgnitedFireplace ( EFireIgniteType igante_type)
inlinestaticprivate

Definition at line 119 of file ClientData.c.

120 {
122 }
static ref ScriptInvoker SyncEvent_OnPlayerIgnitedFireplace
Definition ClientData.c:5

References SyncEvent_OnPlayerIgnitedFireplace.

◆ SyncEvent_OnRecievedPlayerList()

static void ClientData::SyncEvent_OnRecievedPlayerList ( SyncPlayerList player_list)
inlinestaticprivate

Definition at line 51 of file ClientData.c.

52 {
53 if (m_PlayerList && m_PlayerList.m_PlayerList)
54 {
55 //Print("SyncEvent_OnRecievedPlayerList | " + m_PlayerList.m_PlayerList.Count());
56 }
57
59
62 else
64
66
67#ifdef PLATFORM_CONSOLE
68#ifndef PLATFORM_WINDOWS // if app is not on Windows with -XBOX parameter
71 OnlineServices.m_ClientServices.GetSessionService().OnSessionPlayerListUpdate(newPlayersSimple);
72
73 if (new_players.m_PlayerList.Count() > 0)
75
76 if (g_Game.GetGameState() == DayZGameState.IN_GAME)
78#endif
79#endif
80
82 }
DayZGame g_Game
Definition DayZGame.c:3528
static ref ScriptInvoker SyncEvent_OnPlayerListUpdate
Definition ClientData.c:3
static array< string > GetSimplePlayerList()
Definition ClientData.c:84
static bool GetMultiplayState()
static void LoadFriends()
static ref BiosClientServices m_ClientServices
static void LoadPermissions(array< string > player_list)
static void SetMultiplayState(bool state)
static SyncPlayerList Compare(SyncPlayerList a, SyncPlayerList b)

References SyncPlayerList::Compare(), g_Game, OnlineServices::GetMultiplayState(), GetSimplePlayerList(), OnlineServices::LoadFriends(), OnlineServices::LoadPermissions(), OnlineServices::m_ClientServices, m_LastNewPlayers, m_PlayerList, OnlineServices::SetMultiplayState(), and SyncEvent_OnPlayerListUpdate.

Referenced by SyncEvents::OnSyncEvent().

◆ SyncEvent_PreprocessPlayerList()

static void ClientData::SyncEvent_PreprocessPlayerList ( SyncPlayerList player_list)
inlinestaticprivate

Definition at line 35 of file ClientData.c.

36 {
37 foreach (auto sync_player : player_list.m_PlayerList)
38 {
40 if (!identity)
41 {
42 ErrorEx("PlayerIdentity not synchronized before SyncPlayer", ErrorExSeverity.WARNING);
43 continue;
44 }
45
46 sync_player.m_UID = identity.GetPlainId();
47 sync_player.m_PlayerName = identity.GetPlainName();
48 }
49 }
The class that will be instanced (moddable)
Definition gameplay.c:376
ErrorExSeverity
Definition EnDebug.c:62
enum ShapeType ErrorEx

References ErrorEx.

Referenced by SyncEvents::OnSyncEvent().

Member Data Documentation

◆ m_LastNewPlayers

ref SyncPlayerList ClientData::m_LastNewPlayers
staticprivate

◆ m_OnlineServices

ref OnlineServices ClientData::m_OnlineServices
staticprivate

Definition at line 11 of file ClientData.c.

◆ m_PlayerBaseList

ref array<Man> ClientData::m_PlayerBaseList = new array<Man>
staticprivate

◆ m_PlayerList

ref SyncPlayerList ClientData::m_PlayerList
staticprivate

◆ SyncEvent_OnEntityKilled

◆ SyncEvent_OnPlayerIgnitedFireplace

ref ScriptInvoker ClientData::SyncEvent_OnPlayerIgnitedFireplace = new ScriptInvoker()
staticprivate

◆ SyncEvent_OnPlayerListUpdate

ref ScriptInvoker ClientData::SyncEvent_OnPlayerListUpdate = new ScriptInvoker()
staticprivate

The documentation for this class was generated from the following file: