API UO GetCharsListForShard - LIHACHTETAN/ClassicUO-BadNewbie-BasicIDE GitHub Wiki
ClassicUO / Basic IDE
Оглавление · Алфавитный указатель · Client & Connection
Returns the actual character names received from the server's character-selection packet for the current account/shard. ClassicUO caches that list in memory so the API can still return it after entering the world. If no cached list exists, the active LoginScene.Characters list is used; while already in game, the current player's name is the final fallback.
This command no longer returns the Basic profile serial as a fake character list.
UO.GetCharsListForShard() -> Any
Регистр имени не важен. Any — динамическое значение Basic; Unit — отсутствие возвращаемого значения. Integer — знаковое 32-битное число, Decimal — число с плавающей точкой. Правила типов, serial, индексов и ожиданий.
None; this command's registered overload takes no positional arguments.
No parameters; no argument defaults apply.
The list reflects what the server supplied for the current shard/account during this client session.
- It does not invent character names by scanning profile directories.
- Empty slots from the server character list are removed.
Каждый блок — самостоятельный скрипт из мануала проекта. Параметры демонстрационного объекта/контейнера и условия действия необходимо сопоставить с вашей игровой ситуацией.
SUB Main()
VAR chars = UO.GetCharsListForShard()
UO.Print(chars)
END SUBSUB Main()
VAR result = UO.GetCharsListForShard()
UO.Print(CStr(result))
END SUBSUB Main()
VAR result = UO.GetCharsListForShard()
UO.Print(CStr(result))
END SUBSUB ReadResult()
VAR result = UO.GetCharsListForShard()
UO.Print(CStr(result))
END SUB
SUB Main()
ReadResult()
END SUBРеализация и проверка контракта
InjectionScript.Runtime.InjectionApiUO+<>c__DisplayClass38_0.<RegisterStealthCompatibility>b__0
Соответствующая ветвь совместимого обработчика в InjectionApiUO.cs. Arg(i)/Text(i) читают позицию с нуля; bridge обращается к клиенту. Прямые типизированные перегрузки перечислены выше и могут иметь отдельный маршрут.
return StringArray(bridge.GetCharactersForCurrentShard());Источник реестра и отчёт сверки. Примеры проверяются загрузчиком/парсером включённого runtime. Действия на игровом сервере этой проверкой не исполняются.