mirror of
https://github.com/EpochModTeam/Epoch.git
synced 2024-08-30 18:22:13 +00:00
Fix for Weaponholder disappear to fast
Empty WH disappear after 1 second. If filling of WH takes longer than 1s, the WH disappears. This fix let the Server create the WH, if objnull
This commit is contained in:
parent
46a5d37026
commit
c6a1da84d0
@ -227,9 +227,7 @@ if !(EPOCH_ActiveTraderMission isequalto []) then {
|
||||
[format ["%1",_diag], 5] call Epoch_message;
|
||||
};
|
||||
if(count _taskReward > 0) then {
|
||||
_retTaskWH = objNull;
|
||||
_retTaskWH = createVehicle ["GroundWeaponHolder",getPosATL player,[],0,"CAN_COLLIDE"];
|
||||
[player,Epoch_personalToken,_taskReward,[],_retTaskWH,false] remoteExec ["EPOCH_Server_createObject",2];
|
||||
[player,Epoch_personalToken,_taskReward,[],objNull,false] remoteExec ["EPOCH_Server_createObject",2];
|
||||
};
|
||||
if !(str(_taskCompleteCall) == "{}") then {
|
||||
call _taskCompleteCall;
|
||||
|
@ -151,9 +151,7 @@ _EPOCH_BuildTraderMisson = {
|
||||
_triggerintervall = getNumber ( _inGameTasksconfig >> _taskName >> "triggerintervall");
|
||||
_taskItems = getArray ( _inGameTasksconfig >> _taskName >> "items");
|
||||
if !(_taskItems isequalto []) then {
|
||||
_wh = objNull;
|
||||
_wh = createVehicle ["GroundWeaponHolder",getPosATL player,[],0,"CAN_COLLIDE"];
|
||||
[player,Epoch_personalToken,_taskItems,[],_wh,false] remoteExec ["EPOCH_Server_createObject",2];
|
||||
[player,Epoch_personalToken,_taskItems,[],objNull,false] remoteExec ["EPOCH_Server_createObject",2];
|
||||
};
|
||||
|
||||
_taskMarkerType = getnumber (_inGameTasksconfig >> _taskName >> 'markerType');
|
||||
|
@ -120,7 +120,7 @@ class finishDelivery {
|
||||
faileddialogues[] = {};
|
||||
completeCondition = "diag_ticktime - EPOCH_task_startTime > 16 && axeRndBadNews > 5";
|
||||
completedialogues[] = {"Take your reward, you have earnt it","Here is your reward, you are a great courier.","Any time you need work, come and see me, great job."};
|
||||
completedCALL = "_wh = createVehicle[""groundWeaponHolder"",getPosATL player,[],0,""CAN_COLLIDE""];[_wh,""Pelican_EPOCH""] remoteExec [""EPOCH_serverLootObject"",2];";
|
||||
completedCALL = "[objnull,""Pelican_EPOCH"",true,getposatl player] remoteExec [""EPOCH_serverLootObject"",2];";
|
||||
reward[] = {};
|
||||
cleanUp = 1;
|
||||
nextTask[] = {};
|
||||
|
@ -132,7 +132,7 @@ class FinishFishMission {
|
||||
faileddialogues[] = {};
|
||||
completeCondition = "true";
|
||||
completedialogues[] = {"Take your reward, you have earnt it","Here is your reward, you are a great fisher man.","Any time you need work, come and see me, great job."};
|
||||
completedCALL = "_WH = createVehicle[""groundWeaponHolder"",getPosATL player,[],0,""CAN_COLLIDE""];[_WH,""Mission_Fishing_Payout""] remoteExec [""EPOCH_serverLootObject"",2];";
|
||||
completedCALL = "[objnull,""Mission_Fishing_Payout"",true,getposatl player] remoteExec [""EPOCH_serverLootObject"",2];";
|
||||
reward[] = {};
|
||||
cleanUp = 1;
|
||||
nextTask[] = {};
|
||||
|
@ -127,7 +127,7 @@ class finishMonsterEscort {
|
||||
faileddialogues[] = {};
|
||||
completeCondition = "true";
|
||||
completedialogues[] = {"Take your reward, you have earnt it","Here is your reward, you are a great courier.","Any time you need work, come and see me, great job."};
|
||||
completedCALL = "_WH = createVehicle[""groundWeaponHolder"",getPosATL player,[],0,""CAN_COLLIDE""];[_WH,""Mission_Monster_Payout""] remoteExec [""EPOCH_serverLootObject"",2];";
|
||||
completedCALL = "[objnull,""Mission_Monster_Payout"",true,getposatl player] remoteExec [""EPOCH_serverLootObject"",2];";
|
||||
reward[] = {};
|
||||
cleanUp = 1;
|
||||
nextTask[] = {};
|
||||
|
@ -13,7 +13,7 @@
|
||||
https://github.com/EpochModTeam/Epoch/tree/release/Sources/epoch_server/compile/epoch_server/EPOCH_serverLootObject.sqf
|
||||
*/
|
||||
private["_randomItemArray", "_quan", "_randomLootClass", "_randomItem", "_lootPaid", "_mags", "_lootItemWeightedArray", "_lootItemArray", "_weightedItemArray", "_exit", "_maxPayout", "_lootTable", "_lootTableArray", "_weightedArray"];
|
||||
params ["_object","_type",["_forceSpawn",false]];
|
||||
params ["_object","_type",["_forceSpawn",false],["_pos",[]]];
|
||||
_debug = true;
|
||||
_pricingConfig = 'CfgPricing' call EPOCH_returnConfig;
|
||||
|
||||
@ -23,6 +23,9 @@ if !(EPOCH_forcedLootSpawnTable isEqualTo "") then {
|
||||
_lootTableClass = EPOCH_forcedLootSpawnTable;
|
||||
};
|
||||
_randomizeMagazineAmmoCount = ["CfgEpochClient", "randomizeMagazineAmmoCount", true] call EPOCH_fnc_returnConfigEntryV2;
|
||||
if (isnull _object && !(_pos isequalto [])) then {
|
||||
_object = createVehicle ["groundWeaponHolder",_pos,[],0,"CAN_COLLIDE"];
|
||||
};
|
||||
if !(isNull _object) then{
|
||||
_lootTable = [_type, "CfgMainTable", "tables"] call EPOCH_weightedArray;
|
||||
_lootTable params ["_lootTableArray","_weightedArray"];
|
||||
|
Loading…
Reference in New Issue
Block a user