Quantcast
Channel: OwnedCore - World of Warcraft Exploits, Hacks, Bots and Guides.
Viewing all articles
Browse latest Browse all 280060

2.4.3 Unit Class

$
0
0
I am working on 2.4.3 bot. I am trying to read Unit's class.

Descriptor bytes are at :
Bytes0 = 0x78,

Code:

enum EnWowClass
    {
        None = 0,
        Warrior = 1,
        Paladin = 2,
        Hunter = 3,
        Rogue = 4,
        Priest = 5,
        DeathKnight = 6,
        Shaman = 7,
        Mage = 8,
        Warlock = 9,
        Druid = 11,
    }

  public EnWowClass Class
        {
            get
            {
                return (EnWowClass)UnitBytes0[1];
            }
        }


 private byte[] UnitBytes0
        {
            get { return BitConverter.GetBytes(GetAbsoluteDescriptor<uint>((int)EnWowUnit.Bytes0)); }
        }

    internal T GetAbsoluteDescriptor<T>(int offset) where T : struct
        {
            var descriptorArray = Manager.Memory.Read<uint>(new IntPtr(Pointer.ToInt64() + 0x8));
            return Manager.Memory.Read<T>(new IntPtr(descriptorArray + offset));

        }

I am assuming checking descriptors is a valid way to check class in 2.4.3. Above method keeps return class descriptor of hunter for all classes.

Viewing all articles
Browse latest Browse all 280060

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>