Skip to content
Version 2.32.0
↓ Get the launcher

SocialPresence structure

A player’s online state as carried by SocialData.basic_data (zproto.BasicData).

The game’s own friends list treats offline_time == 0 as online and any other value as the moment the player went offline; IsOnline follows that rule. proto3 omits zero values, so an online player’s reply simply has no offline_time field.

public struct SocialPresence : IEquatable<SocialPresence>
parameter description
OfflineTimeMs When the player went offline, Unix ms (basic_data.offline_time, field 9); 0 while online. Compare against ServerNowMs for “offline for N minutes”.
OnlineTimeMs When the player last came online, Unix ms (basic_data.online_time, field 16); 0 when the server didn’t send it.
PersonalStates Status ids the player has set (basic_data.personal_state, field 8), in wire order; never null, empty when none. Ids index the game’s ChatStatusTable (e.g. 1 = online, 6 = offline, 2 = in a dungeon); when several are set the game’s friends list shows the one with the highest table priority.
ReceivedAtMs Framework server clock (ServerNowMs domain, Unix ms) when the reply carrying this state arrived; 0 when it arrived before the first server-time sync. Stamped by the framework cache, not the wire.
name description
SocialPresence(…) A player’s online state as carried by SocialData.basic_data (zproto.BasicData).
IsOnline { get; } True when OfflineTimeMs is 0 — the game’s own online test.
OfflineTimeMs { get; set; } When the player went offline, Unix ms (basic_data.offline_time, field 9); 0 while online. Compare against ServerNowMs for “offline for N minutes”.
OnlineTimeMs { get; set; } When the player last came online, Unix ms (basic_data.online_time, field 16); 0 when the server didn’t send it.
PersonalStates { get; set; } Status ids, never null (a default instance reports an empty list).
ReceivedAtMs { get; set; } Framework server clock (ServerNowMs domain, Unix ms) when the reply carrying this state arrived; 0 when it arrived before the first server-time sync. Stamped by the framework cache, not the wire.