Files
WoW-Hybrid-gateway/tests/fixtures/octo_channelled_self_cast_ids.md

2.5 KiB
Raw Permalink Blame History

Channelled self-cast fixture

The native cast host test covers all 100 rows in the effective 30,790-row Octo Spell.dbc that meet three conditions. Tortoise’s channel attribute test selects 433 spells. Of these, 100 have no explicit target flags and every nonzero implicit target of an active effect is the caster (target 1). Empty target slots contribute no selector. This retains every rank and includes NPC and test records. The fixture gives the selected spell IDs to a synthetic character for translation.

Source attribute Rows in the selected set
Channel bit 0x04 11
Channel bit 0x40 86
Both channel bits 3

The exact table SHA-256 is in the generated include. To regenerate the list from the repository root, run python3 ops/channelled_self_cast_fixture.py /path/to/Spell.dbc > tests/fixtures/octo_channelled_self_cast_ids.inc. The generator uses the project's existing 1.12 spell layout and DBC reader. Tortoise source revision fbf5f63a65271e8769d6ac2bc20d86d392d00072 defines the channel mask in src/game/Spells/SpellEntry.h::IsChanneledSpell and caster target in src/game/Spells/SpellDefines.h.

The matrix sends each spell through NativeWorldTranslation::gameplay with request byte values 0, 1, 2 and 0x80. Each case checks the Turtle opcode and complete six-byte body (spell ID and zero explicit-target mask). These are representative values from the existing SendCastFlags host fixture. The native client supplies SendCastFlags at cast time. Spell.dbc stores the spell attributes and target selectors. The build-70334 reference in Trinity revision 4ecbd289984d8d316e6baa0d120f3f9c967bf47a reads this byte in src/server/game/Server/Packets/SpellPackets.cpp before reading the separate target data.

Far Sight uses a destination

Octo Far Sight (6196) has AttributesEx 0x22004 and explicit target mask 0x40 (TARGET_FLAG_DEST_LOCATION). Its two active effects are ADD_FARSIGHT (72, selectors 0/0) and APPLY_AURA (6, selectors 1/0). Tortoise's Spell::EffectAddFarsight places the focus at the requested destination coordinates. Far Sight (PT) (6115) and Eagle Eye (6197) have the same explicit destination mask and caster-selector combination. All three fall outside the self-only matrix.

Build 70334's SpellTargetData carries an optional DstLocation. The current cast reader and Turtle target encoder in src/gameplay.cpp exclude target 0x40. Commit 5a6d9fc3 changed SendCastFlags consumption only. The actual SendCastFlags byte from a native Far Sight cast and successful translation of its destination remain unverified.