benilla-re systems structs docs

GetArmorSchoolIndex

function · unassigned · orchestration

Address
0x53f830 · 6 bytes, up to 0x53f835
Signature
int32_t __cdecl ()
Meaning
Returns the index of the resistance row flagged physical
Confidence
verified, proof one
Finding
ui/unitstats#resistances-and-armor

Finding: Resistances and armor in ui: unit stat functions

UnitResistance(unit, i) returns the base, the resistance, the positive buff and the negative buff, all integers. For the local player the base is the field less the buffs, the resistance is the field (0 when it is negative), and the buffs come from PLAYER_FIELD_RESISTANCEBUFFMODSPOSITIVE and NEGATIVE (fields 1187 and 1194). Any other unit gets the field raised to 0 as both base and resistance, and 0 for both buffs. UnitArmor(unit) does the same for the armor school and returns five values: the base, the effective armor, the armor, and the two buffs. A field below zero makes the resistance and both armor copies 0 while the base keeps the signed difference.

The derivation is in the doc.

Callers 5

Callees 0

None by a direct call or jump.

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