benilla-re systems structs docs

RewriteInLanguage

function · ui · primitive

Address
0x49b560 · 837 bytes, up to 0x49b8a4
Meaning
Rewrites each word the skill does not cover into a same-length word of the language, in the source's case
Confidence
verified, proof one
Finding
ui/chatlanguage#when-a-line-is-rewritten

Finding: When a line is rewritten in ui: languages in chat

The chat line function 0x49a870 rewrites a line only when its language id is not 0 and the active player exists. The id is forced to 0 for chat types 0x08, 0x0a, 0x0d and 0x5a and for a player whose PLAYER_FLAGS has 0x8 (a game master), which also makes the line's language name empty. The rewrite asks 0x5ec720(player, languageId, &skill) for the skill and leaves the line alone from skill 300 up. Below 300 each word is judged alone. A language of -1 never reaches it (it is the addon arm, chatevents#addon-messages).

The derivation is in the doc.

Callers 3

Callees 8

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