DayZ 1.24
Loading...
Searching...
No Matches
ScriptAnalytics.c File Reference

Go to the source code of this file.

Classes

class  StatsEventMeasuresData
 
class  StatsEventDeathData
 
class  StatsEventScoredKillData
 
class  StatsEventDisconnectedData
 
class  StatsEventSpawnedData
 
class  StatsEventData
 
class  Analytics
 

Functions

class StatsEventData SendPlayerDeath (StatsEventDeathData data)
 send event about death to statistic DB
 
void StatsEventData (string eventName)
 
void AddBool (string key, bool value)
 
void AddInt (string key, int value)
 
void AddFloat (string key, float value)
 
void AddString (string key, string value)
 
void AddVector (string key, vector value)
 
static proto native void SendPlayerScoredKill (StatsEventScoredKillData data)
 send event about kill to statistic DB
 
static proto native void SendPlayerDisconnected (StatsEventDisconnectedData data)
 send event to statistic DB
 
static proto native void SendPlayerMeasures (StatsEventMeasuresData data)
 send event about player status to statistic DB
 
static proto native void SendPlayerSpawned (StatsEventSpawnedData data)
 send event about spawning to statistic DB
 
static proto native void SendEvent (StatsEventData data)
 universal analytics event
 

Variables

string m_eventName
 
autoptr map< string, intm_valuesBool
 
autoptr map< string, intm_valuesInt
 
autoptr map< string, floatm_valuesFloat
 
autoptr map< string, stringm_valuesString
 
autoptr map< string, vectorm_valuesVector
 

Function Documentation

◆ AddBool()

void SendPlayerDeath::AddBool ( string key,
bool value )

Definition at line 10 of file ScriptAnalytics.c.

37{
38 string m_CharacterId;
39 int m_CharacterLifetime;
40 string m_Cause;
41 string m_WeaponName;
42 float m_Distance;
44
45 int m_ListDamages[5];
46};
47
48// class binded to engine
50{
51 string m_CharacterId;
52 string m_WeaponName;
53 int m_KillDistance;
56};
57
58// class binded to engine
60{
61 string m_CharacterId;
62 string m_Reason;
63};
64
65// class binded to engine
67{
68 string m_CharacterId;
69 int m_Lifetime;
71 int m_Population;
72 int m_DaytimeHour;
73};
74
75// class binded to engine
77{
78 void StatsEventData(string eventName)
79 {
86 }
87
88 void AddBool(string key, bool value)
89 {
90 m_valuesBool.Insert(key, (int)value);
91 }
92
93 void AddInt(string key, int value)
94 {
95 m_valuesInt.Insert(key, value);
96 }
97
98 void AddFloat(string key, float value)
99 {
100 m_valuesFloat.Insert(key, value);
101 }
102
103 void AddString(string key, string value)
104 {
105 m_valuesString.Insert(key, value);
106 }
107
108 void AddVector(string key, vector value)
109 {
110 m_valuesVector.Insert(key, value);
111 }
112
113 private string m_eventName;
114 private autoptr map<string, int> m_valuesBool;//TODO: use bool instead of int (problem with engine type binding)
119}
120
121
122class ScriptAnalytics
123{
126
129
132
135
138
141};
142
143
144class Analytics
145{
146 // send stats data with log
148 {
149 ScriptAnalytics.SendPlayerDeath(data);
150 }
151
152 // send stats data with log
154 {
155 ScriptAnalytics.SendPlayerScoredKill(data);
156 }
157
158 // send stats data with log
160 {
161 ScriptAnalytics.SendPlayerDisconnected(data);
162 }
163
164 // send stats data with log
166 {
167 ScriptAnalytics.SendPlayerMeasures(data);
168 }
169
170 // send stats data with log
172 {
173 ScriptAnalytics.SendPlayerSpawned(data);
174 }
175}
vector m_Position
Cached world position.
Definition Effect.c:41
static proto native void SendEvent(StatsEventData data)
universal analytics event
static proto native void SendPlayerScoredKill(StatsEventScoredKillData data)
send event about kill to statistic DB
static proto native void SendPlayerMeasures(StatsEventMeasuresData data)
send event about player status to statistic DB
class StatsEventData SendPlayerDeath(StatsEventDeathData data)
send event about death to statistic DB
static proto native void SendPlayerDisconnected(StatsEventDisconnectedData data)
send event to statistic DB
static proto native void SendPlayerSpawned(StatsEventSpawnedData data)
send event about spawning to statistic DB
static void PlayerDisconnected(StatsEventDisconnectedData data)
static void PlayerMeasures(StatsEventMeasuresData data)
static void PlayerSpawned(StatsEventSpawnedData data)
static void PlayerDeath(StatsEventDeathData data)
static void PlayerScoredKill(StatsEventScoredKillData data)
autoptr map< string, int > m_valuesBool
autoptr map< string, int > m_valuesInt
autoptr map< string, vector > m_valuesVector
void AddBool(string key, bool value)
void StatsEventData(string eventName)
void AddInt(string key, int value)
autoptr map< string, float > m_valuesFloat
void AddFloat(string key, float value)
autoptr map< string, string > m_valuesString
void AddVector(string key, vector value)
void AddString(string key, string value)
string m_CharacterId
character ID
string m_Reason
reason of disconnect (quit, kick, ban, sign-out...)
vector m_PositionKiller
position of killer
string m_CharacterId
character ID
int m_KillDistance
distance in meters (rounded) between killer and victim
vector m_PositionVictim
position of victim
string m_WeaponName
name of weapon which killed player (victim)
int m_Lifetime
lifetime of character in seconds
int m_DaytimeHour
current time in hour (hour in 24h)
int m_Population
population of current gameplay (server)
vector m_Position
position of spawn
string m_CharacterId
character ID

◆ AddFloat()

void SendPlayerDeath::AddFloat ( string key,
float value )

Definition at line 20 of file ScriptAnalytics.c.

◆ AddInt()

void SendPlayerDeath::AddInt ( string key,
int value )

Definition at line 15 of file ScriptAnalytics.c.

◆ AddString()

void SendPlayerDeath::AddString ( string key,
string value )

Definition at line 25 of file ScriptAnalytics.c.

◆ AddVector()

void SendPlayerDeath::AddVector ( string key,
vector value )

Definition at line 30 of file ScriptAnalytics.c.

◆ SendEvent()

static proto native void SendEvent ( StatsEventData data)
static

universal analytics event

Referenced by OnEnd(), and OnTick().

◆ SendPlayerDeath()

class StatsEventData SendPlayerDeath ( StatsEventDeathData data)

send event about death to statistic DB

◆ SendPlayerDisconnected()

static proto native void SendPlayerDisconnected ( StatsEventDisconnectedData data)
static

send event to statistic DB

◆ SendPlayerMeasures()

static proto native void SendPlayerMeasures ( StatsEventMeasuresData data)
static

send event about player status to statistic DB

◆ SendPlayerScoredKill()

static proto native void SendPlayerScoredKill ( StatsEventScoredKillData data)
static

send event about kill to statistic DB

◆ SendPlayerSpawned()

static proto native void SendPlayerSpawned ( StatsEventSpawnedData data)
static

send event about spawning to statistic DB

◆ StatsEventData()

void SendPlayerDeath::StatsEventData ( string eventName)

Definition at line 0 of file ScriptAnalytics.c.

2{
3 string m_CharacterId;
4 int m_TimeInterval;
5 int m_DaytimeHour;
6 vector m_PositionStart;
7 vector m_PositionEnd;

Variable Documentation

◆ m_eventName

string m_eventName
private

Definition at line 35 of file ScriptAnalytics.c.

◆ m_valuesBool

autoptr map<string, int> m_valuesBool
private

Definition at line 36 of file ScriptAnalytics.c.

◆ m_valuesFloat

autoptr map<string, float> m_valuesFloat
private

Definition at line 38 of file ScriptAnalytics.c.

◆ m_valuesInt

autoptr map<string, int> m_valuesInt
private

Definition at line 37 of file ScriptAnalytics.c.

◆ m_valuesString

autoptr map<string, string> m_valuesString
private

Definition at line 39 of file ScriptAnalytics.c.

◆ m_valuesVector

autoptr map<string, vector> m_valuesVector
private

Definition at line 40 of file ScriptAnalytics.c.