mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-17 09:10:27 +03:00
more DZE_MissionLootTable fixes #1028
This commit is contained in:
@@ -7,7 +7,13 @@ _obj = _this select 0;
|
||||
_type = toLower(typeOf _obj);
|
||||
|
||||
//diag_log format["Spawning loot for: %1", _type];
|
||||
|
||||
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
if (DZE_MissionLootTable) then {
|
||||
_config = missionConfigFile >> "CfgBuildingLoot" >> _type;
|
||||
};
|
||||
|
||||
_positions = [] + getArray (_config >> "lootPos");
|
||||
_itemTypes = [] + getArray (_config >> "itemType");
|
||||
_lootChance = getNumber (_config >> "lootChance");
|
||||
|
||||
@@ -8,6 +8,9 @@ if (dayz_spawnZombies > dayz_maxLocalZombies) exitwith {};
|
||||
_obj = _this select 0;
|
||||
_type = typeOf _obj;
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
if (DZE_MissionLootTable) then {
|
||||
_config = missionConfigFile >> "CfgBuildingLoot" >> _type;
|
||||
};
|
||||
_canLoot = isClass (_config);
|
||||
|
||||
if (_canLoot) then {
|
||||
|
||||
@@ -98,6 +98,9 @@ if (_nearbyCount < 1) exitwith
|
||||
{
|
||||
_type = typeOf _x;
|
||||
_config = configFile >> "CfgBuildingLoot" >> _type;
|
||||
if (DZE_MissionLootTable) then {
|
||||
_config = missionConfigFile >> "CfgBuildingLoot" >> _type;
|
||||
};
|
||||
_canLoot = isClass (_config);
|
||||
|
||||
if(_canLoot) then {
|
||||
|
||||
@@ -1,6 +1,12 @@
|
||||
private ["_position","_doLoiter","_unitTypes","_loot","_array","_agent","_type","_radius","_method","_myDest","_newDest","_lootType","_player","_isAlive","_rnd","_id"];
|
||||
_player = _this select 0;
|
||||
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
|
||||
_unitTypes = [];
|
||||
if (DZE_MissionLootTable) then {
|
||||
_unitTypes = []+ getArray (missionConfigFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
} else {
|
||||
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
};
|
||||
_doLoiter = true;
|
||||
|
||||
_loot = "";
|
||||
|
||||
@@ -16,7 +16,12 @@ _agent = objNull;
|
||||
if (!_isNoone) exitWith {};
|
||||
|
||||
if (count _unitTypes == 0) then {
|
||||
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
|
||||
if (DZE_MissionLootTable) then {
|
||||
_unitTypes = []+ getArray (missionConfigFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
} else {
|
||||
_unitTypes = []+ getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
};
|
||||
};
|
||||
|
||||
_type = _unitTypes call BIS_fnc_selectRandom;
|
||||
|
||||
@@ -110,8 +110,16 @@ for "_i" from 0 to ((count (_config)) - 1) do {
|
||||
private["_i","_type","_config","_canZombie","_canLoot"];
|
||||
dayz_ZombieBuildings = [];
|
||||
dayz_LootBuildings = [];
|
||||
for "_i" from 0 to (count (configFile >> "CfgBuildingLoot") - 1) do {
|
||||
_type = (configFile >> "CfgBuildingLoot") select _i;
|
||||
|
||||
_config = [];
|
||||
if (DZE_MissionLootTable) then {
|
||||
_config = missionConfigFile >> "CfgBuildingLoot";
|
||||
} else {
|
||||
_config = configFile >> "CfgBuildingLoot";
|
||||
};
|
||||
|
||||
for "_i" from 0 to (count (_config) - 1) do {
|
||||
_type = _config select _i;
|
||||
_canZombie = getNumber (_type >> "zombieChance") > 0;
|
||||
_canLoot = getNumber (_type >> "lootChance") > 0;
|
||||
if(_canZombie) then {
|
||||
|
||||
@@ -593,7 +593,12 @@ if(!isDedicated) then {
|
||||
zeroPreviousWeather = [0,0,[0,0],0];
|
||||
zeroCurrentWeather = [0,0,[0,0],0];
|
||||
|
||||
dayz_baseTypes = getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
if (DZE_MissionLootTable) then {
|
||||
dayz_baseTypes = getArray (missionConfigFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
} else {
|
||||
dayz_baseTypes = getArray (configFile >> "CfgBuildingLoot" >> "Default" >> "zombieClass");
|
||||
};
|
||||
|
||||
|
||||
//temperature variables
|
||||
dayz_temperatur = 36; //TeeChange
|
||||
|
||||
Reference in New Issue
Block a user