Fix wrong buildables count displayed in plot management

This commit is contained in:
ebaydayz
2016-05-18 20:20:20 -04:00
parent d0c4ccca15
commit 1a238d1719
3 changed files with 5 additions and 6 deletions

View File

@@ -11,11 +11,10 @@ if (_inList) exitWith {localize "STR_EPOCH_PLOTMANAGEMENT_ADDFRIEND_ALREADYONTHE
if ((count _friends) == DZE_MaxPlotFriends) exitWith { format[localize "STR_EPOCH_PLOTMANAGEMENT_ADDFRIEND_FRIENDLIMIT", DZE_MaxPlotFriends] call dayz_rollingMessages;};
_friends set [(count _friends), _toAdd];
_thePlot setVariable ["plotfriends", _friends, true];
PVDZ_veh_Save = [_thePlot,"gear"];
if (isServer) then {
PVDZ_veh_Save call server_updateObject;
} else {
PVDZ_veh_Save = [_thePlot,"gear"];
publicVariableServer "PVDZ_veh_Save";
};

View File

@@ -1,8 +1,9 @@
private ["_newWealth","_missing","_missingQty","_proceed","_itemIn","_countIn","_target","_objectClasses","_range","_objects","_requirements","_count","_cost","_option"];
private ["_newWealth","_missing","_missingQty","_proceed","_itemIn","_countIn","_target","_objectClasses","_range","_objects","_requirements","_count","_cost","_option","_buildables"];
disableSerialization;
_range = DZE_PlotPole select 0;
_count = count ((getPosATL player) nearObjects ["All",_range]);
_buildables = DZE_maintainClasses + DZE_LockableStorage + ["DZ_buildables","DZ_storage_base"];
_count = count (nearestObjects [[player] call FNC_getPos,_buildables,_range]);
_colour = "#ffffff";

View File

@@ -13,11 +13,10 @@ _newList = [];
};
} count _friends;
_thePlot setVariable ["plotfriends", _newList, true];
PVDZ_veh_Save = [_thePlot,"gear"];
if (isServer) then {
PVDZ_veh_Save call server_updateObject;
} else {
PVDZ_veh_Save = [_thePlot,"gear"];
publicVariableServer "PVDZ_veh_Save";
};