Is there a way to get a count of the number of pets/minions assisting me in combat?
I'm talking about warlock pets/minions.
Don't want to count the combat ally assigned from the order hall. Don't want to count quest NPCs assisting me in combat. Is there any way count them and get their current heal as well? |
I doubt it. The only direct UnitID we have is for your main demon. None of the ones that spawn from your other abilities.
|
Okay, what about these unit frames:
Anyone know the name / events that trigger them? |
What does /fstack say about them?
|
You can track your pets through combat log events (probably SPELL_SUMMON), and mask their flags for ownership to see if they belong to the player.
Insert their GUID into a table when they spawn and remove them when they despawn; if they're on a timer just keep track of the timestamp and remove them after a set amount of time. |
Quote:
|
Anything that is is displayed to the totem frame can be obtained with the totem API and events.
Pseudo code. Code:
OnEvent(self, event, ...) http://wowprogramming.com/docs/api/GetTotemInfo |
Quote:
Edit: Just to follow up, the TOTEM event now fires on several classes for different things that i've played with Warlock (Demonology): The Wild Imps and the Dreadstalkers both trigger the event but return nothing for GetTotemInfo (i'm faking it by watching the SPELL_SUMMON event in the combat log) Monk (Mistweaver): The Jade Serpent Statue works the same as Warlocks Druid (Restoration): Efflorescence is the same Shaman (Restoration): While they give the proper GetTotemInfo returns, if you take Echo which allows 2 charges of Healing Stream Totem, both have the same spellID and thus need to be handled specially (if using spellID as an indentifier) |
You should always be tracking via the slot when using the totem events, and not via the spellID.
I highly doubt classes other than shaman will have a valid spellID, and the tooltips use tooltip:GetTotem(slot) to fill the tooltip information. With COMBAT_LOG_EVENT_UNFILTERED and SPELL_SUMMON, you should be able to use something like this (untested): Code:
local summons = {} Be aware that the above code is untested. I'm also assuming destName/destGUID is used for the summoned demon. You could also store the table as a saved variable, which means you can still get an accurate count after a loading screen. You could also probably combine them or use some other method to determine how many were summoned. |
All times are GMT -6. The time now is 01:42 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2004 - 2022 MMOUI