change to 1 row per session (networkId)

This commit is contained in:
2023-06-13 17:56:00 -07:00
parent 2cbfdcd512
commit 7608df9e53
8 changed files with 130 additions and 28 deletions

View File

@@ -3,11 +3,13 @@ params [
["_playerId", ""],
["_playerUID", ""],
["_profileName", ""],
["_steamName", ""]
["_steamName", ""],
["_rowID", nil]
];
private _hash = + (AttendanceTracker getVariable ["missionContext", createHashMap]);
_hash set ["networkId", netID player]
_hash set ["eventType", _eventType];
_hash set ["playerId", _playerId];
_hash set ["playerUID", _playerUID];
@@ -17,6 +19,11 @@ _hash set ["isJIP", false];
_hash set ["roleDescription", ""];
_hash set ["missionHash", missionNamespace getVariable ["AttendanceTracker_missionHash", ""]];
"AttendanceTracker" callExtension ["logAttendance", [[_hash] call CBA_fnc_encodeJSON]];
if (!isNil "_rowID") then {
_hash set ["rowID", _rowID];
"AttendanceTracker" callExtension ["writeDisconnectEvent", [[_hash] call CBA_fnc_encodeJSON]];
} else {
"AttendanceTracker" callExtension ["writeAttendance", [[_hash] call CBA_fnc_encodeJSON]];
};
true;