epoch groups system

move "Delete Group" button check to onLoad from button click.
Remove owner from EPOCH_sendRemoteExecClient calls.
Add UI update push to leader on Delete Group.
Add UI update push to client on remove in case they clicked leave group.
This commit is contained in:
DESKTOP-UH65DCE\MusTanG 2017-08-30 03:14:13 -05:00
parent 56283e0c08
commit d90eb4774f
6 changed files with 9 additions and 5 deletions

View File

@ -16,7 +16,6 @@
private ["_BtnLeave","_ret","_txt"];
//[[[end]]]
disableSerialization;
_BtnLeave = (findDisplay -1300) displayCtrl 31;
Epoch_my_Group params [
["_groupName",""],
["_leaderName",""],
@ -25,7 +24,6 @@ Epoch_my_Group params [
["_memberArray",[]]
];
if (getPlayerUID player == Epoch_my_GroupUID) then {
_BtnLeave ctrlSetText "Delete Group";
_txt = format["Do you want to delete your Group called %1?",_groupName];
_txt spawn {
_ret = [_this,"Epoch Group Menu",true,true] call BIS_fnc_GUImessage;

View File

@ -82,6 +82,10 @@ if (_currentMaxMember < _groupSize) then {
};
};
if (_playerIsLeader) then {
(findDisplay -1300) displayCtrl 31 ctrlSetText "Delete Group";
};
{
_picture = EPOCH_group_level_img select _forEachIndex; //0 = lead / 1 = mod / 2 = member

View File

@ -60,8 +60,8 @@ if (_current_crypto >= _upgradePrice) then {
_contentArray = [_groupName, _leaderName, EPOCH_group_upgrade_lvl_SEPXVar select 0, [], []];
[["groupUpdate", _contentArray], (owner _leader)] call EPOCH_sendRemoteExecClient;
[["groupUidUpdate", _groupID], (owner _leader)] call EPOCH_sendRemoteExecClient;
[["groupUpdate", _contentArray], _leader] call EPOCH_sendRemoteExecClient;
[["groupUidUpdate", _groupID], _leader] call EPOCH_sendRemoteExecClient;
_leader setVariable ["GROUP", _groupID];

View File

@ -30,5 +30,6 @@ if (_groupID != "") then {
} forEach (allPlayers select {(_x getVariable["GROUP", ""]) == _groupID});
_return = ["Group", _groupID] call EPOCH_fnc_server_hiveDEL;
[["groupUpdate", []], _player] call EPOCH_sendRemoteExecClient;
};
_return

View File

@ -87,6 +87,7 @@ if ((_response select 0) == 1 && (_response select 1) isEqualType []) then {
_x setVariable ["GROUP", nil];
[_x] joinSilent (createGroup [west, true]);
[["resetGroup", true], _x] call EPOCH_sendRemoteExecClient;
[["groupUpdate", []], _x] call EPOCH_sendRemoteExecClient;
} forEach (_allPlayers select {getPlayerUID _x == _selectedPlayerUID});
{
if (_x select 0 == _selectedPlayerUID) exitWith {

View File

@ -37,7 +37,6 @@ if (_groupID != "") then {
_x setVariable ["TEMPGROUP", nil];
[["resetTempGroup", true], _x] call EPOCH_sendRemoteExecClient;
[["tempGroupUpdate", []], _x] call EPOCH_sendRemoteExecClient;
if (isNull _group) then {
_group = createGroup [west, true];
};
@ -45,6 +44,7 @@ if (_groupID != "") then {
} forEach (allPlayers select {(_x getVariable["TEMPGROUP", ""]) == _groupID});
//_return = ["TempGroup", _groupID] call EPOCH_fnc_server_hiveDEL;
[["tempGroupUpdate", []], _player] call EPOCH_sendRemoteExecClient;
_return = true;
};
_return