benilla-re systems structs docs

ExpandTargetTokens

function · ui · primitive

Address
0x5083a0 · 386 bytes, up to 0x508521
Signature
uint32_t __fastcall (const char *text, char *buf, uint32_t size)
Meaning
Copies text into a buffer, replacing %N, %T, %n and %t with the target's name; returns 1 when no other % occurs
Confidence
verified, proof one
Finding
ui/chatsend#target-token-expansion
Test
ui::expand_target_tokens_whole

Finding: Target token expansion in ui: sending chat

0x5083a0(text, buf, size) copies the C string text into buf and replaces %N, %T, %n and %t, and no other letter, with the target's name. After any other byte, including a second % and the end of the text, the % stays and the scan goes on with the next byte, so %%t gives % and the name and 100% is unchanged. Every append is cut at size - 1 bytes. It returns 1 when every % was followed by one of the four letters, else 0; a null text returns 0 and writes nothing. SendChatMessage drops the result.

The derivation is in the doc.

Callers 1

Callees 7

Calls and jumps by a bare address, from tables/calls.tsv.