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

Protected Member Functions

void OnPlayerToPlayerHit (Man shooter, Man target)
 
void OnEntityKilled (Object killer, EntityAI target)
 
void OnPlayerKilled (Man killer, EntityAI target)
 
void OnInfectedKilled (Man killer, EntityAI target)
 

Private Member Functions

void OnPlayerConnect (Man player)
 
void OnPlayerDisconnect (Man player)
 
void OnEntityHit (EntityAI source, Man target)
 

Private Attributes

const string STAT_DISTANCE = "dist"
 
const string STAT_PLAYTIME = "playtime"
 
const string STAT_PLAYERS_KILLED = "players_killed"
 
const string STAT_INFECTED_KILLED = "infected_killed"
 
const string STAT_LONGEST_SURVIVOR_HIT = "longest_survivor_hit"
 

Detailed Description

Definition at line 1 of file AnalyticsManagerServer.c.

Member Function Documentation

◆ OnEntityHit()

void AnalyticsManagerServer::OnEntityHit ( EntityAI source,
Man target )
inlineprivate

Definition at line 25 of file AnalyticsManagerServer.c.

26 {
27 if (source)
28 {
29 Man survivor = source.GetHierarchyRootPlayer();
30 if (survivor && source.IsWeapon())
32 }
33 }
void OnPlayerToPlayerHit(Man shooter, Man target)

References OnPlayerToPlayerHit().

◆ OnEntityKilled()

void AnalyticsManagerServer::OnEntityKilled ( Object killer,
EntityAI target )
inlineprotected

Definition at line 48 of file AnalyticsManagerServer.c.

49 {
51 if (killerEntity)
52 {
53 Man killerSurvivor = killerEntity.GetHierarchyRootPlayer();
55 {
56 if (target.IsPlayer())
58 else if (target.IsZombie())
60 }
61 }
62 }
void OnPlayerKilled(Man killer, EntityAI target)
void OnInfectedKilled(Man killer, EntityAI target)

References OnInfectedKilled(), and OnPlayerKilled().

◆ OnInfectedKilled()

void AnalyticsManagerServer::OnInfectedKilled ( Man killer,
EntityAI target )
inlineprotected

Definition at line 69 of file AnalyticsManagerServer.c.

70 {
71 killer.StatUpdate(STAT_INFECTED_KILLED, 1);
72 }

References STAT_INFECTED_KILLED.

Referenced by OnEntityKilled().

◆ OnPlayerConnect()

void AnalyticsManagerServer::OnPlayerConnect ( Man player)
inlineprivate

◆ OnPlayerDisconnect()

void AnalyticsManagerServer::OnPlayerDisconnect ( Man player)
inlineprivate

Definition at line 18 of file AnalyticsManagerServer.c.

19 {
20 player.StatUpdateByPosition(STAT_DISTANCE);
21 player.StatUpdateByTime(STAT_PLAYTIME);
22 }

References STAT_DISTANCE, and STAT_PLAYTIME.

◆ OnPlayerKilled()

void AnalyticsManagerServer::OnPlayerKilled ( Man killer,
EntityAI target )
inlineprotected

Definition at line 64 of file AnalyticsManagerServer.c.

65 {
66 killer.StatUpdate(STAT_PLAYERS_KILLED, 1);
67 }

References STAT_PLAYERS_KILLED.

Referenced by OnEntityKilled().

◆ OnPlayerToPlayerHit()

void AnalyticsManagerServer::OnPlayerToPlayerHit ( Man shooter,
Man target )
inlineprotected

Definition at line 35 of file AnalyticsManagerServer.c.

36 {
38 float currentDistance = vector.Distance(shooter.GetPosition(), target.GetPosition());
39 float distanceUpdate;
40
43
45 }
static proto native float Distance(vector v1, vector v2)
Returns the distance between tips of two 3D vectors.

References vector::Distance(), and STAT_LONGEST_SURVIVOR_HIT.

Referenced by OnEntityHit().

Member Data Documentation

◆ STAT_DISTANCE

◆ STAT_INFECTED_KILLED

const string AnalyticsManagerServer::STAT_INFECTED_KILLED = "infected_killed"
private

◆ STAT_LONGEST_SURVIVOR_HIT

const string AnalyticsManagerServer::STAT_LONGEST_SURVIVOR_HIT = "longest_survivor_hit"
private

◆ STAT_PLAYERS_KILLED

const string AnalyticsManagerServer::STAT_PLAYERS_KILLED = "players_killed"
private

◆ STAT_PLAYTIME


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