Addon: [1.9.6] - TextReader allows UTF-8 characters extraction#757
Merged
Addon: [1.9.6] - TextReader allows UTF-8 characters extraction#757
Conversation
Replace ChatReader with unified TextReader that supports UTF-8 text transfer from the addon via cells 98-99. The new encoding packs 3 raw UTF-8 bytes per frame into a 24-bit data cell with metadata encoding: cmd(4 bits) | length(10 bits) | offset(10 bits). TextReader handles multiple text command types through a single channel: - Chat messages (whisper, say, yell, emote, party) - Target names (for player targets not in CreatureDB) - Totem names (from combat log detection) Add TotemDetector that cross-references CombatLog.EnemySummons against CreatureDB to identify Totem creature types. Detection uses two methods for Classic client compatibility: - SPELL_SUMMON from hostile NPCs (standard client versions) - SPELL_AURA_APPLIED from hostile Guardians (Classic 1.14.x where NPC totems appear as COMBATLOG_OBJECT_TYPE_GUARDIAN 0x2000) Expose "DamageTakenFromTotem" requirement in RequirementFactory for use in class config JSON files to condition-gate spells based on totem presence (e.g. interrupt channeled casts, trigger defensive cooldowns). Lua-side changes: - Unified TextQueue with free-list entry pooling (no allocation on push) - UTF-8 safety check and 4-byte sequence filtering (emoji) - PackUTF8Bytes helper for zero-allocation byte packing - Destructure sourceName/destName from combat log args directly instead of using select() to avoid off-by-one indexing errors - Enable enemy nameplate CVars for guardian/minion visibility C#-side changes: - CombatLog tracks EnemySummons HashSet via new cell 110 - AddonReader falls back to TextReader.LastTargetName for player targets instead of the old 6-char ASCII cells 16-17 - ChatReader deleted, TextReader registered as IReader singleton - Frame count 113 -> 114, addon version 1.9.5 -> 1.9.6 Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Replace
ChatReaderwith unifiedTextReaderthat supportsUTF-8text transfer from the addon via cells 98-99. The new encoding packs 3 raw UTF-8 bytes per frame into a 24-bit data cell with metadata encoding:TextReaderhandles multiple text command types through a single channel:whisper,say,yell,emote,party)CreatureDB)Add
TotemDetectorthat cross-referencesCombatLog.EnemySummonsagainstCreatureDBto identify Totem creature types. Detection uses two methods for Classic client compatibility:SPELL_SUMMONfrom hostile NPCs (standard client versions)SPELL_AURA_APPLIEDfrom hostile Guardians (Classic 1.14.x where NPC totems appear asCOMBATLOG_OBJECT_TYPE_GUARDIAN0x2000)Expose
"DamageTakenFromTotem"requirement inRequirementFactoryfor use in class config JSON files to condition-gate spells based on totem presence (e.g. interrupt channeled casts, trigger defensive cooldowns).Lua-side changes:
TextQueuewith free-list entry pooling (no allocation on push)C#-side changes:
CombatLogtracksEnemySummonsHashSetvia new cell110AddonReaderfalls back toTextReader.LastTargetNamefor player targets instead of the old 6-char ASCII cells 16-17ChatReaderdeleted,TextReaderregistered asIReadersingleton