Update server_publishObject

The hive call in server_publishObject is the same between vanilla and
Epoch. The only difference is vanilla uses the _inventory area for
owner, lock code, etc. variables where as modular Epoch items just store
an empty array there.

The object classname does not need to be sent in the PV because it can
be obtained on the server.

PVDZE_veh_Publish was not used.
This commit is contained in:
ebaydayz
2016-04-02 15:24:20 -04:00
parent 22d7e23d3f
commit 4ce54fbb62
47 changed files with 114 additions and 351 deletions

View File

@@ -576,7 +576,7 @@ if (_hasrequireditem) then {
_tmpbuilt setVariable ["CharacterID",_combination,true]; //set combination as a character ID
//call publish precompiled function with given args and send public variable to server to save item to database
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],_classname];
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],[]];
publicVariableServer "PVDZ_obj_Publish";
cutText [format[(localize "str_epoch_player_140"),_combinationDisplay,_text], "PLAIN DOWN", 5]; //display new combination
@@ -589,7 +589,7 @@ if (_hasrequireditem) then {
if(_tmpbuilt isKindOf "Land_Fire_DZ") then { //if campfire, then spawn, but do not publish to database
_tmpbuilt spawn player_fireMonitor;
} else {
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],[]];
publicVariableServer "PVDZ_obj_Publish";
};
};

View File

@@ -524,7 +524,7 @@ if (_hasrequireditem) then {
_tmpbuilt setVariable ["CharacterID",_combination,true];
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],_classname];
PVDZ_obj_Publish = [_combination,_tmpbuilt,[_dir,_location],[]];
publicVariableServer "PVDZ_obj_Publish";
cutText [format[(localize "str_epoch_player_140"),_combinationDisplay,_text], "PLAIN DOWN", 5];
@@ -537,7 +537,7 @@ if (_hasrequireditem) then {
if(_tmpbuilt isKindOf "Land_Fire_DZ") then {
_tmpbuilt spawn player_fireMonitor;
} else {
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],_classname];
PVDZ_obj_Publish = [dayz_characterID,_tmpbuilt,[_dir,_location],[]];
publicVariableServer "PVDZ_obj_Publish";
};
};

View File

@@ -132,7 +132,6 @@ if (_finished) then {
_location = (getPosATL _veh);
//["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure;
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,true,dayz_characterID,_activatingPlayer];
publicVariableServer "PVDZE_veh_Publish2";

View File

@@ -109,7 +109,6 @@ if (_qty >= _qty_in) then {
_location = (getPosATL _veh);
//["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure;
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,true,dayz_characterID,_activatingPlayer];
publicVariableServer "PVDZE_veh_Publish2";

View File

@@ -154,7 +154,6 @@ if (_finished) then {
_location = (getPosATL _veh);
//["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure;
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected,_activatingPlayer];
publicVariableServer "PVDZE_veh_Publish2";

View File

@@ -130,7 +130,6 @@ if (_qty >= _qty_in) then {
_location = (getPosATL _veh);
//["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure;
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected,_activatingPlayer];
publicVariableServer "PVDZE_veh_Publish2";

View File

@@ -96,7 +96,6 @@ if (_finished) then {
if (_canAfford) then {
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
// if (isNil "_obj") then { _obj = "Unknown Vehicle" };
if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" };
if(_bos == 1) then {
@@ -154,7 +153,6 @@ if (_finished) then {
_location = (getPosATL _veh);
//["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure;
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected,_activatingPlayer];
publicVariableServer "PVDZE_veh_Publish2";

View File

@@ -96,7 +96,6 @@ if (_finished) then {
if (_canAfford) then {
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
// if (isNil "_obj") then { _obj = "Unknown Vehicle" };
if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" };
if(_bos == 1) then {
@@ -136,7 +135,6 @@ if (_finished) then {
_location = (getPosATL _veh);
//["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,true,0]] call callRpcProcedure;
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,true,0,_activatingPlayer];
publicVariableServer "PVDZE_veh_Publish2";
};

View File

@@ -90,7 +90,6 @@ if (_qty >= _qty_in) then {
if (_qty >= _qty_in) then {
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
if (isNil "_obj") then { _obj = "Unknown Vehicle" };
if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" };
PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_obj,inTraderCity];
@@ -138,7 +137,6 @@ if (_qty >= _qty_in) then {
_location = (getPosATL _veh);
//["PVDZE_veh_Publish",[_veh,[_dir,_location],_part_out,false,_keySelected]] call callRpcProcedure;
PVDZE_veh_Publish2 = [_veh,[_dir,_location],_part_out,false,_keySelected,_activatingPlayer];
publicVariableServer "PVDZE_veh_Publish2";

View File

@@ -93,7 +93,6 @@ if (_finished) then {
if (_canAfford) then {
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
if (isNil "_bag") then { _bag = "Unknown Backpack" };
if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" };
if(_bos == 1) then {

View File

@@ -84,7 +84,6 @@ if (_qty >= _qty_in) then {
if (_qty >= _qty_in) then {
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
if (isNil "_bag") then { _bag = "Unknown Backpack" };
if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" };
PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_bag,inTraderCity];

View File

@@ -140,7 +140,6 @@ if (_finished) then {
if (_canAfford) then {
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
if (isNil "_part_out") then { _part_out = "Unknown Weapon/Magazine" };
if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" };
if(_bos == 1) then {

View File

@@ -80,7 +80,6 @@ if (_qty >= _qty_in) then {
if (_qty >= _qty_in) then {
//["PVDZE_obj_Trade",[_activatingPlayer,_traderID,_bos]] call callRpcProcedure;
if (isNil "_part_out") then { _part_out = "Unknown Weapon/Magazine" };
if (isNil "inTraderCity") then { inTraderCity = "Unknown Trader City" };
PVDZE_obj_Trade = [_activatingPlayer,_traderID,_bos,_part_out,inTraderCity];

View File

@@ -159,8 +159,7 @@ if(!_cancel) then {
_tent setVariable ["CharacterID",_combination,true];
_tent setVariable ["OEMPos",_location,true];
//["PVDZ_obj_Publish",[_combination,_tent,[_dir,_location],"VaultStorageLocked"]] call callRpcProcedure;
PVDZ_obj_Publish = [_combination,_tent,[_dir,_location],"VaultStorageLocked"];
PVDZ_obj_Publish = [_combination,_tent,[_dir,_location],[]];
publicVariableServer "PVDZ_obj_Publish";
cutText [format[(localize "str_epoch_player_179"),_combination], "PLAIN DOWN", 5];

View File

@@ -73,7 +73,7 @@
if (isServer) then {
"PVDZ_plr_Death" addPublicVariableEventHandler {_id = (_this select 1) spawn server_playerDied};
"PVDZ_plr_Save" addPublicVariableEventHandler {_id = (_this select 1) call server_playerSync;};
"PVDZ_obj_Publish" addPublicVariableEventHandler {(_this select 1) call server_publishObj};
"PVDZ_obj_Publish" addPublicVariableEventHandler {(_this select 1) call server_publishObj}; //Used by built items (Epoch and Vanilla)
"PVDZ_veh_Save" addPublicVariableEventHandler {(_this select 1) call server_updateObject};
"PVDZ_plr_Login1" addPublicVariableEventHandler {_id = (_this select 1) call server_playerLogin};
"PVDZ_plr_Login2" addPublicVariableEventHandler {(_this select 1) call server_playerSetup};
@@ -86,10 +86,9 @@ if (isServer) then {
// EPOCH ADDITIONS
"PVDZE_maintainArea" addPublicVariableEventHandler {(_this select 1) spawn server_maintainArea};
"PVDZE_obj_Swap" addPublicVariableEventHandler {(_this select 1) spawn server_swapObject};
"PVDZE_veh_Publish" addPublicVariableEventHandler {(_this select 1) spawn server_publishVeh};
"PVDZE_veh_Publish2" addPublicVariableEventHandler {(_this select 1) spawn server_publishVeh2};
"PVDZE_veh_Upgrade" addPublicVariableEventHandler {(_this select 1) spawn server_publishVeh3};
"PVDZE_obj_Swap" addPublicVariableEventHandler {(_this select 1) spawn server_swapObject}; //Used to downgrade and upgrade Epoch buildables
"PVDZE_veh_Publish2" addPublicVariableEventHandler {(_this select 1) spawn server_publishVeh2}; //Used to purchase vehicles at traders
"PVDZE_veh_Upgrade" addPublicVariableEventHandler {(_this select 1) spawn server_publishVeh3}; //Used for car upgrades
"PVDZE_obj_Trade" addPublicVariableEventHandler {(_this select 1) spawn server_tradeObj};
"PVDZE_plr_TradeMenu" addPublicVariableEventHandler {(_this select 1) spawn server_traders};
"PVDZE_plr_DeathB" addPublicVariableEventHandler {(_this select 1) spawn server_deaths};

View File

@@ -508,7 +508,6 @@ PlayerDeaths = [];
PVDZE_obj_Trade = []; // For all traders increment qty
PVDZE_plr_DeathB = [];
PVDZE_plr_TradeMenu = []; // For all traders
PVDZE_veh_Publish = []; // For vehicle traders
snapGizmos = [];
snapGizmosNearby = [];
s_player_combi = [];
@@ -567,7 +566,7 @@ if (isServer) then {
currentObjectUIDs = [];
keyStartNumber = 100000000000;
DZE_safeVehicle = ["ParachuteWest","ParachuteC"];
serverVehicleCounter = [];
if(isNil "EpochUseEvents") then {EpochUseEvents = false;};
if(isNil "EpochEvents") then {EpochEvents = [];};
if(isNil "DZE_vehicleAmmo") then {DZE_vehicleAmmo = 0;};
if(isNil "dayz_MapArea") then {dayz_MapArea = 10000;};