Chen Monopoly
2012-05-13 12:02:46
function Count(Item: TInventoryItem): Integer;
var
i: Integer;
N: Integer;
x: Integer;
y: Integer;
Slot: TBox;
begin
for i := 1 to 28 do
begin
Slot := InvBox(i);
if FindDTM(Item.ItemDTM, x, y, Slot.X1, Slot.Y1, Slot.X2, Slot.Y2) then
N := N + 1;
end;
Result := N;
end;Will this work/is this relatively time efficient or is there a better way of doing it?