Is Npc Dead
How do I figure out if the NPC I am looting is dead or not. I found UNIT_REACTION_DEAD on the globals page but no idea how to access it. I also found IsUnitDead(string unitTag) Returns: bool isDead. However, it's that darn ' unitTag ' and I have no idea what to put. I found 19 posts with the words UntiTag, and they mention things like "player", "reticleover", "interact", and so on. I tried "playertarget" and "target" but I can't get IsUnitDead() to return true when I'm looting an Npc.
Esohead uses the level of the NPC when it's living and you mouse over the Npc, to determine that it's an Npc. What I am trying to do is determine whether or not I am looting an Npc. The Npc level is 0 when they are dead. I can get the Npc level to display when they are alive, but I want to loot the Npc and not have it's contents record in HarvestMap. |
I suspect that unitTag is the unitName, just that unitTag _also_ accepts symbolic string names for certain cases, like the general "player" string.
My first try would be: GetUnitReaction(GetUnitNameHighlightedByReticle()) My second try to filter it through GetRawUnitName(): GetUnitReaction(GetRawUnitName(GetUnitNameHighlightedByReticle())) If this doesn't work, well, at least we can then negate the assumption. |
Quote:
|
I didn't think you could loot NPCs that were alive.
|
Quote:
Therefore the need to make sure I am detecting a property of an npc. An NPC can be dead while a flower isn't. More or less. ;) |
All times are GMT -6. The time now is 04:17 AM. |
vBulletin © 2024, Jelsoft Enterprises Ltd
© 2014 - 2022 MMOUI