Descriptor for Attackable Unit or to get if hostile or not (7.1.5) menu

User Tag List

Results 1 to 6 of 6
  1. #1
    IFireEagle's Avatar Member
    Reputation
    9
    Join Date
    Dec 2013
    Posts
    20
    Thanks G/R
    3/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Descriptor for Attackable Unit or to get if hostile or not (7.1.5)

    Hi, I'm working on an addon and I need to determine if a unit is attackable (or just get if hostile or not).
    I tried to find the descriptor but I didn't find it.

    I use EWT and it shows me these descriptors.

    Code:
    CGUnitData__AnimTier = 0x1D0
    CGUnitData__AttackPower = 0x2A0
    CGUnitData__AttackPowerModNeg = 0x2A8
    CGUnitData__AttackPowerModPos = 0x2A4
    CGUnitData__AttackPowerMultiplier = 0x2AC
    CGUnitData__AttackRoundBaseTime = 0x1A0
    CGUnitData__AuraState = 0x19C
    CGUnitData__BaseHealth = 0x298
    CGUnitData__BaseMana = 0x294
    CGUnitData__BattlePetCompanionGUID = 0xB0
    CGUnitData__BattlePetCompanionNameTimestamp = 0x31C
    CGUnitData__BattlePetDBID = 0xC0
    CGUnitData__BoundingRadius = 0x1AC
    CGUnitData__ChannelObject = 0xC8
    CGUnitData__ChannelSpell = 0xD8
    CGUnitData__ChannelSpellXSpellVisual = 0xDC
    CGUnitData__Charm = 0x30
    CGUnitData__CharmedBy = 0x60
    CGUnitData__CombatReach = 0x1B0
    CGUnitData__CreatedBy = 0x80
    CGUnitData__CreatedBySpell = 0x1FC
    CGUnitData__Critter = 0x50
    CGUnitData__DemonCreator = 0x90
    CGUnitData__DisplayID = 0x1B4
    CGUnitData__DisplayPower = 0xE8
    CGUnitData__EffectiveLevel = 0x164
    CGUnitData__EmoteState = 0x208
    CGUnitData__FactionTemplate = 0x174
    CGUnitData__Flags = 0x190
    CGUnitData__Flags2 = 0x194
    CGUnitData__Flags3 = 0x198
    CGUnitData__Health = 0xF0
    CGUnitData__HoverHeight = 0x308
    CGUnitData__InteractSpellID = 0x320
    CGUnitData__Level = 0x160
    CGUnitData__LookAtControllerID = 0x34C
    CGUnitData__LookAtControllerTarget = 0x350
    CGUnitData__LooksLikeCreatureID = 0x348
    CGUnitData__LooksLikeMountID = 0x344
    CGUnitData__MaxDamage = 0x1C4
    CGUnitData__MaxHealth = 0x110
    CGUnitData__MaxHealthModifier = 0x304
    CGUnitData__MaxItemLevel = 0x314
    CGUnitData__MaxOffHandDamage = 0x1CC
    CGUnitData__MaxPower = 0x118
    CGUnitData__MaxRangedDamage = 0x2C8
    CGUnitData__MinDamage = 0x1C0
    CGUnitData__MinItemLevel = 0x310
    CGUnitData__MinItemLevelCutoff = 0x30C
    CGUnitData__MinOffHandDamage = 0x1C8
    CGUnitData__MinRangedDamage = 0x2C4
    CGUnitData__ModBonusArmor = 0x290
    CGUnitData__ModCastingSpeed = 0x1E4
    CGUnitData__ModHaste = 0x1EC
    CGUnitData__ModHasteRegen = 0x1F4
    CGUnitData__ModRangedHaste = 0x1F0
    CGUnitData__ModSpellHaste = 0x1E8
    CGUnitData__ModTimeRate = 0x1F8
    CGUnitData__MountDisplayID = 0x1BC
    CGUnitData__NativeDisplayID = 0x1B8
    CGUnitData__NpcFlags = 0x200
    CGUnitData__OverrideDisplayPowerID = 0xEC
    CGUnitData__PetExperience = 0x1DC
    CGUnitData__PetNameTimestamp = 0x1D8
    CGUnitData__PetNextLevelExperience = 0x1E0
    CGUnitData__PetNumber = 0x1D4
    CGUnitData__Power = 0xF8
    CGUnitData__PowerCostModifier = 0x2CC
    CGUnitData__PowerCostMultiplier = 0x2E8
    CGUnitData__PowerRegenFlatModifier = 0x130
    CGUnitData__PowerRegenInterruptedFlatModifier = 0x148
    CGUnitData__RangedAttackPower = 0x2B0
    CGUnitData__RangedAttackPowerModNeg = 0x2B8
    CGUnitData__RangedAttackPowerModPos = 0x2B4
    CGUnitData__RangedAttackPowerMultiplier = 0x2BC
    CGUnitData__RangedAttackRoundBaseTime = 0x1A8
    CGUnitData__ResistanceBuffModsNegative = 0x274
    CGUnitData__ResistanceBuffModsPositive = 0x258
    CGUnitData__Resistances = 0x23C
    CGUnitData__ScaleDuration = 0x340
    CGUnitData__ScalingLevelDelta = 0x170
    CGUnitData__ScalingLevelMax = 0x16C
    CGUnitData__ScalingLevelMin = 0x168
    CGUnitData__SetAttackSpeedAura = 0x2C0
    CGUnitData__Sex = 0xE4
    CGUnitData__ShapeshiftForm = 0x29C
    CGUnitData__StatNegBuff = 0x22C
    CGUnitData__StatPosBuff = 0x21C
    CGUnitData__StateAnimID = 0x328
    CGUnitData__StateAnimKitID = 0x32C
    CGUnitData__StateSpellVisualID = 0x324
    CGUnitData__StateWorldEffectID = 0x330
    CGUnitData__Stats = 0x20C
    CGUnitData__Summon = 0x40
    CGUnitData__SummonedBy = 0x70
    CGUnitData__SummonedByHomeRealm = 0xE0
    CGUnitData__Target = 0xA0
    CGUnitData__VirtualItems = 0x178
    CGUnitData__WildBattlePetLevel = 0x318
    Thanks.

    Descriptor for Attackable Unit or to get if hostile or not (7.1.5)
  2. #2
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    It would not make sense for there to be a field for whether a unit is friendly or not since it would need to change depending on the unit you are comparing it to. To calculate whether two units are hostile or friendly, it compares a lot of factors of both units (faction ID, etc.).

    Check Script_UnitIsFriend. It calls CGUnit_C::IsFriendly which in turn calls CGUnit_C::UnitReaction. Both of those will be useful to you.

  3. #3
    IFireEagle's Avatar Member
    Reputation
    9
    Join Date
    Dec 2013
    Posts
    20
    Thanks G/R
    3/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Thanks for help.
    But, since I'm quite noob about memory things, how can I call these functions with an object address as argument with EWT Advanced LUA API (http://ewt.dynu.net/EWT/ewt.lua)?

  4. #4
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    If you have access to the in-game Lua API (which you do), then you should just call UnitIsFriend, UnitIsEnemy, or UnitReaction.

  5. #5
    IFireEagle's Avatar Member
    Reputation
    9
    Join Date
    Dec 2013
    Posts
    20
    Thanks G/R
    3/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The problem is UnitIsFriend, UnitIsEnemy, or UnitReaction can't take a unit name as argument and it is what I want. It's why I would find if a unit is attackable with the unit address/pointer.

  6. #6
    Jadd's Avatar 🐸 Premium Seller
    Reputation
    1515
    Join Date
    May 2008
    Posts
    2,433
    Thanks G/R
    81/336
    Trade Feedback
    1 (100%)
    Mentioned
    2 Post(s)
    Tagged
    0 Thread(s)
    Yes, you can, but not directly using WoW Lua API. Maybe EWT allows it, but this is not the EWT forum. You're more likely to get a useful response here.

Similar Threads

  1. [Buying] looking for a good account to get started
    By gdouc8 in forum WoW-EU Account Buy Sell Trade
    Replies: 0
    Last Post: 07-26-2015, 05:12 PM
  2. [Client] Been away from the private server game for a while. Looking to get back into it.
    By D40XxPhotoman in forum World of Warcraft Emulator Servers
    Replies: 1
    Last Post: 05-14-2014, 04:06 PM
  3. Replies: 14
    Last Post: 12-14-2013, 12:46 AM
  4. WTT FOR SERVER XFER !!! Trying to get one tonight
    By Dr. Doom in forum Members Only Accounts And CD Keys Buy Sell
    Replies: 4
    Last Post: 08-16-2009, 06:03 PM
  5. [Guide] Great Way For Low Level Miners to get Gold!
    By strobel in forum World of Warcraft Guides
    Replies: 7
    Last Post: 04-07-2008, 05:27 PM
All times are GMT -5. The time now is 05:49 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2025 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Google Authenticator verification provided by Two-Factor Authentication (Free) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search