AdmitPickUnit
function · ui · primitive
- Address
0x480610· 353 bytes, up to0x480770- Meaning
- Returns whether the pick admits a unit by self, control, relation, life and targeting tests
- Confidence
- verified, proof one
- Finding
- ui/worldpick#what-a-unit-must-pass
Finding: What a unit must pass in ui: the world pick
0x480610(unit, flags) runs these tests in order, and admits the unit when none refuses. Without flag 0x20 it refuses the active player's own model and a unit under the active player's control: unit-flag 0x01000000 set and its charmer (else its creator) the active player. With any of 0x10000, 0x20000 and 0x40000 set it needs one of them to hold against the active player: same party, may assist, may attack.
With either of 0x100000 and 0x200000 set it needs a living unit to have the first and a dead one the second. While a spell awaits a target it refuses a unit with unit-flag 0x100.
The derivation is in the doc.
Callers 1
Callees 7
- ClntObjMgrObjectPtr objectlayer
- ClntObjMgrGetActivePlayer objectlayer
- IsActivePlayerUnit objectlayer
- CGUnit_C::CanAssist_Unit objectlayer
- CGUnit_C::CanAttack objectlayer
- IsInSamePartyAs objectlayer
- IsSpellTargeting spell
Calls and jumps by a bare address, from tables/calls.tsv.