benilla-re systems structs docs

SetFactionAtWar

function · ui · primitive

Address
0x4d5fd0 · 283 bytes, up to 0x4d60ea
Signature
void __fastcall (uint32_t faction, bool atWar)
Meaning
Applies the combat and floor refusals, sets the local war bit and sends the request
Confidence
verified, proof one
Finding
ui/reputationwire#faction-requests

Finding: Faction requests in ui: reputation messages and requests

SetFactionAtWar refuses without a message when asked for peace with the standing below -3000. For a faction in no slot it does nothing. In combat (unit flags bit 19) it shows ERR_NOT_IN_COMBAT and sends nothing. Otherwise it sets the slot's at-war bit at once, except that a peace-forced slot is cleared even when war is asked, and sends CMSG_SET_FACTION_ATWAR with the slot and the requested state. SetFactionInactiveFlag sets or clears the inactive bit at once, sends CMSG_SET_FACTION_INACTIVE and re-sorts. SendWatchedFaction sends CMSG_SET_WATCHED_FACTION when the slot differs from the player's field, and writes no field.

The derivation is in the doc.

Callers 1

Callees 9

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