Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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-20250227150416-4204d68f233f
github.com/hectorgimenez/d2go v0.0.0-20250314185000-169a76515285
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 @@ -31,6 +31,8 @@ github.com/hectorgimenez/d2go v0.0.0-20250221161127-5455fd977276 h1:A4LnLo5dsLmU
github.com/hectorgimenez/d2go v0.0.0-20250221161127-5455fd977276/go.mod h1:EOVayMaK8D13wsZiZ6n8AK3+Qflm1wHZsCqnzlVIci0=
github.com/hectorgimenez/d2go v0.0.0-20250227150416-4204d68f233f h1:Qp4gJANcIkJJdnImJ9G1LRLqZh0gXnONm9awBEMEjPk=
github.com/hectorgimenez/d2go v0.0.0-20250227150416-4204d68f233f/go.mod h1:EOVayMaK8D13wsZiZ6n8AK3+Qflm1wHZsCqnzlVIci0=
github.com/hectorgimenez/d2go v0.0.0-20250314185000-169a76515285 h1:UOpB9azve0kdL5/E/qBT725Fft+fk33o0NUIP8GsFUo=
github.com/hectorgimenez/d2go v0.0.0-20250314185000-169a76515285/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
6 changes: 3 additions & 3 deletions internal/bot/single_supervisor.go
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ func (s *SinglePlayerSupervisor) HandleOutOfGameFlow() error {
for !s.bot.ctx.GameReader.IsInLobby() {

// Prevent an infinite loop
if retryCount >= 5 && !s.bot.ctx.Data.IsInLobby {
if retryCount >= 5 && !s.bot.ctx.GameReader.IsInLobby() {
return fmt.Errorf("failed to enter bnet lobby after 5 retries")
}

Expand Down Expand Up @@ -255,7 +255,7 @@ func (s *SinglePlayerSupervisor) HandleOutOfGameFlow() error {
utils.Sleep(1000)

for range 5 {
if s.bot.ctx.Data.IsInCharSelectionScreen && s.bot.ctx.GameReader.IsOnline() {
if s.bot.ctx.GameReader.IsInCharacterSelectionScreen() && s.bot.ctx.GameReader.IsOnline() {
break
}

Expand All @@ -266,7 +266,7 @@ func (s *SinglePlayerSupervisor) HandleOutOfGameFlow() error {
}
}

if !s.bot.ctx.Data.IsInCharSelectionScreen {
if !s.bot.ctx.GameReader.IsInCharacterSelectionScreen() {
return fmt.Errorf("failed to leave lobby or an unknown case occurred")
}

Expand Down
Loading