ignore DoH/DoL

This commit is contained in:
Zynh0722 2023-12-15 22:09:55 -08:00
parent b288f95b84
commit 7fa573613d

21
main.go
View file

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