Code:
#region
using System;
using System.Reflection;
#endregion
//Define this as false when this is no longer current.
#if LEGION
namespace LazyLib.Wow
{
[Obfuscation(Feature = "renaming", ApplyToMembers = true)]
public class PublicPointers
{
#region Globals enum
public enum Globals
{
PlayerName = 0x19B1550,
}
#endregion
#region InGame enum
public enum InGame
{
InGame = 0x18C43EC, //0x01 when in game, 0x00 when out or reloading UI
InstanceSize = 0x18C4410,
HighResCounter = 0x187A1D8,
}
#endregion
}
internal class Pointers
{
#region Nested type: ObjectManager
internal enum ObjectManager
{
//CurrentManager = Memory.Read<uint>(Memory.ReadRelative<uint>((uint) Pointers.ObjectManager.CurMgrPointer)
// + (uint) Pointers.ObjectManager.CurMgrOffset);
//LocalGUID = Memory.Read<UInt64>(CurrentManager + (uint) Pointers.ObjectManager.LocalGUID);
//CurMgrPointer = 0x19AF890 + 0x1020,
//CurMgrOffset = 0x1A0,
CurMgrPointerNew = 0x16B5C40,
NextObject = 0x70,
FirstObject = 0x18,
LocalGUID = 0x1D8,
ObjectTypeOffset = 0x20,
ObjectStorageOffset = 0x10,
}
#endregion
#region Nested type: BMAH
internal enum BMAH
{
ItemCount = 0x19771E0,
ItemStart = ItemCount + 0x08,
}
#endregion
#region Nested type: Globals
internal enum Globals
{
//Currently these two are the same.
//This is used for error messages.
RedMessage = 0x18C3790,
BlueMessage = RedMessage,
MouseOverGUID = 0x18C44B0,
CursorType = 0x1889AB8,
CursorType2 = CursorType + 0x04,
ChatboxIsOpen = 0x1622024,
LootWindow = 0x193E22C,
IsBobbing = 0x01C4,
ArchFacing = 0x470,
ArchFacingOffset2 = 0x238,
}
#endregion
#region Nested type: ActionBar enum
public enum ActionBar
{
ActionBarFirstSlot = 0x1934180,
ActionBarBonus = ActionBarFirstSlot + 0x240,
}
#endregion
#region Nested type: ClickToMove enum
public enum ClickToMove
{
Name = 0x30,
Offset = 0x60,
Pointer = 0x18C32C0,
}
#endregion
#region Nested type: AutoLoot enum
public enum AutoLoot
{
Name = 0x30,
Offset = 0x60,
Pointer = 0x18C3300,
}
#endregion
#region Nested type: LUAError enum
public enum LUAError
{
Name = 0x30,
Offset = 0x60,
Pointer = 0x18C32A8,
}
#endregion
#region Nested type: CgUnitCGetCreatureRank enum
public enum CgUnitCGetCreatureRank
{
Offset1 = 0x1718,
Offset2 = 0x38,
}
#endregion
#region Nested type: CgUnitCGetCreatureType enum
public enum CgUnitCGetCreatureType
{
Offset1 = 0x1718,
Offset2 = 0x30,
}
#endregion
#region Nested type: CgWorldFrameGetActiveCamera enum
public enum CgWorldFrameGetActiveCamera
{
//return Memory.Read<uint>(Memory.ReadRelative<uint>((uint)Pointers.CgWorldFrameGetActiveCamera.CameraPointer)
// + (uint)Pointers.CgWorldFrameGetActiveCamera.CameraOffset);
CameraX = 0x10,
CameraY = 0x14,
CameraZ = 0x18,
CameraMatrix = 0x1C,
CameraPointer = 0x1921EF8,
CameraOffset = 0x3328,
}
#endregion
#region Nested type: AutoAttack
internal enum AutoAttack
{
AutoAttackGUID = 0x1B80,
}
#endregion
#region Nested type: CastingInfo
internal enum CastingInfo
{
InstantCasting = 0x1C48,
IsCasting = 0x1C6C,
ChanneledCasting = 0x1CA0,
}
#endregion
#region Nested type: Chat
internal enum Chat : uint
{
//Thx for struct info Torpedoes
ChatStart = 0x18C4D70,
ChatPosition = 0x191E9B0,
OffsetToNextMsg = 0x17F0,
MsgSenderName = 0x034,
MsgFullMessage = 0x0065,
MsgOnlyMessage = 0x0C1D,
MsgSenderGuid = 0x00,
MsgChannelNum = 0x17D8,
MsgTimeStamp = 0x17E4,
ChatQueueDepth = 0x40,
}
#endregion
#region Nested type: Runes
internal enum Runes
{
RunesAvailable = 0x193B30C,
}
#endregion
#region Nested type: Container
internal enum Container
{
EquippedBagGUID = 0x1939E40,
}
#endregion
#region Nested type: KeyBinding
internal enum KeyBinding
{
NumKeyBindings = 0x1940200,
First = 0xC8,
Next = 0xB8,
Key = 0x30,
Command = 0x58,
}
#endregion
#region Nested type: Macros
internal enum MacroManager
{
MacroCount = 0x157BE20,
MacroTable = MacroCount + 0x10,
MacroIdOffset = 0x30,
SpecificMacroIdOffset = 0x38,
MacroNameOffset = 0x44,
MacroListCount = 0x80
}
#endregion
#region Nested type: Reaction
internal enum Reaction
{
//This is from Legion.
//This has changed to a DB6 structure.
FactionDBCStruct = 0x1676398,
FactionWDBHeader = FactionDBCStruct + 0xC8,
FactionDBData = FactionDBCStruct + 0xD0,
FactionDBSparseInfo = FactionDBCStruct + 0xD8,
FactionColumnExtraInfo = FactionDBCStruct + 0xE0,
//@FactionDBStruct:
DB5NamePointer = 0x00,
//ADBNamePointer = 0x08,
DBColumns = 0x08,
DBRowSize = 0x0C, //This is the size needed for the data, actual is rounded up to word/dword boundary.
DBStringStorageSize = 0x14, //Maybe?
DBColumnOffsetsPointer = 0x28,
DBColumnMultiplesPointer = 0x30,
DBColumnTypesPointer = 0x38,
DBColumnFlagsPointer = 0x40, //Maybe
DBHashValue = 0x5C, //Not sure. Matches the 4 byte value at the DB5Data Offset 0x14
//DBHashValue2 = 0x4C, //Not sure. Matches the 4 byte value at the DB5Data Offset 0x18
//@FactionWDBHeader:
DB5WDB5CodeOffset = 0x00,
DB5RowCount = 0x04,
DB5ColumnCount = 0x08,
DB5RowSize = 0x0C, //Actual row size in memory.
DB5StringStorageSize = 0x10,
DB5HashValue = 0x14,
DB5HashValue2 = 0x18,
DB5MinID = 0x1C,
DB5MaxID = 0x20,
DB5Unkn3 = 0x24,
DB5Unkn1 = 0x28, //Not sure what this is. (0x160 for faction Db5)
DB5Unkn2 = 0x2C, //Not sure what this is. (0x04 for faction Db5)
DB5ColumnExtraInfo = 0x30, //Pointed to by FactionColumnExtraInfo
//@FactionDBSparseInfo:
SparseHdrDBData = 0x08,
SparseHdrMinID = 0x28,
SparseHdrMaxID = 0x2C,
SparseHdrRowCount = 0x30, //Duplicated at offset 0x34?
SparseHdrDB2Name = 0x48,
SparseHdrSparseInfo = 0x60,
//The SparseHdrSparseInfo for factions consists of a series of pairs.
// 1st (2 bytes) = ID for the row.
// 2nd (2 bytes) = Actual row in the database.
// And these are offsets from the "min offset".
SparseHdrPairSize = 0x04,
//Row is now:
//<field type="uint" name="m_faction" />
//<field type="uint" name="m_flags" />
//<field type="uint" name="m_enemies_1" />
//<field type="uint" name="m_enemies_2" />
//<field type="uint" name="m_enemies_3" />
//<field type="uint" name="m_enemies_4" />
//<field type="uint" name="m_friend_1" />
//<field type="uint" name="m_friend_2" />
//<field type="uint" name="m_friend_3" />
//<field type="uint" name="m_friend_4" />
//<field type="uint" name="m_factionGroup" />
//<field type="uint" name="m_friendGroup" />
//<field type="uint" name="m_enemyGroup" />
HostileOffset1 = 0x16,
HostileOffset2 = 0x14,
HostileOffset3 = 0x04,
FriendlyOffset1 = 0x15,
FriendlyOffset2 = 0x14,
FriendlyOffset3 = 0x0C,
}
#endregion
#region Nested type: MountDB
internal enum MountDB
{
//This is from Legion.
//This has changed to a DB6 structure...
MountDBCStruct = 0x16832B8,
MountDBHeader = MountDBCStruct + 0xC8,
MountDBData = MountDBCStruct + 0xD0,
MountDBSparseInfo = MountDBCStruct + 0xD8,
MountColumnExtraInfo = MountDBCStruct + 0xE0,
//@MountDBCStruct:
DB5NamePointer = 0x00,
//ADBNamePointer = 0x08,
DBColumns = 0x08,
DBRowSize = 0x0C, //This is the size needed for the data, actual is rounded up to word/dword boundary.
DBStringStorageSize = 0x14, //Maybe?
DBColumnOffsetsPointer = 0x28,
DBColumnMultiplesPointer = 0x30,
DBColumnTypesPointer = 0x38,
DBColumnFlagsPointer = 0x40, //Maybe
DBHashValue = 0x5C, //Not sure. Matches the 4 byte value at the DB5Data Offset 0x14
//DBHashValue2 = 0x4C, //Not sure. Matches the 4 byte value at the DB5Data Offset 0x18
//@MountDBHeader:
DB5WDB5CodeOffset = 0x00,
DB5RowCount = 0x04,
DB5ColumnCount = 0x08,
DB5RowSize = 0x0C, //Actual row size in memory.
DB5StringStorageSize = 0x10,
DB5HashValue = 0x14,
DB5HashValue2 = 0x18,
DB5MinID = 0x1C,
DB5MaxID = 0x20,
DB5Unkn3 = 0x24,
DB5Unkn1 = 0x28, //Not sure what this is. (0x160 for faction Db5)
DB5Unkn2 = 0x2C, //Not sure what this is. (0x04 for faction Db5)
DB5ColumnExtraInfo = 0x30, //Pointed to by FactionColumnExtraInfo
//@FactionDBSparseInfo:
SparseHdrDBData = 0x08,
SparseHdrMemoryRowSize = 0x20, //Actual row size in memory.
SparseHdrMinID = 0x28,
SparseHdrMaxID = 0x2C,
SparseHdrRowCount = 0x30, //Duplicated at offset 0x34?
SparseHdrDB2Name = 0x48,
SparseHdrSparseInfo = 0x60,
//The SparseHdrSparseInfo for mounts consists of a series of IDs.
// Each ID is 2 bytes and corresponds to the row to read for the iterated ID.
// If the entry is 0xFFFE, then no row exists, skip the ID.
// And these are all offsets from the "min offset".
SparseHdrPairSize = 0x04,
//Row is now:
//ID in sparse data
//<field type="uint" name="m_spellID" />
//<field type="uint" name="m_displayID" />
//<field type="stringoffset" name="m_Name" />
//<field type="stringoffset" name="m_Description" />
//<field type="stringoffset" name="m_WhereToGet" />
//<field type="uint" name="m_unk1" />
//<field type="ushort" name="m_flags1" />
//<field type="ushort" name="m_unk2" />
//<field type="ushort" name="m_unk3" />
//<field type="byte" name="m_unk4" />
//<field type="uint" name="m_unk5" />
spellIDOffset = 0x00,
displayIDOffset = 0x03,
nameStringOffset = 0x04,
flags1Offset = 0x14,
}
#endregion
#region Nested type: SpellCooldown
internal enum SpellCooldown : uint
{
Cooldown = 0x16A26D8,
Recharge = Cooldown + 0x30,
Offset_NextSpell = 0x00,
Offset_SpellID = 0x10,
Offset_StartTime1 = 0x1C,
Offset_CD1 = 0x20,
Offset_StartTime2 = 0x28,
Offset_CD2 = 0x2C,
Offset_StartTime3 = 0x34,
Offset_CD3 = 0x38,
Offset_RechargeStacks = 0x14,
Offset_RechargeTimeDone = 0x18,
}
#endregion
#region Nested type: Swimming
internal enum Swimming
{
Pointer = 0x210,
Offset = 0x58,
Mask = 0x100000,
}
#endregion
#region Nested type: IsFlying enum
public enum IsFlying
{
Pointer = 0x210,
Offset = 0x58,
Mask = 0x1000000
}
#endregion
#region Nested type: UnitSpeed
internal enum UnitSpeed
{
Pointer1 = 0x210,
Pointer2 = 0xA4,
}
#endregion
#region Nested type: UnitAuras
internal enum UnitAuras : uint
{
//AuraCount1 = 0x25B8,
AuraCount1 = 0x26C0,
AuraCount2 = 0x1DC0,
AuraTable1 = 0x1DC0,
//AuraTable2 = 0x2650,
AuraTable2 = 0x1DC8,
AuraSize = 0x90,
AuraTableOffset = 0x00,
OwnerGUID = 0x50,
AuraSpellId = 0x60,
AuraFlags = 0x68,
AuraStack = 0x69,
AuraLevel = 0x6A,
TimeLeft = 0x70,
//For GCD Modifications:
CurrentHaste = 0xAA18,
}
#endregion
#region Nested type: UnitName
internal enum UnitName : uint
{
ObjectName1 = 0x478,
ObjectName2 = 0xD8,
PlayerNameGUIDOffset = 0x020,
PlayerNameStringOffset = 0x031,
PlayerNameCachePointer = 0x166B978,
UnitName1 = 0x1718,
UnitName2 = 0xA0,
}
#endregion
#region Nested type: WowObject
internal enum WowObject
{
X = 0x1560,
Y = X + 0x4,
Z = X + 0x8,
RotationOffset = X + 0x10,
GameObjectX = 0x0228,
GameObjectY = GameObjectX + 0x4,
GameObjectZ = GameObjectX + 0x8,
GameObjectRotation = GameObjectX + 0x10,
}
#endregion
#region Nested type: Zone
internal enum Zone : uint
{
ZoneText = 0x18C36C0,
ZoneID = 0x18C435C,
}
#endregion
#region Nested type: UiFrame
internal enum UiFrame
{
//var @base = Memory.ReadRelative<ulong>((uint)Pointers.UiFrame.FrameBase);
//var worldFrame = Memory.Read<ulong>(Memory.Read<ulong>(@base + (uint)Pointers.UiFrame.FirstFrame));
//These are float values.
ScrWidth = 0x13524CC,
ScrHeight = ScrWidth + 0x04,
//These is the offset to the UI struct.
FrameBase = 0x160D9F0,
//This is the one the mouse is over.
UIFramesValidOffset = 0xC8,
CurrentFrameOffset = 0x178,
//These seem okay for legion:
//FirstFrame = 0xCB8, //0xC78,
//NextFrame = 0xCA8, //0xC68,
FirstFrame = 0xCB0, //0xC78,
NextFrame = 0xCA0, //0xC68,
Name = 0x20,
FrameBottom = 0x90,
FrameLeft = 0x94,
FrameTop = 0x98,
FrameRight = 0x9C,
EffectiveScale = 0xC0,
ParentFrame = 0xD0,
IconNumber = 0xF0,
LabelText = 0x180,
RegionsNext = 0x198, //0x1A8,
RegionsFirst = 0x1A8, //0x1B8,
EditBoxText = 0x238, //0x268,
//These still need work:
VisibleOffset = 0xC8,
VisibleMask = 0x00080000,
IsDisabledOffset = 0xF4, // ??
IsDisabledMask = 0x08, // ??
ButtonEnabledPointer = 0x210, //0x220,
ButtonEnabledMask = 0xF,
ButtonChecked = 0x268, //0x280,
}
#endregion
}
}
#endif