diff --git a/SQF/dayz_code/actions/modular_build.sqf b/SQF/dayz_code/actions/modular_build.sqf index 4dca03fbd..0b9e5b782 100644 --- a/SQF/dayz_code/actions/modular_build.sqf +++ b/SQF/dayz_code/actions/modular_build.sqf @@ -533,15 +533,12 @@ if (_canBuild select 0) then { PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], []]; if (_lockable == 3) then { _tmpbuilt setVariable ["doorfriends", [[([player] call FNC_GetPlayerUID),(name player)]], true]; - PVDZ_veh_Save = [_tmpbuilt,"gear"]; + PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], [[([player] call FNC_GetPlayerUID),(name player)]]]; }; } else { PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location, _vector],[]]; }; publicVariableServer "PVDZ_obj_Publish"; - if (!isNil "PVDZ_veh_Save") then { - publicVariableServer "PVDZ_veh_Save"; - }; format[localize "str_epoch_player_140",_combinationDisplay,_text] call dayz_rollingMessages; //display new combination systemChat format[localize "str_epoch_player_140",_combinationDisplay,_text]; @@ -554,18 +551,17 @@ if (_canBuild select 0) then { } else { if (DZE_permanentPlot) then { _tmpbuilt setVariable ["ownerPUID",_playerUID,true]; - PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID, _vector], []]; if (_canBuild select 1) then { - _tmpbuilt setVariable ["plotfriends", [[([player] call FNC_GetPlayerUID),(name player)]], true]; - PVDZ_veh_Save = [_tmpbuilt,"gear"]; + _friendsArr = [[([player] call FNC_GetPlayerUID),(name player)]]; + _tmpbuilt setVariable ["plotfriends", _friendsArr, true]; + PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID, _vector], _friendsArr]; + } else { + PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID, _vector], []]; }; } else { PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location, _vector],[]]; }; publicVariableServer "PVDZ_obj_Publish"; - if (!isNil "PVDZ_veh_Save") then { - publicVariableServer "PVDZ_veh_Save"; - }; }; }; } else { //if magazine was not removed, cancel publish diff --git a/SQF/dayz_code/actions/player_build.sqf b/SQF/dayz_code/actions/player_build.sqf index 311c8e1f1..1ed661bba 100644 --- a/SQF/dayz_code/actions/player_build.sqf +++ b/SQF/dayz_code/actions/player_build.sqf @@ -441,15 +441,12 @@ if (_canBuild select 0) then { PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID],_classname]; if (_lockable == 3) then { _tmpbuilt setVariable ["doorfriends", [[([player] call FNC_GetPlayerUID),(name player)]], true]; - PVDZ_veh_Save = [_tmpbuilt,"gear"]; + PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], [[([player] call FNC_GetPlayerUID),(name player)]]]; }; } else { PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],[]]; }; publicVariableServer "PVDZ_obj_Publish"; - if (!isNil "PVDZ_veh_Save") then { - publicVariableServer "PVDZ_veh_Save"; - }; format[localize "str_epoch_player_140",_combinationDisplay,_text] call dayz_rollingMessages; systemChat format[localize "str_epoch_player_140",_combinationDisplay,_text]; @@ -462,18 +459,17 @@ if (_canBuild select 0) then { } else { if (DZE_permanentPlot) then { _tmpbuilt setVariable ["ownerPUID",_playerUID,true]; - PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_classname]; if (_canBuild select 1) then { - _tmpbuilt setVariable ["plotfriends", [[([player] call FNC_GetPlayerUID),(name player)]], true]; - PVDZ_veh_Save = [_tmpbuilt,"gear"]; + _friendsArr = [[([player] call FNC_GetPlayerUID),(name player)]]; + _tmpbuilt setVariable ["plotfriends", _friendsArr, true]; + PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_friendsArr]; + } else { + PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_classname]; }; } else { PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],[]]; }; publicVariableServer "PVDZ_obj_Publish"; - if (!isNil "PVDZ_veh_Save") then { - publicVariableServer "PVDZ_veh_Save"; - }; }; }; } else { diff --git a/SQF/dayz_code/actions/player_upgrade.sqf b/SQF/dayz_code/actions/player_upgrade.sqf index 1ffabd2d2..08c58217b 100644 --- a/SQF/dayz_code/actions/player_upgrade.sqf +++ b/SQF/dayz_code/actions/player_upgrade.sqf @@ -128,18 +128,17 @@ if ((count _upgrade) > 0) then { _ownerID = _obj getVariable["ownerPUID","0"]; if (_ownerID == "0") then { _ownerID = [player] call FNC_GetPlayerUID; }; //APFL is on but UID is 0 so we will claim it to record the ownership. _object setVariable ["ownerPUID",_ownerID,true]; - PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_ownerID,_vector],_classname,_obj,player]; if (_lockable == 3) then { - _object setVariable ["doorfriends", [[([player] call FNC_GetPlayerUID),(name player)]], true]; - PVDZ_veh_Save = [_object,"gear"]; + _friendsArr = [[([player] call FNC_GetPlayerUID),(name player)]]; + _object setVariable ["doorfriends", _friendsArr, true]; + PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_ownerID,_vector],_classname,_obj,player,_friendsArr]; + } else { + PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_ownerID,_vector],_classname,_obj,player]; }; } else { PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_vector],_classname,_obj,player]; }; publicVariableServer "PVDZE_obj_Swap"; - if (!isNil "PVDZ_veh_Save") then { - publicVariableServer "PVDZ_veh_Save"; - }; player reveal _object; diff --git a/SQF/dayz_server/compile/server_swapObject.sqf b/SQF/dayz_server/compile/server_swapObject.sqf index 5d1aa8a56..002288981 100644 --- a/SQF/dayz_server/compile/server_swapObject.sqf +++ b/SQF/dayz_server/compile/server_swapObject.sqf @@ -1,12 +1,16 @@ -private ["_activatingplayerUID","_class","_uid","_charID","_object","_worldspace","_key","_allowed","_obj","_objectID","_objectUID","_proceed","_activatingplayer"]; +private ["_activatingplayerUID","_class","_uid","_charID","_object","_worldspace","_key","_allowed","_obj","_inv","_objectID","_objectUID","_proceed","_activatingplayer"]; //[dayz_characterID,_tent,[_dir,_location],"TentStorage"] _charID = _this select 0; _object = _this select 1; _worldspace = _this select 2; _class = _this select 3; -_obj = _this select 4; +_obj = _this select 4; _activatingplayer = _this select 5; _activatingplayerUID = [_activatingplayer] call FNC_GetPlayerUID; +_inv = []; +if ((count _this) > 6) then { + _inv = _this select 6; +}; _proceed = false; _objectID = "0"; @@ -57,7 +61,8 @@ _uid = _worldspace call dayz_objectUID2; //Send request //_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace, [], [], 0,_uid]; -_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace call AN_fnc_formatWorldspace, [], [], 0,_uid]; // Precise Base Building 1.0.5 +_key = format["CHILD:308:%1:%2:%3:%4:%5:%6:%7:%8:%9:",dayZ_instance, _class, 0 , _charID, _worldspace call AN_fnc_formatWorldspace, _inv, [], 0,_uid]; // Precise Base Building 1.0.5 + //diag_log ("HIVE: WRITE: "+ str(_key)); _key call server_hiveWrite; diff --git a/SQF/dayz_server/compile/server_updateObject.sqf b/SQF/dayz_server/compile/server_updateObject.sqf index b8f6c8a1e..c4a0ece57 100644 --- a/SQF/dayz_server/compile/server_updateObject.sqf +++ b/SQF/dayz_server/compile/server_updateObject.sqf @@ -86,8 +86,8 @@ _object_inventory = { }; }; - _previous = str(_object getVariable["lastInventory",[]]); - if (str _inventory != _previous) then { + //_previous = str(_object getVariable["lastInventory",[]]); //causes issues with door/plot management + //if (str _inventory != _previous) then { _object setVariable["lastInventory",_inventory]; if (_objectID == "0") then { _key = format["CHILD:309:%1:",_objectUID] + str _inventory + ":"; @@ -100,7 +100,7 @@ _object_inventory = { #endif _key call server_hiveWrite; - }; + //}; }; _object_damage = {