Skip to content

Commit

Permalink
feature: reopen tp when coming back from town if in leader mode
Browse files Browse the repository at this point in the history
Use character cfg to check if we should attempt to reopenTP on return
  • Loading branch information
davidfvsilva committed Jan 22, 2025
1 parent 6d6f2b5 commit a91fd0a
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion internal/action/town.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ import (
"github.com/hectorgimenez/d2go/pkg/data/skill"
"github.com/hectorgimenez/koolo/internal/action/step"
"github.com/hectorgimenez/koolo/internal/context"
"github.com/hectorgimenez/koolo/internal/utils"
)

func PreRun(firstRun bool) error {
Expand Down Expand Up @@ -95,6 +96,12 @@ func InRunReturnTownRoutine() error {
ReviveMerc()
HireMerc()
Repair()


if (ctx.CharacterCfg.Companion.Leader) {
UsePortalInTown()
utils.Sleep(500)
return OpenTPIfLeader()
}

return UsePortalInTown()
}

0 comments on commit a91fd0a

Please sign in to comment.