CanUsePetBar
function · ui · primitive
- Address
0x4bcf70· 312 bytes, up to0x4bd0a7- Signature
bool __cdecl ()- Meaning
- Answers whether the player controls the pet well enough to use its bar
- Confidence
- verified, proof one
- Finding
- ui/petbar#the-pet-gate
Finding: The pet gate in ui: the pet bar and the form bar
0x4bcf70 answers whether the player may use the pet bar, and is the gate of every click, drop and
autocast toggle. It needs the active player, who is not charmed ([player.fields+0x10] and +0x14
both 0); a far-sight guid, if the player has one, equal to the pet; a pet unit resolving from the cached
guid, whose charmer (else creator) guid is the player; none of the pet's UNIT_FIELD_FLAGS bits
0x40000, 0x400000 and 0x800000; and bit 27 of the mode word clear. GetPetActionsUsable pushes 1 or nil
from it. PetHasActionBar pushes 1 for a nonzero pet guid, else nil.
The derivation is in the doc.
Callers 6
- SetPetBarSlot ui
- TogglePetSlotAutocast ui
- SendSpellAutocast ui
- PressPetAction ui
- Script::GetPetActionsUsable ui
- GetActionSlotUsable ui
Callees 2
- ClntObjMgrObjectPtr objectlayer
- ClntObjMgrGetActivePlayer objectlayer
Calls and jumps by a bare address, from tables/calls.tsv.