[Question] Attackable menu

User Tag List

Results 1 to 8 of 8
  1. #1
    SinnerG's Avatar Member
    Reputation
    6
    Join Date
    Aug 2006
    Posts
    78
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    [Question] Attackable

    Anyone know how to detect if a target (or if possible: any 'unit' object) is attackable or not?

    Having issues detecting this. Will I need to read the factions dbc for this or is there another solution?
    Last edited by SinnerG; 03-22-2010 at 09:35 AM.

    [Question] Attackable
  2. #2
    evil2's Avatar Active Member
    Reputation
    27
    Join Date
    Feb 2009
    Posts
    172
    Thanks G/R
    31/9
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    i'm sitting on this problem too.
    at the moment i check via race, type & range, but it doesn't work so well.

    anyone found a way or have an idea without using factions dbc?

  3. #3
    -Ryuk-'s Avatar Elite User CoreCoins Purchaser Authenticator enabled
    Reputation
    529
    Join Date
    Nov 2009
    Posts
    1,028
    Thanks G/R
    38/51
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by evil2 View Post
    i'm sitting on this problem too.
    at the moment i check via race, type & range, but it doesn't work so well.

    anyone found a way or have an idea without using factions dbc?
    Attack it, and see if you enter combat?
    |Leacher:11/2009|Donor:02/2010|Established Member:09/2010|Contributor:09/2010|Elite:08/2013|

  4. #4
    Azzie2k8's Avatar Member
    Reputation
    11
    Join Date
    Apr 2009
    Posts
    190
    Thanks G/R
    0/0
    Trade Feedback
    1 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
            /// <summary>
            /// Returns true if the unit is not attackable
            /// </summary>
            public bool IsNotAttackable
            {
                get
                {
                    return Convert.ToBoolean(Flags & (uint)Helper.UnitFlags.NotAttackable);
                }
            }
    just check the flags... if it is !IsNotAttackable I'd say it is attackable, right ?

    edit: just looked it up and found that it wont do much good...you can always use factions

    edit2: you can also just use CGGameUI__UnitReaction. I think it will be easier than factions...maybe wrong though
    Last edited by Azzie2k8; 03-22-2010 at 10:08 AM.

  5. #5
    SinnerG's Avatar Member
    Reputation
    6
    Join Date
    Aug 2006
    Posts
    78
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yeah, the flags are mostly useless ^^

    Guess there is no other (out of process) solution than using the factions.

  6. #6
    Apoc's Avatar Angry Penguin
    Reputation
    1388
    Join Date
    Jan 2008
    Posts
    2,750
    Thanks G/R
    0/13
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Code:
            public bool Attackable
            {
                get
                {
                    return (UnitFlags & 0x10382) == 0;
                }
            }
    It's a mask of a few flags that can cause attackability to turn 'off'. All the flags should be off if the mob is truly attackable.

    Edit: this will also make sure that any neutral NPCs that are attackable at certain rep ranges, are properly marked as not-attackable when neutral. (e.g; Booty Bay, Gadgetzan, Ratchet, etc)

  7. #7
    SinnerG's Avatar Member
    Reputation
    6
    Join Date
    Aug 2006
    Posts
    78
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Apoc View Post
    Code:
            public bool Attackable
            {
                get
                {
                    return (UnitFlags & 0x10382) == 0;
                }
            }
    It's a mask of a few flags that can cause attackability to turn 'off'. All the flags should be off if the mob is truly attackable.

    Edit: this will also make sure that any neutral NPCs that are attackable at certain rep ranges, are properly marked as not-attackable when neutral. (e.g; Booty Bay, Gadgetzan, Ratchet, etc)
    Doesn't work for everything : The NPC @ Northshire Valley are correctly marked non-attackable, the wolves as attackable, but the 'Riding White Stallion' is also marked as attackable

  8. #8
    evil2's Avatar Active Member
    Reputation
    27
    Join Date
    Feb 2009
    Posts
    172
    Thanks G/R
    31/9
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    thanks apoc for the "unitflags" hint, but i got no useful results from it.

    maybe i looked at the wrong flags. what offsets your code refers to?

    UNIT_FIELD_FLAGS, UNIT_FIELD_FLAGS_2,
    UNIT_DYNAMIC_FLAGS, UNIT_NPC_FLAGS

Similar Threads

  1. Question: Rift Combo/Attack point hack
    By jazman84 in forum Rift
    Replies: 2
    Last Post: 04-15-2011, 02:12 AM
  2. [Question]Remove/change attack animation
    By dunken in forum WoW ME Questions and Requests
    Replies: 3
    Last Post: 01-13-2009, 03:18 PM
  3. [Question] Change Attack Animation
    By Svempy in forum WoW ME Questions and Requests
    Replies: 2
    Last Post: 04-18-2008, 06:00 PM
  4. [Question] Attack Move edits
    By Jarth in forum WoW ME Questions and Requests
    Replies: 3
    Last Post: 10-09-2007, 04:34 PM
  5. [Question] Swapped Model wont attack with weapon?
    By Bondoid in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 06-05-2007, 10:49 PM
All times are GMT -5. The time now is 05:44 AM. 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