Well, decided against implementing LibAsync. Too much trouble for not enough reason. Continue as normal!
Version 3.0! Aside from the requisite code tweaking, I added in a couple new features: Custom Random Lists and an Exclusion list. Both are just like they sound!
Custom Random Lists: You can create a custom list of pets and assign it to a zone or subzone; the game will select randomly from only the pets on that list in that area.
Exclusion List: The exclusion list only affects the -RANDOM- choice; animals placed on this list will never be chosen. Those animals WILL still show up, however, if you assign them specifically to a zone/subzone or if you put them on your own custom random list. Curate your own damn options ![Stick Out Tongue](//cdn-eso.mmoui.com/images/style_esoui/smilies/tongue.gif)
I think I've beaten the worst of the "collectible not ready" spam, but if you run other addons that also activate collectibles then there's always a chance it'll pop up. Collectibles have a hidden global cooldown that I can't figure out how to monitor through the API, so it's mostly down to timing. If anyone knows of a better solution, I'm all ears!
And finally, I added an option to hide your pets when sneaking. I got tired of glowing demonic ponies following me around while I was breaking and entering.
This addon requires the libraries
LibAddonMenu-2.0 and
LibZone.
PetZone: Automatic Vanity Pet Switching By Area!
This is a fairly simple addon that lets you automatically switch vanity pets in different zones and subzones! If you've ever wanted your housecat following you around Rawl'kha, to be replaced by a swamp jelly when you head out into the wilderness, to be switched to a chicken when you enter a dungeon, then this mod is for you.
Features:
-Set a pet for a specific subzone within a zone, for -ALL- subzones within a zone, or for -ALL- zones
-Highest priority goes to your specific subzone choice, then to your entire zone choice, then your all zones choice. If none of those three have choices defined, then you continue with whatever pet you had out already
-Pet choices also include -NONE-, which puts away your pets in that area; -RANDOM-, which summons a random pet; and ~Custom Random Lists, which summons a random pet from a list you specify
-You can choose to automatically hide your pet when you enter combat, join a group, enter a dungeon or delve, or enter stealth
That's about it!
All thanks for this mod go directly to Baertram, as I ruthlessly and inexpertly hacked apart their
FCO Mounty mod to make it. Seriously! I didn't know any lua when I started this, and a good chunk of the code in here is only slightly modified from Baertram's. I'm mostly considering this addon complete except for filling out the rest of the zone data, but if you think it could use something else then leave a comment and I'll consider it.