Documentation
¶
Index ¶
- Constants
- Variables
- func GetText(p data.Panel) string
- func NewPanel(panelPtr uintptr, panelParent string, depth int, gd *GameReader) *data.Panel
- func ReadIntFromBuffer(bytes []byte, offset uint, size IntType) int
- func ReadUIntFromBuffer(bytes []byte, offset uint, size IntType) uint
- type GameReader
- func (gd *GameReader) Corpses(playerPosition data.Position, hover data.HoverData) data.Monsters
- func (gd *GameReader) Entrances(playerPosition data.Position, hover data.HoverData) []data.Entrance
- func (gd *GameReader) FPS() int
- func (gd *GameReader) GetActiveWeaponSlot() int
- func (gd *GameReader) GetCharacterList() []string
- func (gd *GameReader) GetData() data.Data
- func (gd *GameReader) GetInventory() data.Inventory
- func (gd *GameReader) GetKeyBindings() data.KeyBindings
- func (gd *GameReader) GetMercList() []MercOption
- func (gd *GameReader) GetPanel(panelPath ...string) data.Panel
- func (gd *GameReader) GetPlayerUnit(mainPlayerUnit RawPlayerUnit) data.PlayerUnit
- func (gd *GameReader) GetRawPlayerUnits() RawPlayerUnits
- func (gd *GameReader) GetSelectedCharacterName() string
- func (gd *GameReader) GetStates(statsListExPtr uintptr) state.States
- func (gd *GameReader) GetWidgetState(stateFlag uint64) (int, error)
- func (gd *GameReader) HasMerc() bool
- func (gd *GameReader) HoveredData() data.HoverData
- func (gd *GameReader) InCharacterSelectionScreen() bool
- func (gd *GameReader) InGame() bool
- func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverData) data.Inventory
- func (gd *GameReader) IsBlocking() bool
- func (gd *GameReader) IsDismissableModalPresent() (bool, string)
- func (gd *GameReader) IsInCharacterCreationScreen() bool
- func (gd *GameReader) IsInCharacterSelectionScreen() bool
- func (gd *GameReader) IsInLobby() bool
- func (gd *GameReader) IsIngame() bool
- func (gd *GameReader) IsOnline() bool
- func (gd *GameReader) LastGameName() string
- func (gd *GameReader) LastGamePass() string
- func (gd *GameReader) LegacyGraphics() bool
- func (gd *GameReader) Monsters(playerPosition data.Position, hover data.HoverData) data.Monsters
- func (gd *GameReader) Objects(playerPosition data.Position, hover data.HoverData) []data.Object
- func (gd *GameReader) OpenMenus() data.OpenMenus
- func (gd *GameReader) Ping() int
- func (gd *GameReader) ReadAllPanels() map[string]data.Panel
- func (gd *GameReader) TerrorZones() (areas []area.ID)
- type IntType
- type MercOption
- type ModuleInfo
- type Offset
- type Process
- func (p *Process) Close() error
- func (p *Process) FindPattern(memory []byte, pattern, mask string) uintptr
- func (p *Process) FindPatternByOperand(memory []byte, pattern, mask string) uintptr
- func (p *Process) GetD2GSSendPacketFn() (uintptr, error)
- func (p *Process) GetPID() uint32
- func (p *Process) ReadBytesFromMemory(address uintptr, size uint) []byte
- func (p *Process) ReadIntoBuffer(address uintptr, buffer []byte) error
- func (p *Process) ReadPointer(address uintptr, size int) (uintptr, error)
- func (p *Process) ReadStringFromMemory(address uintptr, size uint) string
- func (p *Process) ReadUInt(address uintptr, size IntType) uint
- func (p *Process) ReadWidgetContainer(address uintptr, full bool) (map[string]interface{}, error)
- func (p *Process) ReadWidgetList(listPointer uintptr, listSize int) (map[string]map[string]interface{}, error)
- func (p *Process) SendPacket(packet []byte) (err error)
- type RawPlayerUnit
- type RawPlayerUnits
Constants ¶
const ( Int8 = 1 Int16 = 2 Int32 = 4 Int64 = 8 )
const ( Uint8 = 1 Uint16 = 2 Uint32 = 4 Uint64 = 8 )
const ( THREAD_SUSPEND_RESUME = 0x0002 THREAD_SET_CONTEXT = 0x0010 THREAD_QUERY_INFORMATION = 0x0040 )
Variables ¶
var WidgetStateFlags = map[string]uint64{
"WeaponSwap": 0xF2D7CF8E9CC08212,
}
Functions ¶
Types ¶
type GameReader ¶
type GameReader struct {
*Process
// contains filtered or unexported fields
}
func NewGameReader ¶
func NewGameReader(process *Process) *GameReader
func (*GameReader) FPS ¶
func (gd *GameReader) FPS() int
func (*GameReader) GetActiveWeaponSlot ¶
func (gd *GameReader) GetActiveWeaponSlot() int
func (*GameReader) GetCharacterList ¶
func (gd *GameReader) GetCharacterList() []string
func (*GameReader) GetData ¶
func (gd *GameReader) GetData() data.Data
func (*GameReader) GetInventory ¶
func (gd *GameReader) GetInventory() data.Inventory
func (*GameReader) GetKeyBindings ¶
func (gd *GameReader) GetKeyBindings() data.KeyBindings
func (*GameReader) GetMercList ¶
func (gd *GameReader) GetMercList() []MercOption
GetMercList returns the list of mercenaries available for hire in the Hire Menu Only works if the Hire Menu is open in legacy graphics mode
func (*GameReader) GetPanel ¶
func (gd *GameReader) GetPanel(panelPath ...string) data.Panel
GetPanel returns a Panel object from the specified path (starting from the root panel)
func (*GameReader) GetPlayerUnit ¶
func (gd *GameReader) GetPlayerUnit(mainPlayerUnit RawPlayerUnit) data.PlayerUnit
func (*GameReader) GetRawPlayerUnits ¶
func (gd *GameReader) GetRawPlayerUnits() RawPlayerUnits
func (*GameReader) GetSelectedCharacterName ¶
func (gd *GameReader) GetSelectedCharacterName() string
func (*GameReader) GetWidgetState ¶
func (gd *GameReader) GetWidgetState(stateFlag uint64) (int, error)
GetWidgetState reference : https://github.com/ResurrectedTrader/ResurrectedTrade/blob/f121ec02dd3fbe1c574f713e5a0c2db92ccca821/ResurrectedTrade.AgentBase/Capture.cs#L618
func (*GameReader) HasMerc ¶
func (gd *GameReader) HasMerc() bool
func (*GameReader) HoveredData ¶
func (gd *GameReader) HoveredData() data.HoverData
func (*GameReader) InCharacterSelectionScreen ¶
func (gd *GameReader) InCharacterSelectionScreen() bool
func (*GameReader) InGame ¶
func (gd *GameReader) InGame() bool
func (*GameReader) Inventory ¶
func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverData) data.Inventory
func (*GameReader) IsBlocking ¶
func (gd *GameReader) IsBlocking() bool
IsBlocking checks if there's a blocking popup or loading screen present
func (*GameReader) IsDismissableModalPresent ¶
func (gd *GameReader) IsDismissableModalPresent() (bool, string)
IsDismissableModalPresent checks if there's a error popup present
func (*GameReader) IsInCharacterCreationScreen ¶
func (gd *GameReader) IsInCharacterCreationScreen() bool
func (*GameReader) IsInCharacterSelectionScreen ¶
func (gd *GameReader) IsInCharacterSelectionScreen() bool
func (*GameReader) IsInLobby ¶
func (gd *GameReader) IsInLobby() bool
func (*GameReader) IsIngame ¶
func (gd *GameReader) IsIngame() bool
func (*GameReader) IsOnline ¶
func (gd *GameReader) IsOnline() bool
func (*GameReader) LastGameName ¶
func (gd *GameReader) LastGameName() string
func (*GameReader) LastGamePass ¶
func (gd *GameReader) LastGamePass() string
func (*GameReader) LegacyGraphics ¶
func (gd *GameReader) LegacyGraphics() bool
func (*GameReader) OpenMenus ¶
func (gd *GameReader) OpenMenus() data.OpenMenus
func (*GameReader) Ping ¶
func (gd *GameReader) Ping() int
func (*GameReader) ReadAllPanels ¶
func (gd *GameReader) ReadAllPanels() map[string]data.Panel
ReadAllPanels reads all panels from the game memory
func (*GameReader) TerrorZones ¶
func (gd *GameReader) TerrorZones() (areas []area.ID)
type MercOption ¶
type ModuleInfo ¶
type ModuleInfo struct {
ProcessID uint32
ModuleBaseAddress uintptr
ModuleBaseSize uint32
ModuleHandle syscall.Handle
ModuleName string
}
func GetProcessModules ¶
func GetProcessModules(processID uint32) ([]ModuleInfo, error)
type Offset ¶
type Offset struct {
GameData uintptr
UnitTable uintptr
UI uintptr
Hover uintptr
Expansion uintptr
RosterOffset uintptr
PanelManagerContainerOffset uintptr
WidgetStatesOffset uintptr
WaypointsOffset uintptr
FPS uintptr
KeyBindingsOffset uintptr
KeyBindingsSkillsOffset uintptr
TZ uintptr
Quests uintptr
Ping uintptr
LegacyGraphics uintptr
}
type Process ¶
type Process struct {
// contains filtered or unexported fields
}
func NewProcess ¶
func NewProcessForPID ¶
func (*Process) FindPattern ¶
func (*Process) FindPatternByOperand ¶
func (*Process) GetD2GSSendPacketFn ¶
func (*Process) ReadBytesFromMemory ¶
func (*Process) ReadIntoBuffer ¶
func (*Process) ReadPointer ¶
ReadPointer reads a pointer from the specified memory address.
func (*Process) ReadStringFromMemory ¶
func (*Process) ReadWidgetContainer ¶
ReadWidgetContainer reads the WidgetContainer structure.
func (*Process) ReadWidgetList ¶
func (p *Process) ReadWidgetList(listPointer uintptr, listSize int) (map[string]map[string]interface{}, error)
ReadWidgetList iterates through a list of widgets given a pointer to the list and its size.
func (*Process) SendPacket ¶
type RawPlayerUnit ¶
type RawPlayerUnits ¶
type RawPlayerUnits []RawPlayerUnit
func (RawPlayerUnits) GetCorpse ¶
func (pu RawPlayerUnits) GetCorpse() RawPlayerUnit
func (RawPlayerUnits) GetMainPlayer ¶
func (pu RawPlayerUnits) GetMainPlayer() RawPlayerUnit