Byrth / Lua-Byrth

Lua Addons and Scripts
3 stars 2 forks source link

Gearswap - pet.tp always returns nil for automaton #405

Closed benjaminGitHub closed 8 years ago

benjaminGitHub commented 8 years ago

Documentation (http://wiki.windower.net/doku.php?id=addons:gearswap:documentation:global_variables:start#user_and_npc_variables) states that tp is available for pets, but pet.tp always returns nil when I have my automaton out.

benjaminGitHub commented 8 years ago

Looking through the code and trying out things like:

local temp_player_mob_table,temp_pet,pet_id = windower.ffxi.get_mob_by_index(player.index)
    if temp_player_mob_table.pet_index then
        temp_pet = windower.ffxi.get_mob_by_index(temp_player_mob_table.pet_index)

and temp_pet.tp returns nil. So it seems that there's no way to get tp for the automaton this way.

Byrth commented 8 years ago

Thanks for the report. I think the Windower API was changed last update and perhaps tp no longer works for pets. I'll check it out.

z16 commented 8 years ago

That is the case. SE does no longer store the TP in the mob array, so that will no longer work. You have to get pet TP from the 0x068 packet now (it's documented in our fields file). We do not expose it explicitly in our API yet, although that could be added with the next Hook update, if the packet capture is too annoying to be done. Let me know if you need this @Byrth.

Byrth commented 8 years ago

This should be done in version 0.913