mirror of
https://github.com/brues-code/ClassicAPI.git
synced 2026-11-16 16:10:36 +00:00
Adds C_AutoComplete.GetAutoCompleteResults, C_AutoComplete.IsRecognizedName, Enum.AutoCompleteEntryFlag and Enum.AutoCompletePriority, and the cvars autoCompleteResortNamesOnRecency, autoCompleteWhenEditingFromCenter and autoCompleteUseContext. ClassicAPI only answers the queries; an addon draws the list of names. 1.12.1 keeps no autocomplete list, but it keeps every list the names come from, so each query reads them where the client keeps them: - party: the four GUIDs at VAR_PARTY_GUIDS (0x00BC6F48), names from the name cache, online from the member stats block - raid: the VAR_RAID_MEMBER_PTRS slots (0x00B712A8) and their online bit - guild: the GuildMemberInfo roster at 0x00B72704, GUID at +0x00 and the online word at +0x48 (stored at 0x004D0C22, tested by GetGuildRosterInfo at 0x004D13C5). Read only while the player's guild key is set, the test IsInGuild (0x00516DE0) makes, because the client keeps the old roster after a /gquit - friends: the 50 slots of the social singleton Whisper partners are the one list the client does not keep. The chat dispatch hook (FUN_0049A870) reports each whisper and whisper inform (types 6 and 7, not the addon language -1) with the sender GUID it already resolves. Logging out clears the list. Names match case-insensitively by UTF-8 code point; Text::Utf8::CompareI now takes a character limit. Results come most recent whisper first, then by name. A result's priority is its closest tie: friend, guild, group, whisper. GetAutoCompletePresenceID and GetAutoCompleteRealms are constant answers in Compat.lua. The three cvars are on a new Social page of the options panel.