I checked Cyphers "WoW v3.0.2 Information" thread for this descriptor and didn't see it, does it exist or do I have to use LUA to get it?
I checked Cyphers "WoW v3.0.2 Information" thread for this descriptor and didn't see it, does it exist or do I have to use LUA to get it?
Why would you even want to do that? It's kinda pointless. I don't think you can get the target's armor, though.
If it is a Player Target you could in theory do a WowArmory Search and get he/she's armor that way. But still thats alot of work to get a guys armor. Usually you can tell by what Class it is to see Armor.
Aka Warrior = Alot
Warlock = Not so much
The first resistance (there are 7 in the array) is "physical" resistance. Commonly known as armor.
Of course, if you had attempted to do any sort of experimentation yourself you'd have found that out by now.
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
"I cried a little earlier when I had to poop" - Sku
I knew exactly that it didn't give armor for anything other than your own.
But the OP never specified that the "target" wasn't their own unit.
The thread was obviously created without any sort of prior knowledge, if anything my response was more of a help because it *should* have triggered a response to research it for themselves.
Oh well.
"Always code as if the guy who ends up maintaining your code will be a violent psychopath who knows where you live." - Martin Golding
"I cried a little earlier when I had to poop" - Sku
So it seems like there is no way to get the targets armor. I dont believe it exists in the on the client side since its only used for calculating your damage etc etc.. And thats all done on the serverside. I dont know if they by player also means "enemy players".. wouldnt be too hard to find out tho. But more than that is probably not possible.API UnitArmor - WoWWiki - Your guide to the World of Warcraft
unit String - The unitId to get information from. Normally only works for "player" and "pet", but also for "target" if the target is a beast upon which the hunter player has cast Beast Lore.
Last edited by xzidez; 01-08-2009 at 05:07 AM.
The offset of ARMOR is 0x18c
The armor descriptor is called "UNIT_FIELD_RESISTANCES", you can figure that out by having a look at the lua function "UnitArmor" in the disassembly.
To calculate the effective armor( with buffs and enchants ), you have to subtract UNIT_FIELD_RESISTANCEBUFFMODSNEGATIVE and UNIT_FIELD_RESISTANCEBUFFMODSPOSITIVE from the armor value.
( These fields only work under the restrictions of UnitArmor as documented in the wowwiki )