
All checks were successful
Build / Build (push) Successful in 27s
This commit refactors the organization store to utilize the new CRUD (Create, Read, Update, Delete) operations and simplifies several organization-related functions. * **Organization Store CRUD Operations:** Implements a new interface for the organization store, providing methods for creating, reading, updating, and deleting organization data. This includes methods for adding and removing assets, managing funds and reputation, and handling member operations. The store now interfaces with the ArmaDragonflyClient database for persistence. * **Function Simplification:** Simplifies several organization functions by leveraging the new CRUD operations within the organization store. This reduces code duplication and improves readability. Specifically: * `fnc_addAsset.sqf`: Simplified to use the `addAsset` method. * `fnc_removeAsset.sqf`: Simplified to use the `removeAsset` method. * `fnc_create.sqf`: Simplified to use the `createOrg` method. * `fnc_leave.sqf`: Simplified to use the `leaveOrg` method. * `fnc_disband.sqf`: Simplified to use the `deleteOrg` method. * `fnc_addFunds.sqf`: Simplified to use the `updateFunds` method. * `fnc_addReputation.sqf`: Simplified to use the `updateReputation` method. * `fnc_verifyOrgStore.sqf`: Improved to ensure the store is initialized. * **XEH Updates:** Updated `XEH_PREP.hpp` files to reflect the changes in function calls. * **Locker Fix:** Fixed an issue in `fnc_equipGear.sqf` where the `isNull` check was incorrect for certain gear types.
26 lines
471 B
Plaintext
26 lines
471 B
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Function: forge_client_org_fnc_leave
|
|
* Author: J. Schmidt
|
|
*
|
|
* Description:
|
|
* Removes a player from an organization
|
|
*
|
|
* Arguments:
|
|
* None
|
|
*
|
|
* Return Value:
|
|
* Success <BOOL>
|
|
*/
|
|
|
|
private _store = call FUNC(verifyOrgStore);
|
|
private _result = _store call ["leaveOrg", []];
|
|
|
|
if (_result) then {
|
|
TRACE_1("Left organization successfully",_result);
|
|
} else {
|
|
TRACE_1("Failed to leave organization",_result);
|
|
};
|
|
|
|
_result |