server/addons/db/functions/fnc_processDBRequest.sqf
Jacob Schmidt bec0adcdbf feat: Update build environment and add XEH PREP
This commit includes the following changes:

-   Updates the build environment in the GitHub Actions workflow to use `ubuntu-latest` instead of `ubuntu-22.04`.
-   Adds `playerGroup2Server` to the XEH_PREP.hpp file.
-   Updates the picture path in CfgMods.hpp to include the file extension.
2025-03-28 09:46:08 -05:00

43 lines
1003 B
Plaintext

#include "..\script_component.hpp"
/*
* Function: forge_server_db_fnc_processDBRequest
* Author: J. Schmidt
*
* Description:
* Processes database requests from clients
*
* Arguments:
* 0: _type - Type of database operation <STRING>
* 1: _data - Data for the operation <ANY>
*
* Return Value:
* Operation result <ANY>
*/
params [["_type", "", [""]], ["_data", nil, []]];
switch (_type) do {
case "getStore": {
params ["_name"];
[_name] call FUNC(getStore);
};
case "saveTostore": {
_data params ["_name", "_data", "_key"];
[_name, _data, _key] call FUNC(saveToStore);
};
case "getFromstore": {
_data params ["_name", "_key"];
[_name, _key] call FUNC(getFromStore);
};
case "loadGameState": {
[] call FUNC(loadGameState);
};
case "saveGameState": {
[_data] call FUNC(saveGameState);
};
default {
WARNING_1("Unknown database request type: %1", _type);
nil
};
};