benilla-re systems structs docs

CGUnit_C::UnitReaction

function · objectlayer · primitive

Address
0x6061e0 · 728 bytes, up to 0x6064b7
Signature
uint32_t __thiscall (CGUnit_C *this, CGUnit_C *other)
Meaning
Returns the unit's reaction rank toward another: self, duel, party, free-for-all, reputation, then the templates
Confidence
verified, proof one
Name from
the community database (idb)
Finding
objectlayer/reaction#unit-toward-unit
Test
objectlayer::unit_reaction_league_of_arathor_emissary, objectlayer::unit_reaction_tracks_the_reputation_ladder, objectlayer::unit_reaction_reputation_branch_is_gated, objectlayer::unit_reaction_player_to_npc_is_atwar_not_rank, objectlayer::unit_reaction_persuaded_bump_and_clamp, objectlayer::unit_reaction_self_is_friendly

Finding: Unit toward unit in objectlayer: reaction

0x6061e0(this = A, B) returns A's reaction toward B. A unit toward itself is 4. When both carry bit 3 of UNIT_FIELD_FLAGS (field 46), the player-controlled bit, each is mapped to the player controlling it; a missing player gives 3. Two players in one duel give 4 on the same team and 1 on opposing teams. The active player and a party member, either way round, give 4. Two players both flagged free-for-all, bit 7 of PLAYER_FLAGS, give 1. Otherwise the faction rules below decide.

The derivation is in the doc.

Callers 21

Callees 7

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