Script::GetPetTrainingPoints
function · ui · primitive
- Address
0x4be790· 166 bytes, up to0x4be835- Signature
int __fastcall (lua_State *L)- Meaning
- Returns the pet's total and spent training points
- Confidence
- verified, proof one
- Name from
- the community database (idb)
- Finding
- ui/petbar#pet-stats
Finding: Pet stats in ui: the pet bar and the form bar
GetPetLoyalty returns the loyalty level string of the pet (from PetLoyalty by the byte at
[pet+0x110]+0x211) or nil. GetPetTrainingPoints returns the two words of the dword at +0x23c,
high word first, and GetPetExperience the dwords at +0x21c and +0x220; both return zeros when the
pet fails the test 0x6116e0. GetPetHappiness returns a bucket 0 to 3, a damage percent
and a loyalty rate: the happiness at +0x54 is compared with the three thresholds of the pet's
PetPersonality row (row 1 when the pet has none), the damage entry for the bucket is times 100.0,
and bucket 0, a failed gate or no row gives 100.0, 0.0 (nil as the bucket when the gate fails).
The derivation is in the doc.
Callers 0
None by a direct call or jump.
Callees 3
- ClntObjMgrObjectPtr objectlayer
- CGUnit_C::IsPlayerOrHunterPet objectlayer
- lua_pushnumber lua
Calls and jumps by a bare address, from tables/calls.tsv.