/******************************/
/*****	Elite Warriors	*******/
/*****	 Dark-Raptor	*******/
/******************************/


private ["_player","_path","_custom","_delete","_namespace","_name"];
_player = player;
//_path = [_this,1,[],[[]]] call bis_fnc_param;
//_custom = [_this,2,[],[[]]] call bis_fnc_param;
//_delete = [_this,3,false,[false]] call bis_fnc_param;

//_namespace = [_path,0,missionnamespace,[missionnamespace,grpnull,objnull]] call bis_fnc_paramin;
//_name = [_path,1,"",[""]] call bis_fnc_paramin;

//--- Get magazines loaded to weapons
private ["_primaryWeaponMagazine","_secondaryWeaponMagazine","_handgunMagazine"];
_primaryWeaponMagazine = "";
_secondaryWeaponMagazine = "";
_handgunMagazine = "";


//[_primaryWeaponMagazine] call bis_fnc_log;

//--- Get current values
private ["_export"];
_gear = [
	/* 00 */	[uniform _player,uniformitems _player - magazines player],
	/* 01 */	[vest _player,vestitems _player - magazines player],
	/* 02 */	[backpack _player,backpackitems _player - magazines player],
	/* 03 */	headgear _player,
	/* 04 */	goggles _player,
	/* 05 */	binocular _player,
	/* 06 */	[primaryweapon _player,_player weaponaccessories primaryweapon _player,primaryWeaponMagazine _player select 0],
	/* 07 */	[secondaryweapon _player,_player weaponaccessories secondaryweapon _player,secondaryWeaponMagazine _player select 0],
	/* 08 */	[handgunweapon _player,_player weaponaccessories handgunweapon _player,handgunMagazine _player select 0],
	/* 09 */	assigneditems _player - [binocular _player],
	/* 10 */	magazinesAmmofull  player//_custom
];


//["gear",_gear] call EWDB_fnc_DBUpdateGear;
//gear_old = _gear;
////hint "Gear Saved to Database";


if (isnil "gear_old") then {gear_old = _gear;};
if !(EWDB_DBSaveGear_Pause) then {
if (!(_gear isEqualTo gear_old)) then {

["gear",_gear] call EWDB_fnc_DBUpdateGear;
//hint "Gear Auto Saved to Database";

gear_old = _gear;
};
};

//--- Store
/*
private ["_data","_nameID"];
_data = _namespace getvariable ["bis_fnc_saveInventory_data",[]];
_nameID = _data find _name;
if (_delete) then {
	if (_nameID >= 0) then {
		_data set [_nameID,objnull];
		_data set [_nameID + 1,objnull];
		_data = _data - [objnull];
	};
} else {
	if (_nameID < 0) then {
		_nameID = count _data;
		_data set [_nameID,_name];
	};
	_data set [_nameID + 1,_export];
};
_namespace setvariable ["bis_fnc_saveInventory_data",_data];
profilenamespace setvariable ["bis_fnc_saveInventory_profile",true];
if !(isnil {profilenamespace getvariable "bis_fnc_saveInventory_profile"}) then {saveprofilenamespace};

//_export
*/