Merge branch 'kwader2k:main' into main
This commit is contained in:
@@ -50,6 +50,9 @@ type KeyBindings struct {
|
||||
ClearMessages KeyBinding
|
||||
Zoom KeyBinding
|
||||
LegacyToggle KeyBinding
|
||||
|
||||
PreviousStashPage KeyBinding
|
||||
NextStashPage KeyBinding
|
||||
}
|
||||
|
||||
type KeyBinding struct {
|
||||
|
||||
@@ -317,7 +317,7 @@ func (gd *GameReader) InCharacterSelectionScreen() bool {
|
||||
}
|
||||
|
||||
func (gd *GameReader) GetSelectedCharacterName() string {
|
||||
return gd.Process.ReadStringFromMemory(gd.Process.moduleBaseAddressPtr+0x20C3FF4, 0)
|
||||
return gd.Process.ReadStringFromMemory(gd.Process.moduleBaseAddressPtr+0x2120FF4, 0)
|
||||
}
|
||||
|
||||
func (gd *GameReader) LegacyGraphics() bool {
|
||||
@@ -437,11 +437,11 @@ func (gd *GameReader) IsDismissableModalPresent() (bool, string) {
|
||||
}
|
||||
|
||||
func (gd *GameReader) LastGameName() string {
|
||||
return gd.ReadStringFromMemory(gd.moduleBaseAddressPtr+0x25113A8, 0)
|
||||
return gd.ReadStringFromMemory(gd.moduleBaseAddressPtr+0x29FB450, 0)
|
||||
}
|
||||
|
||||
func (gd *GameReader) LastGamePass() string {
|
||||
return gd.ReadStringFromMemory(gd.moduleBaseAddressPtr+0x2511408, 0)
|
||||
return gd.ReadStringFromMemory(gd.moduleBaseAddressPtr+0x29FB4A8, 0)
|
||||
}
|
||||
|
||||
func (gd *GameReader) FPS() int {
|
||||
|
||||
@@ -8,7 +8,7 @@ import (
|
||||
)
|
||||
|
||||
func (gd *GameReader) GetKeyBindings() data.KeyBindings {
|
||||
blob := gd.ReadBytesFromMemory(gd.moduleBaseAddressPtr+0x1D87CC4, 0x500)
|
||||
blob := gd.ReadBytesFromMemory(gd.moduleBaseAddressPtr+0x1DE4CC4, 0x500)
|
||||
blobSkills := gd.ReadBytesFromMemory(gd.offset.KeyBindingsSkillsOffset, 0x500)
|
||||
|
||||
skillsKB := [16]data.SkillBinding{}
|
||||
@@ -199,5 +199,13 @@ func (gd *GameReader) GetKeyBindings() data.KeyBindings {
|
||||
Key1: [2]byte{blob[0x488], blob[0x489]},
|
||||
Key2: [2]byte{blob[0x492], blob[0x493]},
|
||||
},
|
||||
PreviousStashPage: data.KeyBinding{
|
||||
Key1: [2]byte{blob[0x4c4], blob[0x4c5]},
|
||||
Key2: [2]byte{blob[0x4ce], blob[0x4cf]},
|
||||
},
|
||||
NextStashPage: data.KeyBinding{
|
||||
Key1: [2]byte{blob[0x4d8], blob[0x4d9]},
|
||||
Key2: [2]byte{blob[0x4e2], blob[0x4e3]},
|
||||
},
|
||||
}
|
||||
}
|
||||
|
||||
@@ -98,7 +98,7 @@ func calculateOffsets(process *Process) Offset {
|
||||
questInfoOffset := pattern - process.moduleBaseAddressPtr + 7 + questInfoOffsetPtr
|
||||
|
||||
// Terror Zones
|
||||
tzOffset := uintptr(0x2955E20)
|
||||
tzOffset := uintptr(0x29B2DF0)
|
||||
|
||||
// Quest Bytes Data
|
||||
pattern = process.FindPattern(memory, "\x42\xc6\x84\x28\x00\x00\x00\x00\x00\x49\xff\xc5\x49\x83\xfd\x29", "xxxx?????xxxxxxx")
|
||||
|
||||
@@ -252,7 +252,17 @@ func (r Rule) Evaluate(it data.Item) (RuleResult, error) {
|
||||
case "name":
|
||||
stage1Props["name"] = it.ID
|
||||
case "flag":
|
||||
stage1Props["flag"] = map[bool]int{true: 1, false: 0}[it.Ethereal]
|
||||
// 0x400000 (eth) | 0x4000000 (runeword) kolbot style
|
||||
currentFlag := 0
|
||||
|
||||
if it.Ethereal {
|
||||
currentFlag |= 0x400000
|
||||
}
|
||||
if it.IsRuneword {
|
||||
currentFlag |= 0x4000000
|
||||
}
|
||||
|
||||
stage1Props["flag"] = currentFlag
|
||||
case "prefix":
|
||||
if it.Affixes.Rare.Prefix != 0 {
|
||||
stage1Props["prefix"] = int(it.Affixes.Rare.Prefix)
|
||||
@@ -439,7 +449,16 @@ func replaceStringPropertiesInStage1(stage1 string) (string, error) {
|
||||
case "name":
|
||||
replaceWith = strings.ReplaceAll(prop[0], prop[4], fmt.Sprintf("%d", item.GetIDByName(prop[4])))
|
||||
case "flag":
|
||||
replaceWith = strings.ReplaceAll(prop[0], prop[4], fmt.Sprintf("%d", 1))
|
||||
val := 0
|
||||
switch strings.ToLower(prop[4]) {
|
||||
case "runeword":
|
||||
val = 0x4000000
|
||||
case "ethereal":
|
||||
val = 0x400000
|
||||
default:
|
||||
val = 1
|
||||
}
|
||||
replaceWith = strings.ReplaceAll(prop[0], prop[4], fmt.Sprintf("%d", val))
|
||||
case "prefix", "suffix":
|
||||
// Handle prefix/suffix IDs
|
||||
replaceWith = strings.ReplaceAll(prop[0], prop[4], prop[4])
|
||||
|
||||
Reference in New Issue
Block a user