
This commit introduces several changes related to database interactions and client-side functionality: * **Database Response Handling:** Implements a mechanism to handle responses from server requests, specifically for database operations. This includes setting up a callback system to process results based on request IDs. * **Store Functionality:** Corrects a typo in the `fnc_buyItem.sqf` script, changing `EFUNC(armory,addArmoryItem)` to `EFUNC(arsenal,addArmoryItem)`. * **Inventory Management:** Improves the `fnc_moveInventory.sqf` script by correcting a conditional statement to ensure proper handling of inventory items. * **Configuration Updates:** Updates the mod configuration (`CfgMods.hpp`) to use the correct path for the mod picture. * **Client Initialization:** Adds a client registration call to the server during client post-initialization (`XEH_postInit_client.sqf`). * **Workflow Update:** Updates the build workflow to use the latest Ubuntu runner. * **Database Preparation:** Removes unnecessary preparations from `XEH_postInit.sqf` and `XEH_PREP.hpp`.
33 lines
944 B
Plaintext
33 lines
944 B
Plaintext
#include "..\script_component.hpp"
|
|
|
|
/*
|
|
* Function: forge_client_org_fnc_disband
|
|
* Author: J. Schmidt
|
|
*
|
|
* Description:
|
|
* Disbands an organization if requested by the owner
|
|
*
|
|
* Arguments:
|
|
* 0: _uid - UID of the player attempting to disband <STRING>
|
|
* 1: _name - Organization name <STRING>
|
|
*
|
|
* Return Value:
|
|
* Success <BOOL>
|
|
*/
|
|
|
|
params [["_uid", "", [""]], ["_name", "", [""]]];
|
|
|
|
if (_uid == "" || _name == "") exitWith { TRACE_2("Invalid parameters for disbanding organization",_uid,_name); false };
|
|
|
|
private _store = call FUNC(verifyOrgStore);
|
|
private _key = format ["%1_%2", _uid, _name];
|
|
private _org = _store call ["getByKey", [_key]];
|
|
|
|
if (isNil "_org") exitWith { TRACE_1("Organization not found",_key); false };
|
|
if ((_org get "owner") != _uid) exitWith { TRACE_2("Player is not the owner of this organization",_uid,_name); false };
|
|
|
|
_store call ["delete", [_key]];
|
|
|
|
TRACE_1("Organization disbanded successfully",_name);
|
|
|
|
true |