doom0791
2011-01-22 18:51:43
{*******************************************************************************
function IsEquippedIDEx(IDs: TIntegerArray): boolean;
By: Drags111
Description: Returns true if there is an item equipped with one of the IDs.
*******************************************************************************}
function IsEquippedIDEx(IDs: TIntegerArray): boolean;
var
Equipment: TEquipmentSet;
i, ii: integer;
begin
Result := False;
Equipment := GetEquipment;
for i := High(IDs) downto 0 do
for ii := 10 downto 0 do
if (IDs[i] = Equipment.Items[i].ID) then
begin
Result := True;
Exit;
end;
end; Fix:
{*******************************************************************************
function IsEquippedIDEx(IDs: TIntegerArray): boolean;
By: Drags111
Description: Returns true if there is an item equipped with one of the IDs.
*******************************************************************************}
function IsEquippedIDEx(IDs: TIntegerArray): boolean;
var
Equipment: TEquipmentSet;
i, ii: integer;
begin
Result := False;
Equipment := GetEquipment;
for i := High(IDs) downto 0 do
for ii := 10 downto 0 do
if (IDs[i] = Equipment.Items[ii].ID) then
begin
Result := True;
Exit;
end;
end;