mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 04:02:37 +03:00
Fix door/plot management friends not writing to DB
This commit is contained in:
@@ -533,15 +533,12 @@ if (_canBuild select 0) then {
|
|||||||
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], []];
|
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID, _vector], []];
|
||||||
if (_lockable == 3) then {
|
if (_lockable == 3) then {
|
||||||
_tmpbuilt setVariable ["doorfriends", [[([player] call FNC_GetPlayerUID),(name player)]], true];
|
_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 {
|
} else {
|
||||||
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location, _vector],[]];
|
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location, _vector],[]];
|
||||||
};
|
};
|
||||||
publicVariableServer "PVDZ_obj_Publish";
|
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
|
format[localize "str_epoch_player_140",_combinationDisplay,_text] call dayz_rollingMessages; //display new combination
|
||||||
systemChat format[localize "str_epoch_player_140",_combinationDisplay,_text];
|
systemChat format[localize "str_epoch_player_140",_combinationDisplay,_text];
|
||||||
@@ -554,18 +551,17 @@ if (_canBuild select 0) then {
|
|||||||
} else {
|
} else {
|
||||||
if (DZE_permanentPlot) then {
|
if (DZE_permanentPlot) then {
|
||||||
_tmpbuilt setVariable ["ownerPUID",_playerUID,true];
|
_tmpbuilt setVariable ["ownerPUID",_playerUID,true];
|
||||||
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID, _vector], []];
|
|
||||||
if (_canBuild select 1) then {
|
if (_canBuild select 1) then {
|
||||||
_tmpbuilt setVariable ["plotfriends", [[([player] call FNC_GetPlayerUID),(name player)]], true];
|
_friendsArr = [[([player] call FNC_GetPlayerUID),(name player)]];
|
||||||
PVDZ_veh_Save = [_tmpbuilt,"gear"];
|
_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 {
|
} else {
|
||||||
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location, _vector],[]];
|
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location, _vector],[]];
|
||||||
};
|
};
|
||||||
publicVariableServer "PVDZ_obj_Publish";
|
publicVariableServer "PVDZ_obj_Publish";
|
||||||
if (!isNil "PVDZ_veh_Save") then {
|
|
||||||
publicVariableServer "PVDZ_veh_Save";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} else { //if magazine was not removed, cancel publish
|
} else { //if magazine was not removed, cancel publish
|
||||||
|
|||||||
@@ -441,15 +441,12 @@ if (_canBuild select 0) then {
|
|||||||
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID],_classname];
|
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location,_playerUID],_classname];
|
||||||
if (_lockable == 3) then {
|
if (_lockable == 3) then {
|
||||||
_tmpbuilt setVariable ["doorfriends", [[([player] call FNC_GetPlayerUID),(name player)]], true];
|
_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 {
|
} else {
|
||||||
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],[]];
|
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],[]];
|
||||||
};
|
};
|
||||||
publicVariableServer "PVDZ_obj_Publish";
|
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;
|
format[localize "str_epoch_player_140",_combinationDisplay,_text] call dayz_rollingMessages;
|
||||||
systemChat format[localize "str_epoch_player_140",_combinationDisplay,_text];
|
systemChat format[localize "str_epoch_player_140",_combinationDisplay,_text];
|
||||||
@@ -462,18 +459,17 @@ if (_canBuild select 0) then {
|
|||||||
} else {
|
} else {
|
||||||
if (DZE_permanentPlot) then {
|
if (DZE_permanentPlot) then {
|
||||||
_tmpbuilt setVariable ["ownerPUID",_playerUID,true];
|
_tmpbuilt setVariable ["ownerPUID",_playerUID,true];
|
||||||
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location,_playerUID],_classname];
|
|
||||||
if (_canBuild select 1) then {
|
if (_canBuild select 1) then {
|
||||||
_tmpbuilt setVariable ["plotfriends", [[([player] call FNC_GetPlayerUID),(name player)]], true];
|
_friendsArr = [[([player] call FNC_GetPlayerUID),(name player)]];
|
||||||
PVDZ_veh_Save = [_tmpbuilt,"gear"];
|
_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 {
|
} else {
|
||||||
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],[]];
|
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],[]];
|
||||||
};
|
};
|
||||||
publicVariableServer "PVDZ_obj_Publish";
|
publicVariableServer "PVDZ_obj_Publish";
|
||||||
if (!isNil "PVDZ_veh_Save") then {
|
|
||||||
publicVariableServer "PVDZ_veh_Save";
|
|
||||||
};
|
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
} else {
|
} else {
|
||||||
|
|||||||
@@ -128,18 +128,17 @@ if ((count _upgrade) > 0) then {
|
|||||||
_ownerID = _obj getVariable["ownerPUID","0"];
|
_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.
|
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];
|
_object setVariable ["ownerPUID",_ownerID,true];
|
||||||
PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_ownerID,_vector],_classname,_obj,player];
|
|
||||||
if (_lockable == 3) then {
|
if (_lockable == 3) then {
|
||||||
_object setVariable ["doorfriends", [[([player] call FNC_GetPlayerUID),(name player)]], true];
|
_friendsArr = [[([player] call FNC_GetPlayerUID),(name player)]];
|
||||||
PVDZ_veh_Save = [_object,"gear"];
|
_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 {
|
} else {
|
||||||
PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_vector],_classname,_obj,player];
|
PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location,_vector],_classname,_obj,player];
|
||||||
};
|
};
|
||||||
publicVariableServer "PVDZE_obj_Swap";
|
publicVariableServer "PVDZE_obj_Swap";
|
||||||
if (!isNil "PVDZ_veh_Save") then {
|
|
||||||
publicVariableServer "PVDZ_veh_Save";
|
|
||||||
};
|
|
||||||
|
|
||||||
player reveal _object;
|
player reveal _object;
|
||||||
|
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
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"]
|
//[dayz_characterID,_tent,[_dir,_location],"TentStorage"]
|
||||||
_charID = _this select 0;
|
_charID = _this select 0;
|
||||||
_object = _this select 1;
|
_object = _this select 1;
|
||||||
@@ -7,6 +7,10 @@ _class = _this select 3;
|
|||||||
_obj = _this select 4;
|
_obj = _this select 4;
|
||||||
_activatingplayer = _this select 5;
|
_activatingplayer = _this select 5;
|
||||||
_activatingplayerUID = [_activatingplayer] call FNC_GetPlayerUID;
|
_activatingplayerUID = [_activatingplayer] call FNC_GetPlayerUID;
|
||||||
|
_inv = [];
|
||||||
|
if ((count _this) > 6) then {
|
||||||
|
_inv = _this select 6;
|
||||||
|
};
|
||||||
_proceed = false;
|
_proceed = false;
|
||||||
|
|
||||||
_objectID = "0";
|
_objectID = "0";
|
||||||
@@ -57,7 +61,8 @@ _uid = _worldspace call dayz_objectUID2;
|
|||||||
|
|
||||||
//Send request
|
//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, [], [], 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));
|
//diag_log ("HIVE: WRITE: "+ str(_key));
|
||||||
_key call server_hiveWrite;
|
_key call server_hiveWrite;
|
||||||
|
|
||||||
|
|||||||
@@ -86,8 +86,8 @@ _object_inventory = {
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
_previous = str(_object getVariable["lastInventory",[]]);
|
//_previous = str(_object getVariable["lastInventory",[]]); //causes issues with door/plot management
|
||||||
if (str _inventory != _previous) then {
|
//if (str _inventory != _previous) then {
|
||||||
_object setVariable["lastInventory",_inventory];
|
_object setVariable["lastInventory",_inventory];
|
||||||
if (_objectID == "0") then {
|
if (_objectID == "0") then {
|
||||||
_key = format["CHILD:309:%1:",_objectUID] + str _inventory + ":";
|
_key = format["CHILD:309:%1:",_objectUID] + str _inventory + ":";
|
||||||
@@ -100,7 +100,7 @@ _object_inventory = {
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
_key call server_hiveWrite;
|
_key call server_hiveWrite;
|
||||||
};
|
//};
|
||||||
};
|
};
|
||||||
|
|
||||||
_object_damage = {
|
_object_damage = {
|
||||||
|
|||||||
Reference in New Issue
Block a user