mirror of
https://github.com/EpochModTeam/DayZ-Epoch.git
synced 2025-12-14 20:13:13 +03:00
Gem Trading mostly finished
Sometimes displays incorrect total price in advanced trading menu.
This commit is contained in:
@@ -206,9 +206,16 @@ if (_proceed) then {
|
||||
|
||||
if (_isMine) then {
|
||||
if((random 10) <= 4) then {
|
||||
_gems = ["ItemTopaz","ItemObsidian","ItemSapphire","ItemAmethyst","ItemEmerald","ItemCitrine","ItemRuby"];
|
||||
_gem = _gems select (floor(random (count _gems)));
|
||||
_selectedRemoveOutput set [(count _selectedRemoveOutput),[_gem,1]];
|
||||
_gems = [];
|
||||
_weights = [];
|
||||
{
|
||||
_gems set [(count _gems), (_x select 0)];
|
||||
_weights set [(count _weights), (_x select 1)];
|
||||
} count DZE_GemOccurance;
|
||||
diag_log [_gems, _weights];
|
||||
_gemSelected = [_gems, _weights] call BIS_fnc_selectRandomWeighted;
|
||||
diag_log _gemSelected;
|
||||
_selectedRemoveOutput set [(count _selectedRemoveOutput),[_gemSelected,1]];
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user