CGUnit_C::GetControllingPlayer
function · objectlayer · primitive
- Address
0x606170· 103 bytes, up to0x6061d6- Signature
CGPlayer_C * __thiscall (CGUnit_C *this)- Meaning
- Returns the unit its charmer or else creator names, or itself, when that is a player; else null
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- objectlayer/reaction#controlling-player-and-reputation-slot
Finding: Controlling player and reputation slot in objectlayer: reaction
0x606170(unit) gives the player that controls a unit: the unit named by its charmer, field 10,
or else its creator, field 14, or the unit itself when both are zero; the result counts only when
its type mask has the player bit, else 0. 0x605fc0(faction) is true when the faction's
Faction.dbc row exists and its reputation index, +0x4, is not negative.
The derivation is in the doc.
Callers 10
- Script::UnitIsPVPFreeForAll ui
- CGUnit_C::IsPVPContested objectlayer
- CGUnit_C::IsPVPFreeForAll objectlayer
- CGUnit_C::IsDuelingWith objectlayer
- CGUnit_C::UnitReaction objectlayer
- CGUnit_C::UnitReaction_Unit objectlayer
- CGUnit_C::CanAssist_Unit objectlayer
- CGUnit_C::CanAttack objectlayer
- IsInSamePartyAs objectlayer
- IsInSameRaidAs objectlayer
Callees 1
- ClntObjMgrObjectPtr objectlayer
Calls and jumps by a bare address, from tables/calls.tsv.