update offset
This commit is contained in:
@@ -76,7 +76,7 @@ func (gd *GameReader) GetData() data.Data {
|
||||
|
||||
// Conditionally update monsters
|
||||
monsters := gd.cachedMonsters
|
||||
if now.Sub(gd.monstersLastUpdate) > 200*time.Millisecond {
|
||||
if now.Sub(gd.monstersLastUpdate) > 100*time.Millisecond {
|
||||
monsters = gd.Monsters(pu.Position, hover)
|
||||
gd.cachedMonsters = monsters
|
||||
gd.monstersLastUpdate = now
|
||||
@@ -88,7 +88,7 @@ func (gd *GameReader) GetData() data.Data {
|
||||
// Conditionally update inventory 500ms
|
||||
// Except when hovering over an item
|
||||
inventory := gd.cachedInventory
|
||||
if now.Sub(gd.inventoryLastUpdate) > 500*time.Millisecond ||
|
||||
if now.Sub(gd.inventoryLastUpdate) > 250*time.Millisecond ||
|
||||
(hover.IsHovered && hover.UnitType == 4) { // 4 = Item type
|
||||
inventory = gd.Inventory(rawPlayerUnits, merc, hover)
|
||||
gd.cachedInventory = inventory
|
||||
@@ -97,7 +97,7 @@ func (gd *GameReader) GetData() data.Data {
|
||||
|
||||
// Conditionally update objects
|
||||
objects := gd.cachedObjects
|
||||
if now.Sub(gd.objectsLastUpdate) > 200*time.Millisecond {
|
||||
if now.Sub(gd.objectsLastUpdate) > 100*time.Millisecond {
|
||||
objects = gd.Objects(pu.Position, hover)
|
||||
gd.cachedObjects = objects
|
||||
gd.objectsLastUpdate = now
|
||||
|
||||
Reference in New Issue
Block a user