benilla-re systems structs docs

LightningObject

struct · spell · 80 bytes

Meaning
Holds a chain effect: link, GUID and hop arrays, end time, chain record values, texture, spell, flag and references
Confidence
verified, proof one
Finding
spell/visuals#chain-effect-creation

Finding: Chain effect creation in spell: visuals

Kit procedure kinds 0 and 12 call 0x6ecb90 with the chain id, strand count and persistent flag from params 0, 1 and 2 (each low byte of bits(f32(p + 512.0)) >> 14, the flag that byte's being nonzero), the targets and the spell. For each strand up to 3, 0x6ecbd0 allocates a 0x50-byte LightningObject with one reference, links it at the tail, and stores the GUIDs, the end now + n·life, the record's fields 1 to 4, life·0.001f, its texture, spell and flag. A persistent object gains a reference and fills the owner's next slot. It returns at once for a null caster or targets, no targets, spell 0, no strands, or a chain id with no record.

The derivation is in the doc.

Fields 10

offsetsizetypenamemeaningconfidencefinding
0x00008void *[2]m_linkHolds the chain's link in the chain listverified, proof onespell/visuals#chain-effect-creation
0x000816uint32_t[4]m_guidsHolds the uint64 GUID array: capacity, count, data, quantumverified, proof onespell/visuals#chain-hop-table
0x001816uint32_t[4]m_boltsHolds the hop array: capacity, count, data, quantumverified, proof onespell/visuals#chain-hop-table
0x00284uint32_tm_endTimeHolds the end time, now plus hops times life; set to now by 0x6ece10verified, proof onespell/visuals#chain-update-per-frame
0x002c16uint32_t[4]m_chainFieldsHolds the chain record's fields 1 to 4 as copied dwords, passed to 0x7b07f0verified, proof onespell/visuals#chain-update-per-frame
0x003c4floatm_lifeSecondsHolds the chain record's +0x14 times 0.001verified, proof onespell/visuals#chain-effect-creation
0x00404void *m_textureHolds the texture of the chain record's +0x1cverified, proof onespell/visuals#chain-effect-creation
0x00444uint32_tm_spellIdHolds the spell id 0x6ec780 places target ends withverified, proof onespell/visuals#chain-endpoints
0x00481uint8_tm_persistentHolds 1 for a chain that ignores its hop windows and end timeverified, proof onespell/visuals#chain-update-per-frame
0x004c4uint32_tm_refCountHolds the reference count, 1 at creationverified, proof onespell/visuals#chain-lifetime