GetUnitFromToken
function · ui · orchestration
- Address
0x515940· 34 bytes, up to0x515961- Signature
CGUnit_C * __fastcall (const char *token)- Meaning
- Returns the unit object a token names, null for none
- Confidence
- verified, proof one
- Finding
- ui/unittokens#indexed-tokens
Finding: Indexed tokens in ui: unit tokens and the unit functions' arguments
For party, partypet, raid and raidpet the digits after the prefix are summed in base 10 with no cap (acc*10 + digit, wrapping at 32 bits), stopping at the
first byte outside 0 to 9. The 1-based number is decremented, so a missing suffix gives index 0xffffffff. party takes indices below 4 from the GUID table 0xbc6f48 and 0 otherwise.
raid and raidpet take indices below the raid count 0xb713e0 from the roster. partypet has no bound: it reads the table with the index as given, then the
member record. A pet GUID is the owner's charm GUID when nonzero, else its summon GUID. 0x515940(token) returns the unit object of the GUID, null for GUID 0.
The derivation is in the doc.
Callers 49
- Script::AssistUnit ui
- Script::FollowUnit ui
- Script::CanInspect ui
- Script::CheckInteractDistance ui
- Script::DropItemOnUnit ui
- Script::GetInventoryItemTexture ui
- Script::GetInventoryItemBroken ui
- Script::GetInventoryItemCount ui
- Script::GetInventoryItemQuality ui
- Script::GetInventoryItemCooldown ui
- Script::GetInventoryItemLink ui
- Script::SetInventoryPortaitTexture ui
- Script::GetGuildInfo ui
- Script::UnitIsVisible ui
- Script::UnitPlayerControlled ui
- Script::UnitReaction ui
- Script::UnitIsEnemy ui
- Script::UnitCanAssist ui
- Script::UnitCanAttack ui
- Script::UnitIsCharmed ui
- Script::UnitIsPlusMob ui
- Script::UnitClassification ui
- Script::UnitXP ui
- Script::UnitXPMax ui
- Script::UnitOnTaxi ui
- Script::UnitAffectingCombat ui
- Script::UnitResistance ui
- Script::UnitStat ui
- Script::UnitAttackBothHands ui
- Script::UnitRangedDamage ui
- Script::UnitRangedAttack ui
- Script::UnitDamage ui
- Script::UnitAttackSpeed ui
- Script::UnitAttackPower ui
- Script::UnitRangedAttackPower ui
- Script::UnitDefense ui
- Script::UnitArmor ui
- Script::UnitCharacterPoints ui
- Script::UnitIsTapped ui
- Script::UnitIsTappedByPlayer ui
- Script::UnitIsTrivial ui
- Script::UnitIsCivilian ui
- Script::UnitHasRelicSlot ui
- Script::UnitCreatureType ui
- Script::UnitCreatureFamily ui
- Script::UnitPVPRank ui
- Script::GetPVPRankInfo ui
- GameTooltip::SetInventoryItem ui
- Script::SpellTargetUnit spell
Callees 2
- ClntObjMgrObjectPtr objectlayer
- Script::GetGUIDFromName ui
Calls and jumps by a bare address, from tables/calls.tsv.