Skip to content

Commit

Permalink
Merge pull request #3459 from jarveson/jake/hide-unavailable-items
Browse files Browse the repository at this point in the history
db: hide unavailable items
  • Loading branch information
jarveson authored Aug 14, 2023
2 parents dd39296 + 3cf8874 commit db4018d
Show file tree
Hide file tree
Showing 8 changed files with 1,503 additions and 2,100 deletions.
Binary file modified assets/database/db.bin
Binary file not shown.
400 changes: 182 additions & 218 deletions assets/database/db.json

Large diffs are not rendered by default.

Binary file modified assets/database/leftover_db.bin
Binary file not shown.
578 changes: 1 addition & 577 deletions assets/database/leftover_db.json

Large diffs are not rendered by default.

2,608 changes: 1,304 additions & 1,304 deletions assets/db_inputs/wowhead_gearplannerdb.txt

Large diffs are not rendered by default.

8 changes: 7 additions & 1 deletion tools/database/gen_db/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ import (
"fmt"
"log"
"os"
"strconv"
"strings"

"github.com/wowsims/wotlk/sim"
Expand Down Expand Up @@ -75,7 +76,12 @@ func main() {

for _, response := range itemTooltips {
if response.IsEquippable() {
db.MergeItem(response.ToItemProto())
// Only included items that are in wowheads gearplanner db
// Wowhead doesnt seem to have a field/flag to signify 'not available / in game' but their gearplanner db has them filtered
item := response.ToItemProto()
if _, ok := wowheadDB.Items[strconv.Itoa(int(item.Id))]; ok {
db.MergeItem(item)
}
} else if response.IsGem() {
db.MergeGem(response.ToGemProto())
}
Expand Down
6 changes: 6 additions & 0 deletions tools/database/overrides.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,6 +264,12 @@ var ItemDenyList = map[int32]struct{}{
34578: {}, // Battlemaster's Determination
34579: {}, // Battlemaster's Audacity
34580: {}, // Battlemaster's Perseverence

// '10 man' onyxia head rewards
49312: {},
49313: {},
49314: {},

50251: {}, // 'one hand shadows edge'
53500: {}, // Tectonic Plate

Expand Down
3 changes: 3 additions & 0 deletions tools/database/wowhead_db.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ package database

import (
"encoding/json"
"fmt"
"log"
"strings"

Expand Down Expand Up @@ -50,6 +51,8 @@ func ParseWowheadDB(dbContents string) WowheadDatabase {
}
}

fmt.Printf("\n--\nWowhead DB items loaded: %d\n--\n", len(wowheadDB.Items))

return wowheadDB
}

Expand Down

0 comments on commit db4018d

Please sign in to comment.