ignore DoH/DoL

main
Zynh0722 2023-12-15 22:09:55 -08:00
parent b288f95b84
commit 7fa573613d
1 changed files with 18 additions and 3 deletions

21
main.go
View File

@ -2,12 +2,27 @@ package main
import (
"log"
"slices"
"github.com/karashiiro/bingode"
"github.com/xivapi/godestone/v2"
)
func main() {
ignore := []string{
"Carpenter",
"Blacksmith",
"Armorer",
"Goldsmith",
"Leatherworker",
"Weaver",
"Alchemist",
"Culinarian",
"Miner",
"Botanist",
"Fisher",
}
base_levels := make(map[string]int)
base_levels["Dark Knight"] = 30
@ -22,14 +37,14 @@ func main() {
s := godestone.NewScraper(bingode.New(), godestone.EN)
c, err := s.FetchCharacter(44540671)
c, err := s.FetchCharacter(29932586)
if err != nil {
log.Fatalln(err)
}
total := 0
for _, v := range c.ClassJobs {
if v.Name != "Scholar" {
if v.Name != "Scholar" && !slices.Contains(ignore[:], v.Name) {
base_level, ok := base_levels[v.Name]
if !ok {
base_level = 0
@ -38,5 +53,5 @@ func main() {
}
}
log.Println(total)
println(total)
}