EntiyList never ends, like it always had menu

User Tag List

Results 1 to 7 of 7
  1. #1
    natt_'s Avatar Contributor
    Reputation
    145
    Join Date
    Dec 2007
    Posts
    391
    Thanks G/R
    13/0
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    EntiyList never ends, like it always had

    Since last patch my entityList never returns 0, which means the first couple loops are correct, but then it gets "stuck" on same the adress and i had to change my code so it quits when EntityType is out of bounds, which looks and feels ugly..

    Here is how ive been doing it all these years, for both x86 and x64:

    Code:
    /* Get first entity */
    CurEntity = read(EntityMgrPTR + FirstEntityOffset);
    
    /* Loop through Entity untill it returns 0*/
    while (curEntity)
    {
     CurEntity = read(CurEntity + NextEntityOffset);
    }
    
    return list of objects;
    And here is what i get now instead of 0

    Code:
    CurEntity: 0x0000000029B1E9F0, EntityType: 3 <-- Correct
    CurEntity: 0x0000000041C3344C, EntityType: 5 <-- Correct
    CurEntity: 0x0000000041C35184, EntityType: 5 <-- Correct
    CurEntity: 0x0000000041C345D4, EntityType: 5 <-- Correct
    CurEntity: 0x000000002EF40054, EntityType: 4 <-- Correct
    CurEntity: 0x0000000041C33FFC, EntityType: 3 <-- Correct
    CurEntity: 0x00000000002565A9, EntityType: 33 <--- Incorrect
    CurEntity: 0x00000000002565A9, EntityType: 33 <--- Incorrect
    CurEntity: 0x00000000002565A9, EntityType: 33 <--- Incorrect
    CurEntity: 0x00000000002565A9, EntityType: 33 <--- Incorrect
    CurEntity: 0x00000000002565A9, EntityType: 33 <--- Incorrect
    CurEntity: 0x00000000002565A9, EntityType: 33 <--- Incorrect
    What could i do wrong?

    /TT

    EntiyList never ends, like it always had
  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)
    Break when entity pointer is not aligned to 4 bytes -- if (CurEntity % 4 != 0) break;

  3. #3
    natt_'s Avatar Contributor
    Reputation
    145
    Join Date
    Dec 2007
    Posts
    391
    Thanks G/R
    13/0
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I tried that but the pointers are now all the same length ?!, and after a wow restart from 64 to 32 bit it works with my original code...

    Code:
    0x32F01030
    0x2CA148AC
    0x10A04B4D
    0x0A115984
    0x00000000
    and then i switched back to 64 bit, and guess what

    Code:
    0x00000000410AD440
    0x0000000041082280
    0x0000000041092528
    0x00000000262850E9
    0x0000000000000000
    What could cause a thing like this? i cannot seem to re-produce it anymore

    /TT

  4. #4
    natt_'s Avatar Contributor
    Reputation
    145
    Join Date
    Dec 2007
    Posts
    391
    Thanks G/R
    13/0
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Well a new day with more code to write and the same "bug i assume" is happening, i cannot for my life figure out what it is, now i have a better fallback than before though. -- if CurEntity == PrevEntity break; but this still does not float my boat and rub me in the right direction

  5. #5
    shauren's Avatar Established Member
    Reputation
    65
    Join Date
    Feb 2009
    Posts
    60
    Thanks G/R
    2/28
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The client does something like this - you should not skip the other condition because the first one seems to be enough
    Code:
    while (obj && !(obj & 1))
    {
      //stuff
    }

  6. Thanks natt_ (1 members gave Thanks to shauren for this useful post)
  7. #6
    lolp1's Avatar Site Donator CoreCoins Purchaser
    Reputation
    190
    Join Date
    Feb 2013
    Posts
    210
    Thanks G/R
    43/77
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Tested old external code and works still. Use a hash set and add each entity to it / continue if the hash set contains the entity if you want to do mega overkill sanity check.


    Code:
        /// <summary>
        ///     A static class to handle creating a list of entites containing the <see cref="WowObjectData" /> structure.
        /// </summary>
        public static class EntityList
        {
            #region Properties
            /// <summary>
            ///     Collects a dictonary of current entitie with the guid as the key.
            /// </summary>
            public static Dictionary<WowGuid, WowObject> EntitiesAsDictionary
            {
                get
                {
                    var woWObjects = new Dictionary<WowGuid, WowObject>();
                    CollectEntities(GetFirstObject(), woWObjects);
                    return woWObjects;
                }
            }
    
            /// <summary>
            ///     A collection of current entities.
            /// </summary>
            public static IEnumerable<WowObject> Entities => EntitiesAsDictionary.Values.ToList();
            #endregion
    
            #region Methods
            /// <summary>
            ///     Gets the pointer to the first object in the list.
            /// </summary>
            /// <returns></returns>
            private static IntPtr GetFirstObject()
            {
                var mgr = Wow64.CurrentManager;
                return mgr.VisibleObjects.m_fulllist.baseClass.m_terminator.m_next;
            }
    
            /// <summary>
            ///     Gets the pointer to the next object in the list.
            /// </summary>
            /// <param name="current">The current objects pointer.</param>
            /// <returns>SetObjectManager pointer to the next object.</returns>
            private static IntPtr GetNextObjectFrom(IntPtr current)
            {
                var mgr = Wow64.CurrentManager;
                return Wow.Memory.Read<IntPtr>(current + mgr.VisibleObjects.m_fulllist.baseClass.m_linkoffset + IntPtr.Size);
            }
    
            /// <summary>
            ///     Generates the dictonary of entities.
            /// </summary>
            /// <param name="firstObject">The address to the first object of the entity list.</param>
            /// <param name="wowObjectDictionary">The dictonary to fill results with.</param>
            [SuppressMessage("ReSharper", "SwitchStatementMissingSomeCases")]
            private static void CollectEntities(IntPtr firstObject, IDictionary<WowGuid, WowObject> wowObjectDictionary)
            {
                var current = firstObject;
                while (((current.ToInt64() & 1) == 0) && current != IntPtr.Zero)
                {
                    var type = (WoWObjectType) Wow.Memory.Read<int>(current + WowOffsets.EntityList.Type);
                    switch (type)
                    {
                        case WoWObjectType.Item:
                            AddTo(wowObjectDictionary, new WowItem(current));
                            break;
    
                        case WoWObjectType.Container:
                            AddTo(wowObjectDictionary, new WowContainer(current));
                            break;
    
                        case WoWObjectType.Unit:
                            AddTo(wowObjectDictionary, new WowUnit(current));
                            break;
    
                        case WoWObjectType.Player:
                            AddTo(wowObjectDictionary, new WowPlayer(current));
                            break;
    
                        case WoWObjectType.GameObject:
                            AddTo(wowObjectDictionary, new WowGameObject(current));
                            break;
    
                        case WoWObjectType.Corpse:
                            AddTo(wowObjectDictionary, new WowCorpse(current));
                            break;
    
                        default:
                            AddTo(wowObjectDictionary, new WowObject(current));
                            break;
                    }
                    current = GetNextObjectFrom(current);
                }
            }
    
            private static void AddTo(IDictionary<WowGuid, WowObject> wowObjects, WowObject wowObject)
            {
                wowObjects.Add(wowObject.Guid, wowObject);
            }
            #endregion
        }
    CurrentManager struct is on TOMS_RUS github ObjMgr test page.

  8. Thanks natt_, LordTerror (2 members gave Thanks to lolp1 for this useful post)
  9. #7
    natt_'s Avatar Contributor
    Reputation
    145
    Join Date
    Dec 2007
    Posts
    391
    Thanks G/R
    13/0
    Trade Feedback
    3 (100%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    The bitWiseAnd operation together with my old method made it work, thank you for making it clear to me

    /TT

Similar Threads

  1. The never ending story
    By the hunter of the hunted in forum Community Chat
    Replies: 1
    Last Post: 08-04-2008, 08:35 AM
  2. Get xp fast at lvl 40 ish, never ending supply
    By gibberish in forum World of Warcraft Exploits
    Replies: 19
    Last Post: 03-06-2008, 05:28 PM
  3. never ending nature swiftness
    By km3r in forum World of Warcraft Exploits
    Replies: 20
    Last Post: 05-18-2007, 11:10 AM
  4. Never ending beer
    By Datonking in forum World of Warcraft Exploits
    Replies: 6
    Last Post: 09-15-2006, 05:27 PM
All times are GMT -5. The time now is 06:21 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