mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Send new group to server for update
This commit is contained in:
@@ -4,7 +4,7 @@ _group = group player;
|
|||||||
if (count (units _group) == 1 or (!isNil "dayz_groupDisbandThread" && {!scriptDone dayz_groupDisbandThread})) exitWith {};
|
if (count (units _group) == 1 or (!isNil "dayz_groupDisbandThread" && {!scriptDone dayz_groupDisbandThread})) exitWith {};
|
||||||
|
|
||||||
dayz_groupDisbanded = nil;
|
dayz_groupDisbanded = nil;
|
||||||
PVDZ_Server_UpdateGroup = [4,player];
|
PVDZ_Server_UpdateGroup = [4,player,_group];
|
||||||
publicVariableServer "PVDZ_Server_UpdateGroup";
|
publicVariableServer "PVDZ_Server_UpdateGroup";
|
||||||
|
|
||||||
dayz_groupDisbandThread = _group spawn {
|
dayz_groupDisbandThread = _group spawn {
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ if (count dayz_myGroup > 1 && {!dayz_requireRadio or {dayz_requireRadio && "Item
|
|||||||
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
|
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
|
||||||
|
|
||||||
// Update saved group in DB
|
// Update saved group in DB
|
||||||
PVDZ_Server_UpdateGroup = [0,player];
|
PVDZ_Server_UpdateGroup = [0,player,_x];
|
||||||
publicVariableServer "PVDZ_Server_UpdateGroup";
|
publicVariableServer "PVDZ_Server_UpdateGroup";
|
||||||
};
|
};
|
||||||
} count allGroups;
|
} count allGroups;
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
private ["_display","_inviter","_inviteText","_inviterUID","_oldGroup","_rejectButton","_uid"];
|
private ["_display","_inviter","_inviteText","_inviterUID","_newGroup","_oldGroup","_rejectButton","_uid"];
|
||||||
|
|
||||||
_display = findDisplay 80000;
|
_display = findDisplay 80000;
|
||||||
_rejectButton = _display displayCtrl 8;
|
_rejectButton = _display displayCtrl 8;
|
||||||
@@ -25,11 +25,12 @@ _inviter = _inviterUID call dayz_getPlayer;
|
|||||||
|
|
||||||
if (!isNull _inviter) then {
|
if (!isNull _inviter) then {
|
||||||
_oldGroup = group player;
|
_oldGroup = group player;
|
||||||
[player] join (group _inviter);
|
_newGroup = group _inviter;
|
||||||
|
[player] join _newGroup;
|
||||||
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
|
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
|
||||||
|
|
||||||
// Update saved group in DB
|
// Update saved group in DB
|
||||||
PVDZ_Server_UpdateGroup = [1,player];
|
PVDZ_Server_UpdateGroup = [1,player,_newGroup];
|
||||||
publicVariableServer "PVDZ_Server_UpdateGroup";
|
publicVariableServer "PVDZ_Server_UpdateGroup";
|
||||||
} else {
|
} else {
|
||||||
systemChat localize "STR_EPOCH_INVITE_EXPIRED";
|
systemChat localize "STR_EPOCH_INVITE_EXPIRED";
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ if (isNull _target or _target == player or player != leader group player) exitWi
|
|||||||
|
|
||||||
[_target] join grpNull;
|
[_target] join grpNull;
|
||||||
|
|
||||||
PVDZ_Server_UpdateGroup = [2,player,_targetUID];
|
PVDZ_Server_UpdateGroup = [2,player,(group player),_targetUID];
|
||||||
publicVariableServer "PVDZ_Server_UpdateGroup";
|
publicVariableServer "PVDZ_Server_UpdateGroup";
|
||||||
|
|
||||||
call dayz_selectGroupMember; //update lbCurSel change
|
call dayz_selectGroupMember; //update lbCurSel change
|
||||||
@@ -4,7 +4,7 @@ _group = units group player;
|
|||||||
if (count _group == 1 or (!isNil "dayz_groupLeaveThread" && {!scriptDone dayz_groupLeaveThread})) exitWith {};
|
if (count _group == 1 or (!isNil "dayz_groupLeaveThread" && {!scriptDone dayz_groupLeaveThread})) exitWith {};
|
||||||
|
|
||||||
dayz_groupLeft = nil;
|
dayz_groupLeft = nil;
|
||||||
PVDZ_Server_UpdateGroup = [3,player];
|
PVDZ_Server_UpdateGroup = [3,player,(group player)];
|
||||||
publicVariableServer "PVDZ_Server_UpdateGroup";
|
publicVariableServer "PVDZ_Server_UpdateGroup";
|
||||||
|
|
||||||
dayz_groupLeaveThread = [] spawn {
|
dayz_groupLeaveThread = [] spawn {
|
||||||
|
|||||||
@@ -1,8 +1,9 @@
|
|||||||
private ["_event","_groupUIDs","_key","_newGroup","_player","_playerUID","_targetUID"];
|
private ["_event","_group","_groupUIDs","_key","_newGroup","_player","_playerUID","_targetUID"];
|
||||||
|
|
||||||
_event = _this select 0;
|
_event = _this select 0;
|
||||||
_player = _this select 1;
|
_player = _this select 1;
|
||||||
_targetUID = if (count _this > 2) then {_this select 2} else {"0"};
|
_group = _this select 2;
|
||||||
|
_targetUID = if (count _this > 3) then {_this select 3} else {"0"};
|
||||||
_playerUID = getPlayerUID _player;
|
_playerUID = getPlayerUID _player;
|
||||||
|
|
||||||
_groupUIDs = [];
|
_groupUIDs = [];
|
||||||
@@ -10,7 +11,7 @@ _groupUIDs = [];
|
|||||||
if (alive _x && isPlayer _x) then {
|
if (alive _x && isPlayer _x) then {
|
||||||
_groupUIDs set [count _groupUIDs,getPlayerUID _x];
|
_groupUIDs set [count _groupUIDs,getPlayerUID _x];
|
||||||
};
|
};
|
||||||
} count (units group _player);
|
} count (units _group);
|
||||||
|
|
||||||
_newGroup = [];
|
_newGroup = [];
|
||||||
_newGroup = switch _event do {
|
_newGroup = switch _event do {
|
||||||
|
|||||||
@@ -103,8 +103,7 @@ if (isServer) then {
|
|||||||
"PVDZE_handleSafeGear" addPublicVariableEventHandler {(_this select 1) spawn server_handleSafeGear};
|
"PVDZE_handleSafeGear" addPublicVariableEventHandler {(_this select 1) spawn server_handleSafeGear};
|
||||||
"PVDZE_fullobj_Publish" addPublicVariableEventHandler {(_this select 1) call server_publishFullObject}; // PlotForLife take base ownership
|
"PVDZE_fullobj_Publish" addPublicVariableEventHandler {(_this select 1) call server_publishFullObject}; // PlotForLife take base ownership
|
||||||
if (dayz_groupSystem) then {
|
if (dayz_groupSystem) then {
|
||||||
//Use spawn instead of call because small delay is needed for group changes to propagate to server
|
"PVDZ_Server_UpdateGroup" addPublicVariableEventHandler {(_this select 1) call server_updateGroup};
|
||||||
"PVDZ_Server_UpdateGroup" addPublicVariableEventHandler {(_this select 1) spawn server_updateGroup};
|
|
||||||
};
|
};
|
||||||
|
|
||||||
//Added as part of the maintenance system to allow the server to replace the damaged model with a normal model.
|
//Added as part of the maintenance system to allow the server to replace the damaged model with a normal model.
|
||||||
|
|||||||
Reference in New Issue
Block a user