Skip to content

Addon: [1.9.6] - TextReader allows UTF-8 characters extraction#757

Merged
Xian55 merged 1 commit intodevfrom
feature/752-totems
Feb 6, 2026
Merged

Addon: [1.9.6] - TextReader allows UTF-8 characters extraction#757
Xian55 merged 1 commit intodevfrom
feature/752-totems

Conversation

@Xian55
Copy link
Owner

@Xian55 Xian55 commented Feb 6, 2026

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

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

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>
@Xian55 Xian55 added enhancement This pull request implements a new feature. breaking change labels Feb 6, 2026
@Xian55 Xian55 linked an issue Feb 6, 2026 that may be closed by this pull request
@Xian55 Xian55 merged commit 18651aa into dev Feb 6, 2026
1 check passed
@Xian55 Xian55 deleted the feature/752-totems branch February 6, 2026 20:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

breaking change enhancement This pull request implements a new feature.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Not applying both poisons + sometimes not facing totems

1 participant