mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-13 19:52:38 +03:00
Fix safe coins refund when packing
The check will always return 'false' because packedClass is a Weapon Holder (classname: WeaponHolder_xxx) and those aren't in DZE_MoneyStorageClasses. And there's no need for that check anyway because the _isZSC variable checks if it's a money storage.
This commit is contained in:
@@ -118,7 +118,7 @@ call {
|
|||||||
_weapons = getWeaponCargo _obj;
|
_weapons = getWeaponCargo _obj;
|
||||||
_magazines = getMagazineCargo _obj;
|
_magazines = getMagazineCargo _obj;
|
||||||
_backpacks = getBackpackCargo _obj;
|
_backpacks = getBackpackCargo _obj;
|
||||||
if (_isZSC && {_packedClass in DZE_MoneyStorageClasses}) then {_coins = _obj getVariable ["cashMoney",0];};
|
if (_isZSC) then {_coins = _obj getVariable ["cashMoney",0];};
|
||||||
|
|
||||||
_holder = _packedClass createVehicle [0,0,0];
|
_holder = _packedClass createVehicle [0,0,0];
|
||||||
deleteVehicle _obj;
|
deleteVehicle _obj;
|
||||||
@@ -126,7 +126,7 @@ call {
|
|||||||
_holder setPosATL _pos;
|
_holder setPosATL _pos;
|
||||||
_holder addMagazineCargoGlobal [getText(configFile >> "CfgVehicles" >> _packedClass >> "seedItem"),1];
|
_holder addMagazineCargoGlobal [getText(configFile >> "CfgVehicles" >> _packedClass >> "seedItem"),1];
|
||||||
[_weapons,_magazines,_backpacks,_holder] call fn_addCargo;
|
[_weapons,_magazines,_backpacks,_holder] call fn_addCargo;
|
||||||
if (_isZSC && {_packedClass in DZE_MoneyStorageClasses && {_coins > 0}}) then {
|
if (_isZSC && {_coins > 0}) then {
|
||||||
private "_displayName";
|
private "_displayName";
|
||||||
|
|
||||||
_displayName = getText (configFile >> "CfgVehicles" >> _type >> "displayName");
|
_displayName = getText (configFile >> "CfgVehicles" >> _type >> "displayName");
|
||||||
@@ -172,4 +172,4 @@ diag_log _message;
|
|||||||
if (_status < 3) then {
|
if (_status < 3) then {
|
||||||
dze_waiting = "success";
|
dze_waiting = "success";
|
||||||
_clientID publicVariableClient "dze_waiting";
|
_clientID publicVariableClient "dze_waiting";
|
||||||
};
|
};
|
||||||
|
|||||||
Reference in New Issue
Block a user