Fix loot spawn + BIS_air_destruction

This commit is contained in:
icomrade
2014-03-21 18:19:21 -04:00
parent e2b95634e3
commit 6c360073c2
11 changed files with 335 additions and 211 deletions

View File

@@ -9,15 +9,14 @@ if (DZE_MissionLootTable) then {
for "_i" from 0 to ((count _config) - 1) do {
_classname = configName (_config select _i);
_itemChances = getArray (_config >> _classname >> "lootType");
_itemCount = count _itemChances;
_itemCount = count _itemChances;
//diag_log format["Classname: %1, Array: %2, Amount: %3", _classname, _itemChances, _itemCount];
if (_itemCount > 0) then {
if (dayz_CBLBase find _classname < 0) then {
if ((dayz_CBLBase find _classname) < 0) then {
_weighted = [];
_j = 0;
for "_l" from 0 to ((count _itemChances) - 1) do {
for "_l" from 0 to (_itemCount - 1) do {
_weight = round (((_itemChances select _l) select 2) * 100);
for "_k" from 0 to (_weight - 1) do
{