Who attacked me? menu

User Tag List

Results 1 to 2 of 2
  1. #1
    zdohdds's Avatar Active Member
    Reputation
    16
    Join Date
    Feb 2013
    Posts
    46
    Thanks G/R
    19/9
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Who attacked me?

    Hello everyone! For a long time can not create logic who attacked me.
    For the first time I did it like that:

    Code:
            public List<WoWUnit> AttakedMe
            {
                get
                {
                    List<WoWUnit> ret = new List<WoWUnit>();
                    IntPtr pointer = WoWManager.EntityFirst;
                    while ((pointer != IntPtr.Zero) && ((pointer.ToInt64() & 1) == 0))
                    {
                        WoWUnit unit = new WoWUnit(pointer);
                        if (unit.Reaction == WoWEnums.UnitReaction.Hostile || unit.Reaction == WoWEnums.UnitReaction.Neutral)
                            if ((unit.Target == this.Guid) && (unit.EntityType != (uint)WoWEnums.WoWObjectType.Player)) ret.Add(unit);
                        pointer = unit.NextEntity;
                    }
                    return ret;
                }
            }
    I know from experience that regardless of the reaction unit can attack you.

    PS: this temporary approach some of the players to select in target you then bot going to kill him

    Who attacked me?
  2. #2
    squiggy's Avatar Active Member
    Reputation
    66
    Join Date
    Aug 2007
    Posts
    45
    Thanks G/R
    40/23
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    This is how i do it, its some temporary code a threw together and not a 100% but it has worked well enough for me so far.
    Im checking: Am i or my pets in combat?, is the mob in combat? is it targeting me or my pets? My combat loop keeps track of the mobs after that so it wont loose track of them if they start fleeing or gets cc'd etc.

    Code:
    var myMinions = objMgr.GetWowObjectsOfType<WowUnit>().Where(o => o.CreatedBy == me.Guid && o.InCombat).ToList();                
     
    var mobs =  objMgr.GetWowObjectsOfType<WowUnit>().Where(o => o.InCombat
                            && !o.HasDynamicFlag(WowUnit.UnitDynamicFlags.TaggedByOther)
                            && (o.CurrentTarget == _me.Guid || myMinions.Exists(m => o.CurrentTarget == m.Guid))).ToList();
    Last edited by squiggy; 07-03-2017 at 03:45 PM.

  3. Thanks zdohdds (1 members gave Thanks to squiggy for this useful post)

Similar Threads

  1. Who is attacking me?
    By Viano in forum WoW Memory Editing
    Replies: 18
    Last Post: 09-28-2009, 10:29 AM
  2. Get who unit is attacking...
    By jbrauman in forum WoW Memory Editing
    Replies: 19
    Last Post: 02-02-2009, 05:03 AM
  3. How can you make guards that attack people who are PvP-ing ?
    By Wheeze201 in forum World of Warcraft Emulator Servers
    Replies: 7
    Last Post: 12-31-2007, 07:24 AM
  4. Unlimited Gun Attack Range
    By Matt in forum World of Warcraft Exploits
    Replies: 3
    Last Post: 05-11-2006, 04:09 AM
  5. Warriors get a huge attack power boost
    By Matt in forum World of Warcraft Exploits
    Replies: 0
    Last Post: 04-02-2006, 10:02 PM
All times are GMT -5. The time now is 06:42 PM. Powered by vBulletin® Version 4.2.3
Copyright © 2024 vBulletin Solutions, Inc. All rights reserved. User Alert System provided by Advanced User Tagging (Pro) - vBulletin Mods & Addons Copyright © 2024 DragonByte Technologies Ltd.
Digital Point modules: Sphinx-based search