Revert "Send new group to server for update"

This reverts commit 3f83354066.
This commit is contained in:
ebaydayz
2016-10-30 12:50:37 -04:00
parent 3f83354066
commit 6d8afc9d32
7 changed files with 12 additions and 13 deletions

View File

@@ -4,7 +4,7 @@ _group = group player;
if (count (units _group) == 1 or (!isNil "dayz_groupDisbandThread" && {!scriptDone dayz_groupDisbandThread})) exitWith {};
dayz_groupDisbanded = nil;
PVDZ_Server_UpdateGroup = [4,player,_group];
PVDZ_Server_UpdateGroup = [4,player];
publicVariableServer "PVDZ_Server_UpdateGroup";
dayz_groupDisbandThread = _group spawn {

View File

@@ -13,7 +13,7 @@ if (count dayz_myGroup > 1 && {!dayz_requireRadio or {dayz_requireRadio && "Item
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
// Update saved group in DB
PVDZ_Server_UpdateGroup = [0,player,_x];
PVDZ_Server_UpdateGroup = [0,player];
publicVariableServer "PVDZ_Server_UpdateGroup";
};
} count allGroups;

View File

@@ -1,4 +1,4 @@
private ["_display","_inviter","_inviteText","_inviterUID","_newGroup","_oldGroup","_rejectButton","_uid"];
private ["_display","_inviter","_inviteText","_inviterUID","_oldGroup","_rejectButton","_uid"];
_display = findDisplay 80000;
_rejectButton = _display displayCtrl 8;
@@ -25,12 +25,11 @@ _inviter = _inviterUID call dayz_getPlayer;
if (!isNull _inviter) then {
_oldGroup = group player;
_newGroup = group _inviter;
[player] join _newGroup;
[player] join (group _inviter);
if (count (units _oldGroup) == 0) then {deleteGroup _oldGroup;};
// Update saved group in DB
PVDZ_Server_UpdateGroup = [1,player,_newGroup];
PVDZ_Server_UpdateGroup = [1,player];
publicVariableServer "PVDZ_Server_UpdateGroup";
} else {
systemChat localize "STR_EPOCH_INVITE_EXPIRED";

View File

@@ -9,7 +9,7 @@ if (isNull _target or _target == player or player != leader group player) exitWi
[_target] join grpNull;
PVDZ_Server_UpdateGroup = [2,player,(group player),_targetUID];
PVDZ_Server_UpdateGroup = [2,player,_targetUID];
publicVariableServer "PVDZ_Server_UpdateGroup";
call dayz_selectGroupMember; //update lbCurSel change

View File

@@ -4,7 +4,7 @@ _group = units group player;
if (count _group == 1 or (!isNil "dayz_groupLeaveThread" && {!scriptDone dayz_groupLeaveThread})) exitWith {};
dayz_groupLeft = nil;
PVDZ_Server_UpdateGroup = [3,player,(group player)];
PVDZ_Server_UpdateGroup = [3,player];
publicVariableServer "PVDZ_Server_UpdateGroup";
dayz_groupLeaveThread = [] spawn {

View File

@@ -1,9 +1,8 @@
private ["_event","_group","_groupUIDs","_key","_newGroup","_player","_playerUID","_targetUID"];
private ["_event","_groupUIDs","_key","_newGroup","_player","_playerUID","_targetUID"];
_event = _this select 0;
_player = _this select 1;
_group = _this select 2;
_targetUID = if (count _this > 3) then {_this select 3} else {"0"};
_targetUID = if (count _this > 2) then {_this select 2} else {"0"};
_playerUID = getPlayerUID _player;
_groupUIDs = [];
@@ -11,7 +10,7 @@ _groupUIDs = [];
if (alive _x && isPlayer _x) then {
_groupUIDs set [count _groupUIDs,getPlayerUID _x];
};
} count (units _group);
} count (units group _player);
_newGroup = [];
_newGroup = switch _event do {

View File

@@ -103,7 +103,8 @@ if (isServer) then {
"PVDZE_handleSafeGear" addPublicVariableEventHandler {(_this select 1) spawn server_handleSafeGear};
"PVDZE_fullobj_Publish" addPublicVariableEventHandler {(_this select 1) call server_publishFullObject}; // PlotForLife take base ownership
if (dayz_groupSystem) then {
"PVDZ_Server_UpdateGroup" addPublicVariableEventHandler {(_this select 1) call server_updateGroup};
//Use spawn instead of call because small delay is needed for group changes to propagate to server
"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.