Skip to content

Commit

Permalink
Small buffer to ensure items properly detected
Browse files Browse the repository at this point in the history
  • Loading branch information
elobo91 authored Dec 16, 2024
1 parent 357478b commit cc2fa92
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion internal/run/pindleskin.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package run

import (
"errors"
"time"

Check failure on line 5 in internal/run/pindleskin.go

View workflow job for this annotation

GitHub Actions / Build Koolo binary

"time" imported and not used

"github.com/hectorgimenez/d2go/pkg/data"
"github.com/hectorgimenez/d2go/pkg/data/area"
Expand All @@ -10,6 +11,7 @@ import (
"github.com/hectorgimenez/koolo/internal/action"
"github.com/hectorgimenez/koolo/internal/config"
"github.com/hectorgimenez/koolo/internal/context"
"github.com/hectorgimenez/koolo/internal/utils"
)

var fixedPlaceNearRedPortal = data.Position{
Expand Down Expand Up @@ -65,7 +67,15 @@ func (p Pindleskin) Run() error {
for _, npcData := range p.ctx.Data.Areas[area.NihlathaksTemple].NPCs {
if npcData.ID == npc.DefiledWarrior {
// Let the character implementation handle the actual attack
return p.ctx.Char.KillPindle()
err := p.ctx.Char.KillPindle()
if err != nil {
return err
}

// Add small delay to ensure items are detected
utils.Sleep(200)

return nil
}
}

Expand Down

0 comments on commit cc2fa92

Please sign in to comment.