[C#] Enigma.D3 menu

User Tag List

Page 9 of 63 FirstFirst ... 567891011121359 ... LastLast
Results 121 to 135 of 940
  1. #121
    Sutur's Avatar Private
    Reputation
    1
    Join Date
    May 2014
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Good hint!
    I checked the FindersKeepers website. There is even an (older) source code version to download:
    FindersKeepers - Downloads

    In the Item.cs there is a attempt to read the item type:

    Code:
    private void GetItemData()
            {
                if (GBData == null)
                {
                    LoadItemData();
                }
    
                if (GBData.ContainsKey(GBID))
                {
                    int data = GBData[GBID];
                    if (reader.Read<int>(data) != GBID)
                        LoadItemData();
                    ItemLevel = reader.Read<int>(data + 0x114);
                    ItemName = reader.ReadString<string>(data + 0x4, 100);
                    FindersKeepersObject.ItemTracker.LegendaryID = ItemName;
                    ItemType = (ItemType)reader.Read<int>(data + 0x108);
                }
            }
    with an itemtype enum of
    Code:
    public enum ItemType : uint
        {
            None = 0,
            Axe = 0x1AC7E,
            Axe2H = 0x71ECAD8,
            Sword = 0x8642A4F,
            Sword2H = 0xB21800E9,
            Mace = 0x3D6F16,
            Mace2H = 0x5559370,
            FistWeapon = 0x8326FEC0,
            Daibo = 0x9F68572A, 
            MightyWeapon1H = 0xA7449335,
            MightyWeapon2H = 0xA7449356,
            Staff = 0x8624814,
            CeremonialDagger = 0xF4171CE9,
            Dagger = 0xF059666A,
            Polearm = 0xB84296B0,
            Spear = 0x86026FB,
            Bow = 0x1AFA8,
            Crossbow = 0xB032BFF2,
            HandXbow = 0x2D7C053B,
            Wand = 0x42EC4A,
            Armor = 0x71BAA81,
            Helm = 0x3AC366,
            GenericHelm = 0xC780AFA3,
            SpiritStone = 0x225EEF78, 
            WizardHat = 0xA6A5B76E,
            VoodooMask = 0xEC219C82,
            Gloves = 0xF82490B0,
            Boots = 0x72C2707,
            Shoulders = 0xC7EC1139,
            ChestArmor = 0xC2B86318, 
            GenericChestArmor = 0x315FC915, 
            Cloak = 0x73C97EA,
            Belt = 0x377927, 
            GenericBelt = 0xC77D6564, 
            MightyBelt = 0xE3675008,
            Legs = 0x3CF44B,
            Bracers = 0x88CAA8C2,
            Shield = 0x13D68479,
            Orb = 0x1E743,
            Mojo = 0x3DAB95,
            Quiver = 0x1017B93C,
            Ring = 0x405070,
            Amulet = 0xEA3AD528, 
            TemplarSpecial = 0x7BA9436,
            ScoundrelSpecial = 0xC72A8DB0,
            EnchantressSpecial = 0xE45339DF,
            Gem = 0x1C399,
            ChaosShard = 0xDCB2FE80,
            CraftingPlanLegendary = 0xB1206A94,
            CraftingPlan_Smith = 0xA5B2941D,
            CraftingPlan_Jeweler = 0x1627E366,
            CraftingPlanLegendary_Smith = 0x9C81BBF8,
            Potion = 0xD5BCFB9,
            HealthPotion = 0x8DCB100F,
            PowerPotion = 0xC9C09BA6,
            Dye = 0x1B962,     
            Gold = 0x3A6186,
            Book = 0x37A40B,
            PageOfTraining_Smith = 0xBF7270F2,
            PageOfTraining_Jeweler = 0x9F52497B,
        }
    => so it seems that the ItemType is directly in de Actor fields. In this old version of the source it was on address: 0x108

    Can you find out whats this in the current version?

    [C#] Enigma.D3
  2. #122
    CrEEzz's Avatar Active Member
    Reputation
    66
    Join Date
    Jan 2014
    Posts
    153
    Thanks G/R
    10/40
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by axlrose View Post
    I reintroduced a Scene getter in Storage (thanks to DarthTon's code and offsets):

    public class Storage : MemoryObject
    {
    ...
    public Enigma.D3.Collections.Container<Enigma.D3.Legacy.Scene> x1BC_Scenes { get { return Dereference<Enigma.D3.Collections.Container<Enigma.D3.Legacy.Scene>>(0x1BC); } }
    }

    Even though the Enigma.D3.Legacy.Scene class is a little out of date, a dump and corrected fields worked magic. :-)

    @ Enimga: Can you/we please revive the Scene class interface?

    Thanks...
    I'm attemting to create simple navigation lib. However inability to obtain nav data is stopping me . Can You help me out with getting NavMeshSquares from active Scenes?

  3. #123
    axlrose's Avatar Member
    Reputation
    1
    Join Date
    May 2014
    Posts
    35
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Also look at DarthTon's repo.
    Last edited by axlrose; 06-02-2014 at 10:10 AM.

  4. #124
    axlrose's Avatar Member
    Reputation
    1
    Join Date
    May 2014
    Posts
    35
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by enigma32 View Post
    I've updated SVN, nothing major, except for adding a whole bunch of auto-generated files based on the type descriptors of the SNO structures. Might remove it in the future, or integrate into Enigma.D3 if I feel the definitions are correct.
    Hi Enigma,

    could you share the code and offsets you used to generate these definitions. :-)
    Last edited by axlrose; 06-02-2014 at 10:09 AM.

  5. #125
    Dolphe's Avatar Contributor
    Reputation
    97
    Join Date
    Oct 2012
    Posts
    614
    Thanks G/R
    0/26
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Sutur View Post
    => so it seems that the ItemType is directly in de Actor fields. In this old version of the source it was on address: 0x108
    Can you find out whats this in the current version?
    ItemType = (Attributes.ItemType)reader.Read<int>(data + 0x10C);

  6. #126
    enigma32's Avatar Legendary
    Reputation
    912
    Join Date
    Jan 2013
    Posts
    551
    Thanks G/R
    4/738
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by axlrose View Post
    Hi Enigma,

    could you pretty please share the code and offsets you used to generate these definitions. :-) This would be great...

    Thanks!
    Enjoy!
    Code:
    private void AutoGenerateSnoTypeFiles(){
        var dir = new System.IO.DirectoryInfo("Output\\AutoGenerated-" + Engine.Current.Process.GetFileVersion() + "\\");
        if (dir.Exists)
            return;
        
        dir.Create();
        dir.Refresh();
    
    
        foreach (var address in GetTypeAddresses())
        {
            try
            {
                string code = DescriptorAddressToCode(address);
                var descriptor = Engine.Current.Memory.Read<ValueTypeDescriptor>(address);
                string fileNameRaw = descriptor.x04_Name;
                string filePath = System.IO.Path.Combine(dir.FullName, fileNameRaw + ".cs");
                int uniqueId = 0;
                while (System.IO.File.Exists(filePath))
                {
                    filePath = System.IO.Path.Combine(dir.FullName, fileNameRaw + "_" + uniqueId++ + ".cs");
                }
                System.IO.File.WriteAllText(filePath, code);
            }
            catch
            {
                Console.WriteLine("Problem generating type file: " + Engine.Current.Memory.Read<ValueTypeDescriptor>(address).x04_Name);
            }
        }
    }
    
    
    private HashSet<int> GetTypeAddresses()
    {
        var set = new HashSet<int>();
        foreach (var snoGroup in Engine.Current.SnoGroups.Where(a => a != null))
        {
            set.Add(snoGroup.x74_Ptr_DataType.Address);
            AddNestedTypes(ref set, snoGroup.x74_Ptr_DataType);
        }
        return set;
    }
    
    
    private void AddNestedTypes(ref HashSet<int> set, ValueTypeDescriptor descriptor)
    {
        foreach (var field in descriptor.x0C_FieldDescriptors ?? new FieldDescriptor[0])
        {
            if (set.Add(field.x04_Type.Address))
                AddNestedTypes(ref set, field.x04_Type);
            if (set.Add(field.x1C_BaseType.Address))
                AddNestedTypes(ref set, field.x1C_BaseType);
        }
    }
    
    
    private string DescriptorAddressToCode(int address)
    {
        var sb = new StringBuilder();
        var descriptor = Engine.Current.Memory.Read<ValueTypeDescriptor>(address);
        if (descriptor.x10_FieldCount == 0)
        {
            sb.Append("Basic type");
        }
        else
        {
            var length = descriptor.x0C_FieldDescriptors.Max(a => a.x08_Offset);
            var hexFormat = "X" + length.ToString("X2").Length;
            sb.AppendLine("public class " + descriptor.x04_Name + " : MemoryObject");
            sb.AppendLine("{");
            sb.AppendLine("\t// " + Engine.Current.Process.GetFileVersion().ToString());
            sb.AppendLine("\tpublic const int SizeOf = 0x" + length.ToString(hexFormat) + "; // " + length);
            sb.AppendLine();
            sb.AppendLine("\tpublic " + descriptor.x04_Name + "(ProcessMemory memory, int address)");
            sb.AppendLine("\t\t: base(memory, address) { }");
            sb.AppendLine();
            foreach (var field in descriptor.x0C_FieldDescriptors.Take(descriptor.x10_FieldCount - 1).OrderBy(a => a.x08_Offset))
            {
                string offset = field.x08_Offset.ToString(hexFormat);
                string rawType = field.x04_Type.x04_Name;
                string rawBaseType = field.x1C_BaseType.x04_Name;
                string type = TranslateType(rawType);
                string baseType = TranslateType(rawBaseType);
                string fieldName = "";
                string comment = "";
    
    
                if (type == "DT_CHARARRAY")
                {
                    sb.Append("\tpublic string x" + offset + fieldName);
                    sb.Append(" { get { return Field(0x" + offset + ", " + field.x24_ArrayLength + "); } }");
                }
                else if (type == "DT_VARIABLEARRAY")
                {
                    string countField = "x" + offset + "_Count";
                    sb.AppendLine("\tpublic int " + countField + " { get { return Field<int>(0x" + offset + "); } }");
                    offset = (field.x08_Offset + 4).ToString(hexFormat);
                    fieldName += "_PtrArray";
                    fieldName += GetFieldNameFromType(rawBaseType, field);
                    sb.Append("\tpublic " + baseType + "[] x" + offset + fieldName);
                    sb.Append(" { get { return Dereference<" + baseType + ">(0x" + offset + ", " + countField + "); } }");
                }
                else if (type == "DT_FIXEDARRAY")
                {
                    fieldName += "_Array";
                    fieldName += GetFieldNameFromType(rawBaseType, field);
                    sb.Append("\tpublic " + baseType + "[] x" + offset + fieldName);
                    sb.Append(" { get { return Field<" + baseType + ">(0x" + offset + ", " + field.x24_ArrayLength + "); } }");
                }
                else if (type == "DT_FLAG")
                {
                    fieldName += GetFieldNameFromType(rawType, field);
                    sb.Append("\tpublic " + type + " x" + offset + fieldName + "_" + field.x3C_BitOffset.ToString("00"));
                    sb.Append(" { get { return (Field<int>(0x" + offset + ") >> " + field.x3C_BitOffset + ") & 1; } }");
                }
                else
                {
                    fieldName += GetFieldNameFromType(rawType, field);
                    sb.Append("\tpublic " + type + " x" + offset + fieldName);
                    sb.Append(" { get { return Field<" + type + ">(0x" + offset + "); } }");
                }
    
    
                // Add enum values as comment.
                if (rawType == "DT_ENUM" || rawBaseType == "DT_ENUM")
                    comment = string.Join(", ", SymbolHelper.GetAllSymbols(field.x38_SymbolTable).Select(a => a.x00_Id + ": " + a.x04_Name));
    
    
                // Print comment if defined.
                if (!string.IsNullOrEmpty(comment))
                    sb.Append(" // " + comment);
    
    
                // End line.
                sb.AppendLine();
            }
            sb.AppendLine("}");
        }
        return sb.ToString();
    }
    
    
    private string TranslateType(string type)
    {
        switch (type)
        {
            case "DT_INT":
            case "DT_SNO":
            case "DT_ENUM": return "int";
            case "DT_FLOAT": return "float";
            case "DT_INT64": return "long";
            case "DT_BYTE": return "byte";
            case "DT_WORD": return "short";
            default: return type;
        }
    }
    
    
    private static string GetFieldNameFromType(string type, FieldDescriptor field)
    {
        string fieldName = "";
        if (type == "DT_SNO")
            fieldName += "_" + ((SnoGroupId)field.x30_GroupId).ToString() + "SnoId";
        if (type == "DT_GBID")
            fieldName += "_" + ((GameBalanceType)field.x30_GroupId).ToString() + "GameBalanceId";
        if (type == "DT_ENUM")
            fieldName += "_Enum";
        return fieldName;
    }

  7. #127
    Sutur's Avatar Private
    Reputation
    1
    Join Date
    May 2014
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Dolphe View Post
    ItemType = (Attributes.ItemType)reader.Read<int>(data + 0x10C);
    Ok thank you. So in our source would it be the x10C_SceneId ?

    Edit: Nope. this does not work. SceneId has the same value for all items on the ground from one chests.
    Last edited by Sutur; 05-26-2014 at 02:16 PM.

  8. #128
    axlrose's Avatar Member
    Reputation
    1
    Join Date
    May 2014
    Posts
    35
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by enigma32 View Post
    Enjoy!
    Thanks a million!! Something seems to be incorrect about the repeated entries that are generated and look like this:

    public int x00 { get { return Field<int>(0x00); } }
    public int x08_Count { get { return Field<int>(0x08); } }
    public XYZ[] x0C_PtrArray { get { return Dereference<XYZ>(0x0C, x08_Count); } }
    public SerializeData x10 { get { return Field<SerializeData>(0x10); } }
    Last edited by axlrose; 06-02-2014 at 10:09 AM.

  9. #129
    Dolphe's Avatar Contributor
    Reputation
    97
    Join Date
    Oct 2012
    Posts
    614
    Thanks G/R
    0/26
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Sutur View Post
    Ok thank you. So in our source would it be the x10C_SceneId ?

    Edit: Nope. this does not work. SceneId has the same value for all items on the ground from one chests.
    You need to read the data from the SNO first ( data = SnoGroup[GamebalanceID])

    private int GamebalanceID { get { return reader.Read<int>(ACDAddress + 0xB4); } }
    Last edited by Dolphe; 05-26-2014 at 02:26 PM.

  10. #130
    Sutur's Avatar Private
    Reputation
    1
    Join Date
    May 2014
    Posts
    9
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by Dolphe View Post
    You need to read the data from the SNO first ( data = SnoGroup[GamebalanceID])

    private int GamebalanceID { get { return reader.Read<int>(ACDAddress + 0xB4); } }
    Hi Dolphe,

    I guess I am stuck. What I have done so far in the Enigma.D3 framework to get the snogroup:

    Code:
    var group = Engine.Current.SnoGroups.First(g => g.x3C_SnoGroupId == SnoGroupId.GameBalance);
    Now I am trying to find out where the data loaded in the SNOReader (from FindersKeeper) is located in the SnoGroup object from Enigma.D3

    Code:
       public SNOReader(MemoryReader reader, int address)
            {
                data = new Dictionary<int, int>();
    
                int ptr = reader.Read<int>(address, defptr);
                int count = reader.Read<int>(ptr + defcount);
                int curOff = reader.Read<int>(ptr + deflink) + 0xC;
    
                for (int i = 0; i <= 4096; i++)
                {
                    int curSNOoff = reader.Read<int>(curOff);
                    int curSNOid = reader.Read<int>(curSNOoff);
    
                    if (curSNOoff == 0 && curSNOid == 0)
                        break;
    
                    try
                    {
                        data.Add(curSNOid, curSNOoff);
                    }
                    catch (Exception)
                    {
                    }
                    curOff += 0x10;
                }
            }

    Edit: As far as I can see all the SNOs are already exported into auto generated cs files in the AutoGenerated folder. There is at least a GameType.cs with an Item.cs wich contains

    public DT_GBID x10C_ItemTypesGameBalanceId { get { return Field<DT_GBID>(0x10C); } }

    Is this the right path to follow?
    Last edited by Sutur; 05-27-2014 at 06:23 AM.

  11. #131
    enigma32's Avatar Legendary
    Reputation
    912
    Join Date
    Jan 2013
    Posts
    551
    Thanks G/R
    4/738
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sutur, I updated the repo. Check SnoGroup and SnoDefinition, should probably help you understand the FK code.

  12. #132
    axlrose's Avatar Member
    Reputation
    1
    Join Date
    May 2014
    Posts
    35
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Originally Posted by enigma32 View Post
    Sutur, I updated the repo. Check SnoGroup and SnoDefinition, should probably help you understand the FK code.
    Hi Enigma,

    I think the current SnoDefinition looks like this:

    Code:
    		public int x00_Id { get { return Field<int>(0x00); } }
    		public int x04_Unknown { get { return Field<int>(0x04); } }
    		public Enums.SnoGroupId x08_SnoGroupId { get { return (Enums.SnoGroupId)Field<int>(0x08); } }
    		public int x0C_ItemSizeInBytes { get { return Field<int>(0x0C); } }
    		public T x10_SnoItem { get { return Dereference<T>(0x10); } }
    Last edited by axlrose; 06-02-2014 at 10:07 AM.

  13. #133
    enigma32's Avatar Legendary
    Reputation
    912
    Join Date
    Jan 2013
    Posts
    551
    Thanks G/R
    4/738
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ah, maybe I should test things

  14. #134
    NoCopyPaste's Avatar Member
    Reputation
    1
    Join Date
    Apr 2014
    Posts
    19
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Hi axlrose,
    First of all, thanks for sharing your work, it helps a lot

    My Question:
    When you say
    Iterate through the "Global" SNO instance cache
    what do you mean by this? When I look into Engine, I can see 2 Arrays of SNOGroups and one of SNOGroupInitializer, which all lead me to SNOGroups, but which of them is the Global SNO instance cache, you mentioned? the SNOGroup with the Globals ID?

    Thanks in advance

    NoCopyPaste

  15. #135
    axlrose's Avatar Member
    Reputation
    1
    Join Date
    May 2014
    Posts
    35
    Thanks G/R
    0/0
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Sure, my pleasure! Glad I can help :-)

    I am firm in the code but not that firm in the terminology used :-)
    Last edited by axlrose; 06-02-2014 at 10:06 AM.

Page 9 of 63 FirstFirst ... 567891011121359 ... LastLast

Similar Threads

  1. [Hack] Enigma TriggerBot - AutoIT
    By Zolyrica in forum Overwatch Exploits|Hacks
    Replies: 9
    Last Post: 09-12-2016, 02:37 PM
  2. [Release] [C#] 1.0.8.16603 Enigma.D3
    By enigma32 in forum Diablo 3 Memory Editing
    Replies: 33
    Last Post: 05-16-2015, 01:40 PM
  3. Enigma's Smartcast Manager
    By da_bizkit in forum League of Legends
    Replies: 3
    Last Post: 10-22-2012, 02:11 PM
  4. request Blue suede boots -> enigma boots
    By Geico in forum WoW ME Questions and Requests
    Replies: 0
    Last Post: 12-27-2007, 05:40 AM
All times are GMT -5. The time now is 10:23 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