Code:
/*
This file is part of LazyBot - Copyright (C) 2011 Arutha
LazyBot is free software: you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation, either version 3 of the License, or
(at your option) any later version.
LazyBot is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
GNU General Public License for more details.
You should have received a copy of the GNU General Public License
along with LazyBot. If not, see <http://www.gnu.org/licenses/>.
*/
#region
using System.Reflection;
#endregion
#if true
namespace LazyLib.Wow
{
[Obfuscation(Feature = "renaming", ApplyToMembers = true)]
public class PublicPointers
{
#region Globals enum
public enum Globals
{
PlayerName = 0xED3928, //Good
//PlayerName64 = 0x16041C8,
}
#endregion
#region InGame enum
public enum InGame
{
InGame = 0xD9133E, //Good
//InGame64 = 0x149C200,
InstanceSize = 0xD91404, //Good
//InstanceSize64 = 0xD60C50,
}
#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 = 0xED38E8, //Good
CurMgrOffset = 0x62C, //Good
NextObject = 0x3C, //Good
FirstObject = 0xD8, //Good
LocalGUID = 0xF8, //Good
}
#endregion
#region Nested type: BMAH
//Note that these are hardcoded into Main.cs for now.
internal enum BMAH
{
ItemCount = 0xE10758, // TODO
ItemStart = 0xE1075C, // TODO
}
#endregion
#region Nested type: Globals
internal enum Globals
{
RedMessage = 0xD90730, //Good
MouseOverGUID = 0xD916D8, //Good
LootWindow = 0xE021B0, //Good
IsBobbing = 0x104, //Good
ArchFacing = 0x1BC, //TODO
ArchFacingOffset2 = 0x108, //TODO
ChatboxIsOpen = 0xC3CA58, //Good
CursorType = 0xD59D20 //Good
}
#endregion
#region ActionBar enum
public enum ActionBar
{
ActionBarFirstSlot = 0xE01048, //Good
ActionBarBonus = 0xE014D0 //TODO: Verify
}
#endregion
#region AutoLoot enum
public enum AutoLoot
{
Offset = 0x34, //Good
Pointer = 0xD914E4, //Good
}
#endregion
#region ClickToMove enum
public enum ClickToMove
{
Offset = 0x34, //Good
Pointer = 0xD914C4, //Good
}
#endregion
#region CgUnitCGetCreatureRank enum
public enum CgUnitCGetCreatureRank
{
Offset1 = 0xBC4, //Good
Offset2 = 0x2C, //Good
}
#endregion
#region CgUnitCGetCreatureType enum
public enum CgUnitCGetCreatureType
{
Offset1 = 0xBC4, //Good
Offset2 = 0x24, //Good
}
#endregion
#region CgWorldFrameGetActiveCamera enum
public enum CgWorldFrameGetActiveCamera
{
//return Memory.Read<uint>(Memory.ReadRelative<uint>((uint)Pointers.CgWorldFrameGetActiveCamera.CameraPointer)
// + (uint)Pointers.CgWorldFrameGetActiveCamera.CameraOffset);
CameraX = 0x8, //Good
CameraY = 0xC, //Good
CameraZ = 0x10, //Good
CameraMatrix = 0x14, //Good
CameraPointer = 0xD91A90, //Good
CameraOffset = 0x7610, //Good
}
#endregion
#region Nested type: AutoAttack
internal enum AutoAttack
{
//AutoAttackFlag = 0xEE8, //Old Method
//AutoAttackMask = 0xEEC, //Old Method
//Address seems to show the GUID of the Auto Attack target
AutoAttackGUID = 0xEE0, //Good
//Shows 0x06 when not wanding, 0x0C or 0x0E when wanding.
Wanding = 0xF00, //Good
}
#endregion
#region Nested type: CastingInfo
internal enum CastingInfo
{
IsCasting = 0xF1C, //Good
ChanneledCasting = 0xF58, //Good
}
#endregion
#region Nested type: Chat
internal enum Chat : uint
{
//TODO : Go fix chat arrays and memory usage there.
ChatStart = 0xD93300, //Good
OffsetToNextMsg = 0x17E8, //Good
ChatPosition = 0xDED67C, //New for me to use
MsgSenderGuid = 0x00, //Good
MsgSenderName = 0x034, //Good
MsgFullMessage = 0x0065, //Good
MsgOnlyMessage = 0x0C1D, //Good
MsgChannelNum = 0x17D8, //Good
MsgTimeStamp = 0x17E4, //Good
}
#endregion
#region Nested type: RealId
internal enum ReadId : uint
{
DatabasePointer = 0xDEEC0C, //Good
ItemSize = 0x33C,
NumItems = 0xDEEC08,
}
#endregion
#region BlueChat
internal enum Messages
{
//This is incorrect. I never use it, so haven't updated it.
//Seems to be used in updating skills?
EventMessage = 0xD9BA38 // 5.0.4 (15929) <--- FIX THIS
}
#endregion
//Moved to Power3
//#region Nested type: ComboPoints
// internal enum ComboPoints
// {
// ComboPoints = 0xD91411, // 5.4.8 (18414) (0x4F0 diff)
// }
//#endregion
#region Nested type: Runes
internal enum Runes
{
RuneTypes = 0xE07E78, //Good
RunesOffset = 0xE07EDC, //Good
}
#endregion
#region Nested type: Container
internal enum Container
{
//Provided by Charles.
EquippedBagGUID = 0xDD7328, //Need to update
}
#endregion
#region Nested type: KeyBinding
internal enum KeyBinding
{
NumKeyBindings = 0xDEF240, //Good
First = 0xC8, //Good
Next = 0xC0, //Good
Key = 0x18, //Good
Command = 0x2C, //Good
}
#endregion
#region Nested type: Macros
internal enum MacroManager
{
MacroCount = 0xE07750, //Good
MacroTable = 0xE07758, //Good
}
#endregion
#region Nested type: Reaction
internal enum Reaction : uint
{
FactionPointer = FactionStartIndex + 0xC, // 5.4.8 (18414)
FactionTotal = FactionStartIndex - 0x4, // 5.4.8 (18414)
HostileOffset1 = 0x14, // 5.4.8 (18414)
HostileOffset2 = 0x0C, // 5.4.8 (18414)
FriendlyOffset1 = 0x10, // 5.4.8 (18414)
FriendlyOffset2 = 0x0C, // 5.4.8 (18414)
FactionStartIndex = 0xC8ADDC, // 5.4.8 (18414) (0x760 diff)
}
#endregion
/*
* //Now using the one from the descriptors offset.
#region Nested type: ShapeshiftForm
internal enum ShapeshiftForm
{
BaseAddressOffset1 = 0xE4, // 5.4.8 (18414)
BaseAddressOffset2 = 0x1E3, // 5.4.8 (18414)
}
#endregion
*/
#region Nested type: SpellCooldown
internal enum SpellCooldown : uint
{
CooldPown = 0xCA2600, // 5.4.8 (18414) (0x4F0 diff)
}
#endregion
#region Nested type: Swimming
internal enum Swimming
{
Pointer = 0x124, //Good
Offset = 0x40, //Good
Mask = 0x100000, //Good
}
#endregion
#region IsFlying enum
public enum IsFlying
{
Pointer = 0x124, //Good
Offset = 0x40, //Good
Mask = 0x1000000 //Good
}
#endregion
#region Nested type: UnitSpeed
internal enum UnitSpeed
{
Pointer1 = 0x124, //Good
Pointer2 = 0x88, //Good
}
#endregion
#region Nested type: UnitAuras
internal enum UnitAuras : uint
{
AuraCount1 = 0x1520, //Good
AuraCount2 = 0x10A0, //Good
AuraTable1 = 0x10A0, //Good
AuraTable2 = 0x10A4, //Good
AuraSize = 0x48, //Good
AuraSpellId = 0x30, //Good
AuraStack = 0x35, //Good
TimeLeft = 0x3C, //Good
OwnerGUID = 0x20, //Good
}
#endregion
#region Nested type: UnitName
internal enum UnitName : uint
{
ObjectName1 = 0x26C, //Good
ObjectName2 = 0xB4, //Good
PlayerNameGUIDOffset = 0x010, //Good
PlayerNameStringOffset = 0x021, //Good
PlayerNameCachePointer = 0xC8B574, //Good
UnitName1 = 0xBC4, //Good
UnitName2 = 0x7C, //Good
}
#endregion
#region Nested type: WowObject
internal enum WowObject
{
X = 0xA50, //Good
Y = X + 0x4, //Good
Z = X + 0x8, //Good
RotationOffset = X + 0x10, //Good
GameObjectX = 0x0138, //Good
GameObjectY = GameObjectX + 0x4, //Good
GameObjectZ = GameObjectX + 0x8, //Good
GameObjectRotation = GameObjectX + 0x10, //Good
}
#endregion
#region Nested type: Zone
internal enum Zone : uint
{
ZoneText = 0xD91334, //Good
ZoneID = 0xD91388, //Good
}
#endregion
#region Nested type: UiFrame
internal enum UiFrame
{
//var @base = Memory.ReadRelative<uint>((uint)Pointers.UiFrame.FrameBase);
//var currentFrame = Memory.Read<uint>(@base + (uint)Pointers.UiFrame.FirstFrame);
ScrWidth = 0xB56C88, //Verify
ScrHeight = 0xB56C8C, //Verify
FrameBase = 0xC30620, //Good
CurrentFramePtr = 0xC30620, //Good
FirstFrame = 0x12F4, //Good
NextFrame = 0x12EC, //Good
RegionsFirst = 0x168, //Good
RegionsNext = 0x160, //Good
Visible = 0x64, //Good
Visible1 = 0x1A, //Good
Visible2 = 1, //Good
LabelText = 0xF8, //Good
Name = 0x1C, //Good
ButtonEnabledPointer = 0x1F4, //Assumed Good
ButtonEnabledMask = 0xF, //Assumed Good
ButtonChecked = 0x230, //Assumed Good
EditBoxText = 0x210, //Assumed Good
FrameBottom = 0x68, //Assumed Good
FrameLeft = 0x6c, //Assumed Good
FrameTop = 0x70, //Assumed Good
FrameRight = 0x74, //Assumed Good
CurrentFrameOffset = 0x88, //Assumed Good?
}
#endregion
}
}
#endif