Skip to content

Commit

Permalink
Buff and Corpse fixes (#551)
Browse files Browse the repository at this point in the history
  • Loading branch information
artosimonyan authored Dec 7, 2024
1 parent f0e0fcb commit 279ee74
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 1 deletion.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ require (
github.com/bwmarrin/discordgo v0.28.1
github.com/go-telegram-bot-api/telegram-bot-api/v5 v5.5.1
github.com/gorilla/websocket v1.5.3
github.com/hectorgimenez/d2go v0.0.0-20241207062615-aecd76dcb779
github.com/hectorgimenez/d2go v0.0.0-20241207223919-823a0a05b094
github.com/inkeliz/gowebview v1.0.1
github.com/lxn/win v0.0.0-20210218163916-a377121e959e
github.com/otiai10/copy v1.14.0
Expand Down
2 changes: 2 additions & 0 deletions go.sum
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,8 @@ github.com/hectorgimenez/d2go v0.0.0-20241206181459-bd7e8656b856 h1:Ly5ITqzXGTV9
github.com/hectorgimenez/d2go v0.0.0-20241206181459-bd7e8656b856/go.mod h1:EOVayMaK8D13wsZiZ6n8AK3+Qflm1wHZsCqnzlVIci0=
github.com/hectorgimenez/d2go v0.0.0-20241207062615-aecd76dcb779 h1:g/1WvtIuNeDlz4b0LmS3gWJQh2umeh0yyFju1R4bl/k=
github.com/hectorgimenez/d2go v0.0.0-20241207062615-aecd76dcb779/go.mod h1:EOVayMaK8D13wsZiZ6n8AK3+Qflm1wHZsCqnzlVIci0=
github.com/hectorgimenez/d2go v0.0.0-20241207223919-823a0a05b094 h1:PejzsBQctNYzzOWW/rSj566S5XKd6Jtu4nxPuSL0JeY=
github.com/hectorgimenez/d2go v0.0.0-20241207223919-823a0a05b094/go.mod h1:EOVayMaK8D13wsZiZ6n8AK3+Qflm1wHZsCqnzlVIci0=
github.com/inkeliz/gowebview v1.0.1 h1:4gpLE2qt4kV3DB+xHkHKUeLLiGPN5Xw3or9A3hVqYyA=
github.com/inkeliz/gowebview v1.0.1/go.mod h1:4SNjXp/fogE11MwvJD67kMBmSObY2BBqinEgH8+8eM8=
github.com/inkeliz/w32 v1.0.2 h1:Es8Bmw9ApOY0PVRpGs7wsqIKdK5C3xBkP5TOATfVmtU=
Expand Down
9 changes: 9 additions & 0 deletions internal/action/buff.go
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,15 @@ func Buff() {
return
}

// Check if we're in loading screen
if ctx.Data.OpenMenus.LoadingScreen {
ctx.Logger.Debug("Loading screen detected. Waiting for game to load before buffing...")
ctx.WaitForGameToLoad()

// Give it half a second more
utils.Sleep(500)
}

preKeys := make([]data.KeyBinding, 0)
for _, buff := range ctx.Char.PreCTABuffSkills() {
kb, found := ctx.Data.KeyBindings.KeyBindingForSkill(buff)
Expand Down

0 comments on commit 279ee74

Please sign in to comment.