Reading PLAYER_FIELD_VISIBLE_ITEMS Enchant and Name Snippets C# menu

Shout-Out

User Tag List

Results 1 to 3 of 3
  1. #1
    CrimeTime's Avatar Active Member
    Reputation
    20
    Join Date
    Dec 2007
    Posts
    83
    Thanks G/R
    16/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)

    Reading PLAYER_FIELD_VISIBLE_ITEMS Enchant and Name Snippets C#

    Hello,
    today I tryed to get the enchantment id and name from my fishing rod and couldn't found any helpful things here around the forums,
    so I started to get the needed informations.

    Here are my findings:

    to get the visible item enchant offsets:
    Code:
                            int Id = 0;
                            for (uint Offset = (uint)Descriptors.ePlayerFields.PLAYER_FIELD_VISIBLE_ITEMS; Offset < (uint)Descriptors.ePlayerFields.PLAYER_FIELD_PLAYER_TITLE; Offset += 0x2)
                            {
                                Id++;
                               var Offset2 = Offset - (0x93 + 0x7) + 0x1;
                               Log.Output("PLAYER_VISIBLE_ITEM_" + Id + " = UNIT_END + 0x" + Offset2.ToString("X"));
                            }
    reading the enchantmentid:
    Code:
                var PlayerBaseandDescriptors = Me.ObjectPointer + 0x8;
                var MainHandEnchant = Memory.Read<ushort>(Memory.Read<uint>(PlayerBaseandDescriptors) + (uint)Descriptors.ePlayerFields.PLAYER_VISIBLE_ITEM_16 * 4);
                if (MainHandEnchant != 0)
                {
                    Console.WriteLine(EnchantmentName(MainHandEnchant));
                }
    reading enchant name from enchantid:
    Code:
            uint SpellItemEnchantment = 0xBFD960;
    
           public struct SpellItemEnchantmentRec
            {
                public uint Id;
                public uint unk1;
                public uint unk2;
                public uint unk3;
                public uint unk4;
                public uint unk5;
                public uint unk6;
                public uint unk7;
                public uint unk8;
                public uint unk9;
                public uint unk10;
                IntPtr _Name;
                public uint unk11;
                public uint unk12;
                public uint unk13;
                public uint unk14;
                public uint unk15;
                public uint unk16;
                public uint unk17;
                public uint unk18;
                public uint unk19;
                public uint unk20;
                public uint unk21;
                public uint unk22;
                public uint unk23;
    
                public string Name { get { return Memory.ReadCString((uint)_Name,255); } }
            };
    
            private string EnchantmentName(uint id)
            {
                DBC<SpellItemEnchantmentRec> spell2 = new DBC<SpellItemEnchantmentRec>((IntPtr)Memory.BaseAddress + Pointers.DBC.SpellItemEnchantment);
    
                foreach (SpellItemEnchantmentRec spells in spell2)
                    {
                        if (id == spells.Id)
                        {
                            return spells.Name;
                        }
                    }
                    return "";
            }
    Credits to:
    Bananenbrot for helping me out with the bytes of PLAYER_FIELD_VISIBLE_ITEMS
    TOM_RUS for the out of process DBC reading source.
    -Ryuk- & Kryso: Thread link
    Robske: Post link
    Last edited by CrimeTime; 01-12-2013 at 08:59 AM.

    Reading PLAYER_FIELD_VISIBLE_ITEMS Enchant and Name Snippets C#
  2. #2
    ~Unknown~'s Avatar Contributor
    Reputation
    193
    Join Date
    Jan 2009
    Posts
    211
    Thanks G/R
    0/5
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Yea, your solution is a bit more complete. When I was doing this for my fishbot I didn't really see a reason to know what the actually enchant was, so I just used GetWeaponEnchantInfo in order to see if it had a lure or not. Not completely certain if rods can have other weapon enchantments besides lures.

  3. #3
    CrimeTime's Avatar Active Member
    Reputation
    20
    Join Date
    Dec 2007
    Posts
    83
    Thanks G/R
    16/4
    Trade Feedback
    0 (0%)
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    I have considered to take this function what you did post, before I did the longer version of it, but I'm not a big fan of using lua functions,
    because everytime when I want to use it, the application has to write into the memory over the hook.

    So I have made me a little bit more work with it and can now read it a lot easier with no writings into the memory.
    Sure needs this more time to upgrade it every patch but I prefer offsets.

Similar Threads

  1. Ascent Private - How to raise all stats without enchants and gear.
    By IlluzionE in forum WoW EMU Guides & Tutorials
    Replies: 17
    Last Post: 05-18-2008, 03:59 PM
  2. Got account and pass word and name.
    By wowman214 in forum Community Chat
    Replies: 11
    Last Post: 11-21-2007, 02:21 AM
  3. Skinning, enchanting and Herb. Guides!
    By Glynbeard in forum World of Warcraft Guides
    Replies: 7
    Last Post: 04-09-2007, 06:13 PM
All times are GMT -5. The time now is 11:59 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