mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Remove unneeded CharacterID check
This commit is contained in:
@@ -37,7 +37,6 @@ private [
|
|||||||
,"_targetType" // return value
|
,"_targetType" // return value
|
||||||
,"_targetOwnerUID" // UID or characterID of the owner of _target
|
,"_targetOwnerUID" // UID or characterID of the owner of _target
|
||||||
,"_playerUID" // UID of the _player
|
,"_playerUID" // UID of the _player
|
||||||
,"_characterID" // characterID of the _player
|
|
||||||
,"_plotcheck" // takes return value of FNC_find_plots
|
,"_plotcheck" // takes return value of FNC_find_plots
|
||||||
,"_isNearPlot" // player is in plot's reach
|
,"_isNearPlot" // player is in plot's reach
|
||||||
,"_nearestPlot" // plot object
|
,"_nearestPlot" // plot object
|
||||||
@@ -61,15 +60,12 @@ _isDoorFriend = false;
|
|||||||
_isDoorAdmin = false;
|
_isDoorAdmin = false;
|
||||||
_targetType = "";
|
_targetType = "";
|
||||||
|
|
||||||
|
|
||||||
// determine target type
|
// determine target type
|
||||||
_targetType = if(typeOf _target in DZE_DoorsLocked) then { "DOOR"; } else { "GENERIC"; };
|
_targetType = if(typeOf _target in DZE_DoorsLocked) then { "DOOR"; } else { "GENERIC"; };
|
||||||
|
|
||||||
|
|
||||||
// determine owner and player id
|
// determine owner and player id
|
||||||
// and check if player is owner of target object
|
// and check if player is owner of target object
|
||||||
_playerUID = getPlayerUID _player;
|
_playerUID = getPlayerUID _player;
|
||||||
_characterID = player getVariable ["CharacterID","0"];
|
|
||||||
_targetOwnerUID = if (isPlayer _target) then { getPlayerUID _target } else { _target getVariable ["ownerPUID","0"] };
|
_targetOwnerUID = if (isPlayer _target) then { getPlayerUID _target } else { _target getVariable ["ownerPUID","0"] };
|
||||||
_isOwner = (_playerUID == _targetOwnerUID);
|
_isOwner = (_playerUID == _targetOwnerUID);
|
||||||
|
|
||||||
@@ -78,11 +74,11 @@ _isOwner = (_playerUID == _targetOwnerUID);
|
|||||||
_friendlies = _player getVariable ["friendlyTo",[]];
|
_friendlies = _player getVariable ["friendlyTo",[]];
|
||||||
_isFriendly = (_targetOwnerUID in _friendlies);
|
_isFriendly = (_targetOwnerUID in _friendlies);
|
||||||
|
|
||||||
|
|
||||||
// find nearest plot
|
// find nearest plot
|
||||||
_plotcheck = [_player, false] call FNC_find_plots;
|
_plotcheck = [_player, false] call FNC_find_plots;
|
||||||
_isNearPlot = ((_plotcheck select 1) > 0);
|
_isNearPlot = ((_plotcheck select 1) > 0);
|
||||||
_nearestPlot = _plotcheck select 2;
|
_nearestPlot = _plotcheck select 2;
|
||||||
|
|
||||||
if(_isNearPlot) then {
|
if(_isNearPlot) then {
|
||||||
// determine plot owner
|
// determine plot owner
|
||||||
// and check if player is owner of plot
|
// and check if player is owner of plot
|
||||||
@@ -103,7 +99,6 @@ if(_isNearPlot) then {
|
|||||||
if(_playerUID in DZE_PlotManagementAdmins) then { _isPlotAdmin = true; };
|
if(_playerUID in DZE_PlotManagementAdmins) then { _isPlotAdmin = true; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// Process target type DOOR
|
// Process target type DOOR
|
||||||
if(_targetType == "DOOR") then {
|
if(_targetType == "DOOR") then {
|
||||||
// determine door friends
|
// determine door friends
|
||||||
@@ -120,7 +115,6 @@ if(_targetType == "DOOR") then {
|
|||||||
if(_playerUID in DZE_DoorManagementAdmins) then { _isDoorAdmin = true; };
|
if(_playerUID in DZE_DoorManagementAdmins) then { _isDoorAdmin = true; };
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
||||||
// RESULT
|
// RESULT
|
||||||
[ _isOwner
|
[ _isOwner
|
||||||
, _isFriendly
|
, _isFriendly
|
||||||
|
|||||||
Reference in New Issue
Block a user