From e92d212d1611f0377a475ab3cc919284eec6230f Mon Sep 17 00:00:00 2001 From: "[VB]AWOL" Date: Tue, 26 Nov 2013 14:12:23 -0600 Subject: [PATCH] added logging to swap object and changed to getPlayerUID --- SQF/dayz_code/actions/list_playerDeaths.sqf | 12 ++---------- SQF/dayz_code/actions/player_buildingDowngrade.sqf | 2 +- SQF/dayz_code/actions/player_buildingMaint.sqf | 2 +- SQF/dayz_code/actions/player_upgrade.sqf | 2 +- SQF/dayz_code/actions/remove.sqf | 2 +- SQF/dayz_code/actions/repair_vehicle.sqf | 2 +- SQF/dayz_code/actions/salvage_vehicle.sqf | 2 +- SQF/dayz_code/actions/trade_any_bicycle.sqf | 2 +- SQF/dayz_code/actions/trade_any_boat.sqf | 2 +- SQF/dayz_code/actions/trade_any_vehicle.sqf | 2 +- SQF/dayz_code/actions/trade_backpacks.sqf | 2 +- SQF/dayz_code/actions/trade_items.sqf | 2 +- SQF/dayz_code/actions/trade_items_wo_db.sqf | 2 +- SQF/dayz_code/actions/trade_weapons.sqf | 2 +- SQF/dayz_code/compile/player_packTent.sqf | 2 +- SQF/dayz_code/compile/player_packVault.sqf | 2 +- SQF/dayz_server/compile/server_swapObject.sqf | 5 +++-- 17 files changed, 20 insertions(+), 27 deletions(-) diff --git a/SQF/dayz_code/actions/list_playerDeaths.sqf b/SQF/dayz_code/actions/list_playerDeaths.sqf index 4911e2a52..2a970df0d 100644 --- a/SQF/dayz_code/actions/list_playerDeaths.sqf +++ b/SQF/dayz_code/actions/list_playerDeaths.sqf @@ -1,23 +1,15 @@ -private ["_activatingPlayer"]; - -// [ _trader_id, _category, _action ]; -_activatingPlayer = player; +private []; // attempt to remove newspaper if called without args if (count _this == 0) then { player removeMagazine "ItemNewspaper"; }; -//diag_log format["DEBUG DEATH OBJ: %1", _this select 0]; - -//["PVDZE_plr_DeathB",[_activatingPlayer]] call callRpcProcedure; -PVDZE_plr_DeathB = [_activatingPlayer]; +PVDZE_plr_DeathB = [player]; publicVariableServer "PVDZE_plr_DeathB"; waitUntil {!isNil "PVDZE_plr_DeathBResult"}; -//diag_log format["DEBUG Death: %1", PVDZE_plr_DeathBResult]; - if((count PVDZE_plr_DeathBResult) > 0) then { // load death message board ui call EpochDeathBoardLoad; diff --git a/SQF/dayz_code/actions/player_buildingDowngrade.sqf b/SQF/dayz_code/actions/player_buildingDowngrade.sqf index a8f44f46c..08369ca56 100644 --- a/SQF/dayz_code/actions/player_buildingDowngrade.sqf +++ b/SQF/dayz_code/actions/player_buildingDowngrade.sqf @@ -134,7 +134,7 @@ if ((count _upgrade) > 0) then { cutText [format[(localize "str_epoch_player_142"),_text], "PLAIN DOWN", 5]; - PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,_objectID,_objectUID]; + PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,_objectID,_objectUID,(getPlayerUID player)]; publicVariableServer "PVDZE_obj_Swap"; player reveal _object; diff --git a/SQF/dayz_code/actions/player_buildingMaint.sqf b/SQF/dayz_code/actions/player_buildingMaint.sqf index b51e37c69..4ac297857 100644 --- a/SQF/dayz_code/actions/player_buildingMaint.sqf +++ b/SQF/dayz_code/actions/player_buildingMaint.sqf @@ -98,7 +98,7 @@ if (_proceed) then { // Set location _object setPosATL _location; - PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,_objectID,_objectUID]; + PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,_objectID,_objectUID,(getPlayerUID player)]; publicVariableServer "PVDZE_obj_Swap"; cutText [format[(localize "str_epoch_player_144"),_text], "PLAIN DOWN", 5]; diff --git a/SQF/dayz_code/actions/player_upgrade.sqf b/SQF/dayz_code/actions/player_upgrade.sqf index 359373f75..79f079081 100644 --- a/SQF/dayz_code/actions/player_upgrade.sqf +++ b/SQF/dayz_code/actions/player_upgrade.sqf @@ -164,7 +164,7 @@ if ((count _upgrade) > 0) then { cutText [format[(localize "str_epoch_player_159"),_text], "PLAIN DOWN", 5]; }; - PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,_objectID,_objectUID]; + PVDZE_obj_Swap = [_objectCharacterID,_object,[_dir,_location],_classname,_obj,_objectID,_objectUID,(getPlayerUID player)]; publicVariableServer "PVDZE_obj_Swap"; player reveal _object; diff --git a/SQF/dayz_code/actions/remove.sqf b/SQF/dayz_code/actions/remove.sqf index 43986b221..3e171588a 100644 --- a/SQF/dayz_code/actions/remove.sqf +++ b/SQF/dayz_code/actions/remove.sqf @@ -12,7 +12,7 @@ s_player_deleteBuild = 1; _obj = _this select 3; -_activatingPlayer = player; +_activatingPlayer = getPlayerUID player; _objOwnerID = _obj getVariable["CharacterID","0"]; _isOwnerOfObj = (_objOwnerID == dayz_characterID); diff --git a/SQF/dayz_code/actions/repair_vehicle.sqf b/SQF/dayz_code/actions/repair_vehicle.sqf index 9f1fca0a1..b3cff65b7 100644 --- a/SQF/dayz_code/actions/repair_vehicle.sqf +++ b/SQF/dayz_code/actions/repair_vehicle.sqf @@ -1,7 +1,7 @@ private ["_part","_cancel","_color","_allFixed","_percent","_string","_handle","_damage","_cmpt","_vehicle","_hitpoints"]; // [ _trader_id, _category, _action ]; -// _activatingPlayer = player; +// _activatingPlayer = getPlayerUID player; _vehicle = _this select 3; diff --git a/SQF/dayz_code/actions/salvage_vehicle.sqf b/SQF/dayz_code/actions/salvage_vehicle.sqf index cae40c1c4..74d6bc799 100644 --- a/SQF/dayz_code/actions/salvage_vehicle.sqf +++ b/SQF/dayz_code/actions/salvage_vehicle.sqf @@ -1,7 +1,7 @@ private ["_part","_cancel","_color","_percent","_string","_handle","_damage","_cmpt","_vehicle","_hitpoints"]; // [ _trader_id, _category, _action ]; -// _activatingPlayer = player; +// _activatingPlayer = getPlayerUID player; _vehicle = _this select 3; diff --git a/SQF/dayz_code/actions/trade_any_bicycle.sqf b/SQF/dayz_code/actions/trade_any_bicycle.sqf index bb8a65d3a..c6a2fe61b 100644 --- a/SQF/dayz_code/actions/trade_any_bicycle.sqf +++ b/SQF/dayz_code/actions/trade_any_bicycle.sqf @@ -9,7 +9,7 @@ TradeInprogress = true; // [part_out,part_in, qty_out, qty_in, loc]; -_activatingPlayer = player; +_activatingPlayer = getPlayerUID player; _part_out = (_this select 3) select 0; _part_in = (_this select 3) select 1; diff --git a/SQF/dayz_code/actions/trade_any_boat.sqf b/SQF/dayz_code/actions/trade_any_boat.sqf index 9707aca53..cb9ba2d82 100644 --- a/SQF/dayz_code/actions/trade_any_boat.sqf +++ b/SQF/dayz_code/actions/trade_any_boat.sqf @@ -9,7 +9,7 @@ TradeInprogress = true; // [part_out,part_in, qty_out, qty_in, loc]; -_activatingPlayer = player; +_activatingPlayer = getPlayerUID player; _part_out = (_this select 3) select 0; _part_in = (_this select 3) select 1; diff --git a/SQF/dayz_code/actions/trade_any_vehicle.sqf b/SQF/dayz_code/actions/trade_any_vehicle.sqf index 9f7c16d98..5d008e9e4 100644 --- a/SQF/dayz_code/actions/trade_any_vehicle.sqf +++ b/SQF/dayz_code/actions/trade_any_vehicle.sqf @@ -9,7 +9,7 @@ TradeInprogress = true; // [part_out,part_in, qty_out, qty_in, loc]; -_activatingPlayer = player; +_activatingPlayer = getPlayerUID player; _part_out = (_this select 3) select 0; _part_in = (_this select 3) select 1; diff --git a/SQF/dayz_code/actions/trade_backpacks.sqf b/SQF/dayz_code/actions/trade_backpacks.sqf index 837c96fa5..c5eeb83e4 100644 --- a/SQF/dayz_code/actions/trade_backpacks.sqf +++ b/SQF/dayz_code/actions/trade_backpacks.sqf @@ -4,7 +4,7 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_bos","_bag","_clas if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_103") , "PLAIN DOWN"]; }; TradeInprogress = true; -_activatingPlayer = player; +_activatingPlayer = getPlayerUID player; _part_out = (_this select 3) select 0; _part_in = (_this select 3) select 1; diff --git a/SQF/dayz_code/actions/trade_items.sqf b/SQF/dayz_code/actions/trade_items.sqf index 13c1cfb00..419fc680f 100644 --- a/SQF/dayz_code/actions/trade_items.sqf +++ b/SQF/dayz_code/actions/trade_items.sqf @@ -6,7 +6,7 @@ TradeInprogress = true; _total_parts_out = 0; -_activatingPlayer = player; +_activatingPlayer = getPlayerUID player; _part_out = (_this select 3) select 0; _part_in = (_this select 3) select 1; diff --git a/SQF/dayz_code/actions/trade_items_wo_db.sqf b/SQF/dayz_code/actions/trade_items_wo_db.sqf index e5858ca9f..95d9fd1ed 100644 --- a/SQF/dayz_code/actions/trade_items_wo_db.sqf +++ b/SQF/dayz_code/actions/trade_items_wo_db.sqf @@ -4,7 +4,7 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_textPartIn","_textPartOut if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_103") , "PLAIN DOWN"]; }; TradeInprogress = true; -//_activatingPlayer = player; +//_activatingPlayer = getPlayerUID player; _part_out = (_this select 3) select 0; _part_in = (_this select 3) select 1; diff --git a/SQF/dayz_code/actions/trade_weapons.sqf b/SQF/dayz_code/actions/trade_weapons.sqf index d0ff5a618..5a1de030d 100644 --- a/SQF/dayz_code/actions/trade_weapons.sqf +++ b/SQF/dayz_code/actions/trade_weapons.sqf @@ -4,7 +4,7 @@ private ["_part_out","_part_in","_qty_out","_qty_in","_qty","_buy_o_sell","_trad if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_103") , "PLAIN DOWN"]; }; TradeInprogress = true; -_activatingPlayer = player; +_activatingPlayer = getPlayerUID player; _part_out = (_this select 3) select 0; _part_in = (_this select 3) select 1; diff --git a/SQF/dayz_code/compile/player_packTent.sqf b/SQF/dayz_code/compile/player_packTent.sqf index 184cdb84a..37176dd36 100644 --- a/SQF/dayz_code/compile/player_packTent.sqf +++ b/SQF/dayz_code/compile/player_packTent.sqf @@ -9,7 +9,7 @@ TradeInprogress = true; player removeAction s_player_packtent; s_player_packtent = 1; -_activatingPlayer = player; +_activatingPlayer = getPlayerUID player; _obj = _this; _ownerID = _obj getVariable["CharacterID","0"]; diff --git a/SQF/dayz_code/compile/player_packVault.sqf b/SQF/dayz_code/compile/player_packVault.sqf index 12e014aa7..edae2f158 100644 --- a/SQF/dayz_code/compile/player_packVault.sqf +++ b/SQF/dayz_code/compile/player_packVault.sqf @@ -6,7 +6,7 @@ private ["_activatingPlayer","_obj","_ownerID","_objectID","_objectUID","_alread if(TradeInprogress) exitWith { cutText [(localize "str_epoch_player_15") , "PLAIN DOWN"]; }; TradeInprogress = true; -_activatingPlayer = player; +_activatingPlayer = getPlayerUID player; _obj = _this; diff --git a/SQF/dayz_server/compile/server_swapObject.sqf b/SQF/dayz_server/compile/server_swapObject.sqf index 3eb582d8e..3914e4c07 100644 --- a/SQF/dayz_server/compile/server_swapObject.sqf +++ b/SQF/dayz_server/compile/server_swapObject.sqf @@ -1,10 +1,11 @@ -private ["_class","_uid","_charID","_object","_worldspace","_key","_allowed","_obj","_objectID","_objectUID"]; +private ["_activatingplayerUID","_class","_uid","_charID","_object","_worldspace","_key","_allowed","_obj","_objectID","_objectUID"]; //[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; +_activatingplayerUID = _this select 5; _obj removeAllMPEventHandlers "MPKilled"; @@ -16,7 +17,7 @@ _objectUID = _this select 6; if(_objectID == "0" && _objectUID == "0") exitWith {diag_log ("Object not valid: "+ str(_object));}; -[_objectID,_objectUID] call server_deleteObj; +[_objectID,_objectUID,_activatingplayerUID] call server_deleteObj; _allowed = [_object, "Server"] call check_publishobject; if (!_allowed) exitWith { deleteVehicle _object; };