Home API Manuals About Forum
Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Toggle Dark/Light/Auto mode Back to homepage

GetMultis

Returns all multi-objects (houses, boats) from the Stealth cache as an array of TMultiItem records.

Returns an empty array if no multis exist, UO data files are not loaded, or the character is disconnected.

Возвращает все мульти-объекты (дома, лодки) из кеша Stealth в виде массива записей TMultiItem.

Возвращает пустой массив, если мульти-объектов нет, файлы UO Data не загружены, или персонаж не подключён.

DWS

function GetMultis: TArray<TMultiItem>;

DWS overload (legacy, returns count):

function GetMultis(var Items: TMultiItems): Cardinal;

Pascal Script

function GetMultis(var Items: TMultiItems): Cardinal;

Type definitions:

TMultiItem = packed record
  ID: Cardinal;
  X: Word;
  Y: Word;
  Z: ShortInt;

  XMin: Word;
  XMax: Word;
  YMin: Word;
  YMax: Word;
  Width: Word;
  Height: Word;
end;

TMultiItems = array of TMultiItem;

Python

def GetMultis() -> list[Multi]: ...

Pascal Example

var
  Multis: TArray<TMultiItem>;
  i: Integer;
begin
  Multis := GetMultis;
  for i := 0 to Length(Multis) - 1 do
    AddToSystemJournal('Multi $' + IntToHex(Multis[i].ID, 8) +
      ' at (' + IntToStr(Multis[i].X) + ', ' + IntToStr(Multis[i].Y) + ')');
end.

Python Example

multis = GetMultis()
for m in multis:
    AddToSystemJournal(f'Multi ${m.ID:08X} at ({m.X}, {m.Y})')

See Also

GetMultiAllParts, GetMultiPartsAtPosition, IsHouse