GetToolTipRec
Returns the structured tooltip data for the object with the given ObjID as a TClilocRec record containing individual cliloc IDs and their parameters.
In Python, this method is named GetTooltipRec.
ObjID — ID of the object or mobile. If 0, returns an empty record immediately.
If the tooltip has not been received yet, the method sends a tooltip request to the server and waits briefly (up to ~120 ms) for the response.
Returns a record with Count = 0 if the object does not exist, the character is disconnected, or the client version does not support tooltips.
For a simple concatenated text string instead of the structured record, use GetTooltip.
Возвращает структурированные данные тултипа для объекта с указанным ObjID в виде записи TClilocRec, содержащей отдельные cliloc-идентификаторы и их параметры.
В Python метод называется GetTooltipRec.
ObjID — ID объекта или мобила. Если 0, немедленно возвращает пустую запись.
Если тултип ещё не получен, метод отправляет запрос серверу и кратковременно ожидает ответа (до ~120 мс).
Возвращает запись с Count = 0, если объект не существует, персонаж не подключён или версия клиента не поддерживает тултипы.
Для получения простого текста тултипа вместо структурированной записи используйте GetTooltip.
function GetToolTipRec(ObjID: Cardinal): TClilocRec;
Type definitions:
TClilocItemRec = packed record
ClilocID: Cardinal;
Params: TArray<String>;
end;
TClilocItemRecArray = array of TClilocItemRec;
TClilocRec = packed record
Count: Cardinal;
Items: TClilocItemRecArray;
end;
def GetTooltipRec(ObjID: int) -> list[ClilocRec]: ...
var
Rec: TClilocRec;
i: Integer;
begin
Rec := GetToolTipRec(FindItem);
AddToSystemJournal('Tooltip entries: ' + IntToStr(Rec.Count));
for i := 0 to Rec.Count - 1 do
AddToSystemJournal('ClilocID: ' + IntToStr(Rec.Items[i].ClilocID) +
' = ' + GetClilocByID(Rec.Items[i].ClilocID));
end.
rec = GetTooltipRec(FindItem())
AddToSystemJournal(f'Tooltip entries: {len(rec)}')
for item in rec:
AddToSystemJournal(f'ClilocID: {item.ClilocID} = {GetClilocByID(item.ClilocID)}')