Compare commits
15 Commits
7d09c0c87f
...
28062d1c04
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
28062d1c04 | ||
|
|
dba427c2f6 | ||
|
|
796d2f8805 | ||
|
|
2fa07f772c | ||
|
|
6c3b135688 | ||
|
|
1059ee7d3c | ||
|
|
e1805d76ab | ||
|
|
831d004c33 | ||
|
|
ffbc3dc39a | ||
|
|
619d125378 | ||
|
|
a49f6eff4f | ||
|
|
b3f2b06a9f | ||
|
|
fa9626f45c | ||
|
|
2325270cb8 | ||
|
|
ce709bf617 |
@@ -17,6 +17,7 @@ var CanBeTerrorized = map[ID]bool{
|
|||||||
HoleLevel1: true,
|
HoleLevel1: true,
|
||||||
HoleLevel2: true,
|
HoleLevel2: true,
|
||||||
ForgottenTower: true,
|
ForgottenTower: true,
|
||||||
|
TamoeHighland: true,
|
||||||
Barracks: true,
|
Barracks: true,
|
||||||
JailLevel1: true,
|
JailLevel1: true,
|
||||||
JailLevel2: true,
|
JailLevel2: true,
|
||||||
@@ -38,11 +39,15 @@ var CanBeTerrorized = map[ID]bool{
|
|||||||
HallsOfTheDeadLevel2: true,
|
HallsOfTheDeadLevel2: true,
|
||||||
HallsOfTheDeadLevel3: true,
|
HallsOfTheDeadLevel3: true,
|
||||||
FarOasis: true,
|
FarOasis: true,
|
||||||
|
MaggotLairLevel1: true,
|
||||||
|
MaggotLairLevel2: true,
|
||||||
|
MaggotLairLevel3: true,
|
||||||
LostCity: true,
|
LostCity: true,
|
||||||
ValleyOfSnakes: true,
|
ValleyOfSnakes: true,
|
||||||
ClawViperTempleLevel1: true,
|
ClawViperTempleLevel1: true,
|
||||||
ClawViperTempleLevel2: true,
|
ClawViperTempleLevel2: true,
|
||||||
AncientTunnels: true,
|
AncientTunnels: true,
|
||||||
|
CanyonOfTheMagi: true,
|
||||||
TalRashasTomb1: true,
|
TalRashasTomb1: true,
|
||||||
TalRashasTomb2: true,
|
TalRashasTomb2: true,
|
||||||
TalRashasTomb3: true,
|
TalRashasTomb3: true,
|
||||||
@@ -59,6 +64,9 @@ var CanBeTerrorized = map[ID]bool{
|
|||||||
FlayerDungeonLevel1: true,
|
FlayerDungeonLevel1: true,
|
||||||
FlayerDungeonLevel2: true,
|
FlayerDungeonLevel2: true,
|
||||||
FlayerDungeonLevel3: true,
|
FlayerDungeonLevel3: true,
|
||||||
|
SwampyPitLevel1: true,
|
||||||
|
SwampyPitLevel2: true,
|
||||||
|
SwampyPitLevel3: true,
|
||||||
KurastBazaar: true,
|
KurastBazaar: true,
|
||||||
RuinedTemple: true,
|
RuinedTemple: true,
|
||||||
DisusedFane: true,
|
DisusedFane: true,
|
||||||
@@ -75,6 +83,8 @@ var CanBeTerrorized = map[ID]bool{
|
|||||||
Abaddon: true,
|
Abaddon: true,
|
||||||
GlacialTrail: true,
|
GlacialTrail: true,
|
||||||
DrifterCavern: true,
|
DrifterCavern: true,
|
||||||
|
FrozenTundra: true,
|
||||||
|
InfernalPit: true,
|
||||||
CrystallinePassage: true,
|
CrystallinePassage: true,
|
||||||
FrozenRiver: true,
|
FrozenRiver: true,
|
||||||
ArreatPlateau: true,
|
ArreatPlateau: true,
|
||||||
|
|||||||
@@ -162,7 +162,7 @@ func (m Monster) IsMerc() bool {
|
|||||||
|
|
||||||
func (m Monster) IsPet() bool {
|
func (m Monster) IsPet() bool {
|
||||||
// Necromancer revive.
|
// Necromancer revive.
|
||||||
if m.States.HasState(state.Revive) {
|
if m.States.HasState(state.Revive) || m.States.HasState(state.BindDemon) || m.States.HasState(state.BindDemonUnderling) {
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -171,7 +171,7 @@ func (m Monster) IsPet() bool {
|
|||||||
npc.OakSage, npc.DruBear, npc.DruPlaguePoppy, npc.VineCreature,
|
npc.OakSage, npc.DruBear, npc.DruPlaguePoppy, npc.VineCreature,
|
||||||
npc.DruCycleOfLife, npc.ClayGolem, npc.BloodGolem, npc.IronGolem,
|
npc.DruCycleOfLife, npc.ClayGolem, npc.BloodGolem, npc.IronGolem,
|
||||||
npc.FireGolem, npc.NecroSkeleton, npc.NecroMage, npc.Valkyrie, npc.Decoy,
|
npc.FireGolem, npc.NecroSkeleton, npc.NecroMage, npc.Valkyrie, npc.Decoy,
|
||||||
npc.ShadowWarrior, npc.ShadowMaster:
|
npc.ShadowWarrior, npc.ShadowMaster, npc.Tainted3, npc.WarGoatman, npc.WarDefiler:
|
||||||
return true
|
return true
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -325,6 +325,12 @@ func (gd *GameReader) GetSelectedCharacterName() string {
|
|||||||
return gd.Process.ReadStringFromMemory(gd.Process.moduleBaseAddressPtr+gd.offset.SelectedCharName, 0)
|
return gd.Process.ReadStringFromMemory(gd.Process.moduleBaseAddressPtr+gd.offset.SelectedCharName, 0)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func (gd *GameReader) GetExpChar() uint {
|
||||||
|
expCharPtr := uintptr(gd.Process.ReadUInt(gd.moduleBaseAddressPtr+gd.offset.Expansion, Uint64))
|
||||||
|
expChar := gd.Process.ReadUInt(expCharPtr+0x5C, Uint16)
|
||||||
|
return expChar
|
||||||
|
}
|
||||||
|
|
||||||
func (gd *GameReader) LegacyGraphics() bool {
|
func (gd *GameReader) LegacyGraphics() bool {
|
||||||
return gd.ReadUInt(gd.Process.moduleBaseAddressPtr+gd.offset.LegacyGraphics, Uint8) != 0
|
return gd.ReadUInt(gd.Process.moduleBaseAddressPtr+gd.offset.LegacyGraphics, Uint8) != 0
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -69,7 +69,7 @@ func (gd *GameReader) Inventory(rawPlayerUnits RawPlayerUnits, hover data.HoverD
|
|||||||
}
|
}
|
||||||
socketedItemsMap := make(map[data.UnitID][]socketInfo, 120) // Up to ~120 items could be socketable
|
socketedItemsMap := make(map[data.UnitID][]socketInfo, 120) // Up to ~120 items could be socketable
|
||||||
baseItemsMap := make(map[data.UnitID]*data.Item, 120) // Same number of potential base items
|
baseItemsMap := make(map[data.UnitID]*data.Item, 120) // Same number of potential base items
|
||||||
allItems := make([]*data.Item, 0, 480) // max capacity: 400 (stashes) + 40 (inv) + 12 (cube) + 12 (equipped) + 16 (belt)
|
allItems := make([]*data.Item, 0, 800) // max capacity: 600 (stashes) + 91 (DLC tabs) + 40 (inv) + 12 (cube) + 12 (equipped) + 16 (belt) + headroom
|
||||||
|
|
||||||
// Pre-allocate buffers for repeated use
|
// Pre-allocate buffers for repeated use
|
||||||
var itemDataBuffer = make([]byte, 144)
|
var itemDataBuffer = make([]byte, 144)
|
||||||
|
|||||||
@@ -26,61 +26,61 @@ type Offset struct {
|
|||||||
|
|
||||||
func calculateOffsets(_ *Process) Offset {
|
func calculateOffsets(_ *Process) Offset {
|
||||||
// UnitTable
|
// UnitTable
|
||||||
unitTableOffset := uintptr(0x1E9B350)
|
unitTableOffset := uintptr(0x1EAA350)
|
||||||
|
|
||||||
// UI
|
// UI
|
||||||
uiOffsetPtr := uintptr(0x1EAB042)
|
uiOffsetPtr := uintptr(0x1EBA042)
|
||||||
|
|
||||||
// Hover
|
// Hover
|
||||||
hoverOffset := uintptr(0x1DEF000)
|
hoverOffset := uintptr(0x1DFE010)
|
||||||
|
|
||||||
// Expansion
|
// Expansion
|
||||||
expOffset := uintptr(0x1DEE468)
|
expOffset := uintptr(0x1DFD460)
|
||||||
|
|
||||||
// Party members offset
|
// Party members offset
|
||||||
rosterOffset := uintptr(0x1EB1660)
|
rosterOffset := uintptr(0x1EC0660)
|
||||||
|
|
||||||
// PanelManagerContainer
|
// PanelManagerContainer
|
||||||
panelManagerContainerOffset := uintptr(0x1E05DC0)
|
panelManagerContainerOffset := uintptr(0x1E14DB8)
|
||||||
|
|
||||||
// WidgetStates
|
// WidgetStates
|
||||||
WidgetStatesOffset := uintptr(0x1ED3678)
|
WidgetStatesOffset := uintptr(0x1EE2678)
|
||||||
|
|
||||||
// Waypoints
|
// Waypoints
|
||||||
WaypointTableOffset := uintptr(0x1D4D3C0)
|
WaypointTableOffset := uintptr(0x1D5C3C0)
|
||||||
|
|
||||||
// FPS
|
// FPS
|
||||||
fpsOffset := uintptr(0x1D4D394)
|
fpsOffset := uintptr(0x1D5C394)
|
||||||
|
|
||||||
// KeyBindings
|
// KeyBindings
|
||||||
keyBindingsOffset := uintptr(0x19C65B4)
|
keyBindingsOffset := uintptr(0x19D5594)
|
||||||
|
|
||||||
// KeyBindings Skills
|
// KeyBindings Skills
|
||||||
keyBindingsSkillsOffset := uintptr(0x1DEF110)
|
keyBindingsSkillsOffset := uintptr(0x1DFE100)
|
||||||
|
|
||||||
// QuestInfo
|
// QuestInfo
|
||||||
questInfoOffset := uintptr(0x1EB7CD8)
|
questInfoOffset := uintptr(0x1EC6CD8)
|
||||||
|
|
||||||
// Terror Zones
|
// Terror Zones
|
||||||
tzOffset := uintptr(0x25A5AB0)
|
tzOffset := uintptr(0x25B4990)
|
||||||
|
|
||||||
// Ping
|
// Ping
|
||||||
pingOffset := uintptr(0x1DEE468)
|
pingOffset := uintptr(0x1DFD460)
|
||||||
|
|
||||||
// LegacyGraphics
|
// LegacyGraphics
|
||||||
legacyGfxOffset := uintptr(0x1EB7E7E)
|
legacyGfxOffset := uintptr(0x1EC6E7E)
|
||||||
|
|
||||||
// CharData
|
// CharData
|
||||||
charDataOffset := uintptr(0x1DF25F8)
|
charDataOffset := uintptr(0x1E01710)
|
||||||
|
|
||||||
// Selected Char Name
|
// Selected Char Name
|
||||||
selectedCharNameOffset := uintptr(0x1D44195)
|
selectedCharNameOffset := uintptr(0x1D53195)
|
||||||
|
|
||||||
// Last Game Name
|
// Last Game Name
|
||||||
lastGameNameOffset := uintptr(0x25EE370)
|
lastGameNameOffset := uintptr(0x25FD2F0)
|
||||||
|
|
||||||
// Last Game Password
|
// Last Game Password
|
||||||
lastGamePasswordOffset := uintptr(0x25EE3C8)
|
lastGamePasswordOffset := uintptr(0x25FD348)
|
||||||
|
|
||||||
return Offset{
|
return Offset{
|
||||||
UnitTable: unitTableOffset,
|
UnitTable: unitTableOffset,
|
||||||
|
|||||||
@@ -212,7 +212,7 @@ func (gd *GameReader) getSkills(skillListPtr uintptr) map[skill.ID]skill.Points
|
|||||||
|
|
||||||
func (gd *GameReader) GetStates(statsListExPtr uintptr) state.States {
|
func (gd *GameReader) GetStates(statsListExPtr uintptr) state.States {
|
||||||
var states state.States
|
var states state.States
|
||||||
for i := 0; i < 6; i++ {
|
for i := 0; i < 8; i++ {
|
||||||
offset := i * 4
|
offset := i * 4
|
||||||
stateByte := gd.Process.ReadUInt(statsListExPtr+0xAF0+uintptr(offset), Uint32)
|
stateByte := gd.Process.ReadUInt(statsListExPtr+0xAF0+uintptr(offset), Uint32)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user