Documentation
¶
Index ¶
- Variables
- func GetBestRegexIntValue(srcStr string, patterns []*regexp.Regexp, matchIdx int) int
- func GetRegexIntValue(srcStr string, pattern *regexp.Regexp, matchIdx int) int
- func GetRegexStringValue(srcStr string, pattern *regexp.Regexp, matchIdx int) string
- func GetSchool(school string) proto.SpellSchool
- func ParseWagoDB(dbContents string) map[int32]WagoDbItem
- type BlizzardAuthResponse
- type BlizzardItemResponse
- type ClassMask
- type EnchantDBKey
- type FactionConfig
- type ItemResponse
- type Stats
- type TooltipManager
- type WagoDbItem
- type WeaponSkills
- type WowDatabase
- func (db *WowDatabase) AddItemIcon(id int32, tooltips map[int32]WowheadItemResponse)
- func (db *WowDatabase) AddRune(id int32, tooltip WowheadItemResponse)
- func (db *WowDatabase) AddShoulderRune(id int32, tooltip WowheadItemResponse)
- func (db *WowDatabase) AddSpellIcon(id int32, tooltips map[int32]WowheadItemResponse)
- func (db *WowDatabase) Clone() *WowDatabase
- func (db *WowDatabase) MergeEnchant(src *proto.UIEnchant)
- func (db *WowDatabase) MergeEnchants(arr []*proto.UIEnchant)
- func (db *WowDatabase) MergeFaction(src *proto.UIFaction)
- func (db *WowDatabase) MergeFactions(arr []*proto.UIFaction)
- func (db *WowDatabase) MergeItem(src *proto.UIItem)
- func (db *WowDatabase) MergeItems(arr []*proto.UIItem)
- func (db *WowDatabase) MergeNpc(src *proto.UINPC)
- func (db *WowDatabase) MergeNpcs(arr []*proto.UINPC)
- func (db *WowDatabase) MergeRune(src *proto.UIRune)
- func (db *WowDatabase) MergeRunes(arr []*proto.UIRune)
- func (db *WowDatabase) MergeSpellIcon(src *proto.IconData)
- func (db *WowDatabase) MergeSpellIcons(arr []*proto.IconData)
- func (db *WowDatabase) MergeZone(src *proto.UIZone)
- func (db *WowDatabase) MergeZones(arr []*proto.UIZone)
- func (db *WowDatabase) ToUIProto() *proto.UIDatabase
- func (db *WowDatabase) WriteBinary(binFilePath string)
- func (db *WowDatabase) WriteBinaryAndJson(binFilePath, jsonFilePath string)
- func (db *WowDatabase) WriteJson(jsonFilePath string)
- type WowheadDatabase
- type WowheadItem
- type WowheadItemResponse
- func (item WowheadItemResponse) GetArmorType() proto.ArmorType
- func (item WowheadItemResponse) GetArmorValues() (int, int)
- func (item WowheadItemResponse) GetHandType() proto.HandType
- func (item WowheadItemResponse) GetIcon() string
- func (item WowheadItemResponse) GetIntValue(pattern *regexp.Regexp) int
- func (item WowheadItemResponse) GetItemLevel() int
- func (item WowheadItemResponse) GetItemSetID() int
- func (item WowheadItemResponse) GetItemSetName() string
- func (item WowheadItemResponse) GetItemType() proto.ItemType
- func (item WowheadItemResponse) GetName() string
- func (item WowheadItemResponse) GetPeriodicBonusDamagePct() int32
- func (item WowheadItemResponse) GetPhase() int
- func (item WowheadItemResponse) GetPhysicalBonusDamage() float64
- func (item WowheadItemResponse) GetQuality() int
- func (item WowheadItemResponse) GetRangedWeaponType() proto.RangedWeaponType
- func (item WowheadItemResponse) GetRequiredClasses() []proto.Class
- func (item WowheadItemResponse) GetRequiredItemSlot() proto.ItemType
- func (item WowheadItemResponse) GetRequiredProfession() proto.Profession
- func (item WowheadItemResponse) GetRequiresLevel() int
- func (item WowheadItemResponse) GetSpellRank() int
- func (item WowheadItemResponse) GetStats() Stats
- func (item WowheadItemResponse) GetTooltipRegexString(pattern *regexp.Regexp, matchIdx int) string
- func (item WowheadItemResponse) GetTooltipRegexValue(pattern *regexp.Regexp, matchIdx int) int
- func (item WowheadItemResponse) GetUnique() bool
- func (item WowheadItemResponse) GetUniqueCategory() string
- func (item WowheadItemResponse) GetWeaponDamage() (float64, float64, proto.SpellSchool)
- func (item WowheadItemResponse) GetWeaponSkills() WeaponSkills
- func (item WowheadItemResponse) GetWeaponSpeed() float64
- func (item WowheadItemResponse) GetWeaponType() proto.WeaponType
- func (item WowheadItemResponse) HasBuff() bool
- func (item WowheadItemResponse) IsEquippable() bool
- func (item WowheadItemResponse) IsHeroic() bool
- func (item WowheadItemResponse) IsPattern() bool
- func (item WowheadItemResponse) IsRandomEnchant() bool
- func (item WowheadItemResponse) IsSanctified() bool
- func (item WowheadItemResponse) IsScalableArmorSlot() bool
- func (item WowheadItemResponse) IsTimeworn() bool
- func (item WowheadItemResponse) ToItemProto() *proto.UIItem
- func (item WowheadItemResponse) TooltipWithoutSetBonus() string
- type WowheadItemSource
- type WowheadItemStats
- type WowheadRandomSuffix
- type WowheadRandomSuffixStats
- type WowheadTooltipManager
Constants ¶
This section is empty.
Variables ¶
var AtlasLootPVPFactions = map[int]map[string]int32{
3277: {
"ALLIANCE": 890,
"HORDE": 889,
},
3358: {
"ALLIANCE": 509,
"HORDE": 510,
},
2597: {
"ALLIANCE": 730,
"HORDE": 729,
},
}
var AtlasLootProfessionIDs = map[int]proto.Profession{ 3: proto.Profession_Leatherworking, 5: proto.Profession_Blacksmithing, 6: proto.Profession_Leatherworking, 7: proto.Profession_Alchemy, 10: proto.Profession_Mining, 11: proto.Profession_Tailoring, 12: proto.Profession_Engineering, 13: proto.Profession_Enchanting, }
var AtlasLootRepLevels = map[string]proto.RepLevel{ "Hated": proto.RepLevel_RepLevelHated, "Hostile": proto.RepLevel_RepLevelHostile, "Unfriendly": proto.RepLevel_RepLevelUnfriendly, "Neutral": proto.RepLevel_RepLevelNeutral, "Friendly": proto.RepLevel_RepLevelFriendly, "Honored": proto.RepLevel_RepLevelHonored, "Revered": proto.RepLevel_RepLevelRevered, "Exalted": proto.RepLevel_RepLevelExalted, }
var DenyItemSetIds = []int{}/* 126 elements not displayed */
Data can easily be found here: https://www.wowhead.com/classic/item-sets#item-sets
var DenyListNameRegexes = []*regexp.Regexp{ regexp.MustCompile(`30 Epic`), regexp.MustCompile(`63 Blue`), regexp.MustCompile(`63 Green`), regexp.MustCompile(`66 Epic`), regexp.MustCompile(`90 Epic`), regexp.MustCompile(`90 Green`), regexp.MustCompile(`Boots 1`), regexp.MustCompile(`Boots 2`), regexp.MustCompile(`Boots 3`), regexp.MustCompile(`Bracer 1`), regexp.MustCompile(`Bracer 2`), regexp.MustCompile(`Bracer 3`), regexp.MustCompile(`DB\d`), regexp.MustCompile(`DEPRECATED`), regexp.MustCompile(`Deprecated: Keanna`), regexp.MustCompile(`Indalamar`), regexp.MustCompile(`Monster -`), regexp.MustCompile(`NEW`), regexp.MustCompile(`PH`), regexp.MustCompile(`QR XXXX`), regexp.MustCompile(`TEST`), regexp.MustCompile(`Test`), regexp.MustCompile(`zOLD`), }
If any of these match the item name, don't include it.
var EnchantOverrides = []*proto.UIEnchant{}/* 219 elements not displayed */
var ExtraItemIcons = []int32{
12662,
13180,
11566,
8956,
10646,
18641,
15993,
16040,
13928,
20452,
13931,
18254,
21023,
13813,
13810,
238637,
238638,
238639,
238641,
238642,
13510,
13511,
13512,
13513,
20079,
8412,
8423,
8424,
8411,
13452,
9187,
20007,
20004,
9088,
3389,
8951,
13445,
2458,
3825,
12451,
9206,
12460,
12820,
5206,
13454,
9264,
21546,
17708,
11564,
18284,
18269,
20709,
21114,
21151,
13444,
7676,
20748,
20749,
12404,
18262,
}
Item icons to include in the DB, so they don't need to be separately loaded in the UI.
var ItemAllowList = map[int32]struct{}{
14637: {},
22335: {},
22395: {},
221783: {},
20425: {},
20430: {},
20434: {},
20437: {},
20438: {},
20440: {},
20441: {},
20443: {},
238945: {},
}
Keep these sorted by item ID.
var ItemDenyList = map[int32]struct{}{
9449: {},
9653: {},
12104: {},
12798: {},
12805: {},
17782: {},
17783: {},
17802: {},
19169: {},
20522: {},
21198: {},
21199: {},
21200: {},
21203: {},
21204: {},
21205: {},
21208: {},
21209: {},
21210: {},
22589: {},
22630: {},
22631: {},
22678: {},
22691: {},
22736: {},
23207: {},
34576: {},
34577: {},
34578: {},
34579: {},
34580: {},
206382: {},
206387: {},
206954: {},
208689: {},
208849: {},
208851: {},
210195: {},
210534: {},
211472: {},
211501: {},
213513: {},
213594: {},
215116: {},
220915: {},
227444: {},
227843: {},
227954: {},
227966: {},
227977: {},
227989: {},
227995: {},
228498: {},
239010: {},
240195: {},
240936: {},
241082: {},
241123: {},
}
Keep these sorted by item ID.
var ItemOverrides = []*proto.UIItem{ {Id: 10019, Sources: []*proto.UIItemSource{{ Source: &proto.UIItemSource_Crafted{ Crafted: &proto.CraftedSource{ Profession: proto.Profession_Tailoring, SpellId: 3759, }, }, }}}, {Id: 217245, Sources: []*proto.UIItemSource{{Source: &proto.UIItemSource_Crafted{Crafted: &proto.CraftedSource{Profession: proto.Profession_Tailoring, SpellId: 439085}}}}}, {Id: 217246, Sources: []*proto.UIItemSource{{Source: &proto.UIItemSource_Crafted{Crafted: &proto.CraftedSource{Profession: proto.Profession_Tailoring, SpellId: 439086}}}}}, {Id: 217252, Sources: []*proto.UIItemSource{{Source: &proto.UIItemSource_Crafted{Crafted: &proto.CraftedSource{Profession: proto.Profession_Tailoring, SpellId: 439094}}}}}, {Id: 217257, Sources: []*proto.UIItemSource{{Source: &proto.UIItemSource_Crafted{Crafted: &proto.CraftedSource{Profession: proto.Profession_Tailoring, SpellId: 439102}}}}}, {Id: 217259, Sources: []*proto.UIItemSource{{Source: &proto.UIItemSource_Crafted{Crafted: &proto.CraftedSource{Profession: proto.Profession_Leatherworking, SpellId: 439105}}}}}, {Id: 217261, Sources: []*proto.UIItemSource{{Source: &proto.UIItemSource_Crafted{Crafted: &proto.CraftedSource{Profession: proto.Profession_Leatherworking, SpellId: 439108}}}}}, {Id: 217268, Sources: []*proto.UIItemSource{{Source: &proto.UIItemSource_Crafted{Crafted: &proto.CraftedSource{Profession: proto.Profession_Leatherworking, SpellId: 439116}}}}}, {Id: 217270, Sources: []*proto.UIItemSource{{Source: &proto.UIItemSource_Crafted{Crafted: &proto.CraftedSource{Profession: proto.Profession_Leatherworking, SpellId: 439118}}}}}, {Id: 217277, Sources: []*proto.UIItemSource{{Source: &proto.UIItemSource_Crafted{Crafted: &proto.CraftedSource{Profession: proto.Profession_Blacksmithing, SpellId: 439124}}}}}, {Id: 217279, Sources: []*proto.UIItemSource{{Source: &proto.UIItemSource_Crafted{Crafted: &proto.CraftedSource{Profession: proto.Profession_Blacksmithing, SpellId: 439126}}}}}, {Id: 217285, Sources: []*proto.UIItemSource{{Source: &proto.UIItemSource_Crafted{Crafted: &proto.CraftedSource{Profession: proto.Profession_Blacksmithing, SpellId: 439132}}}}}, {Id: 221457, RangedWeaponType: proto.RangedWeaponType_RangedWeaponTypeLibram}, {Id: 221464, RangedWeaponType: proto.RangedWeaponType_RangedWeaponTypeTotem}, {Id: 213343, Sources: []*proto.UIItemSource{ {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 80324, Name: "The Mad King"}}}, {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 80325, Name: "The Mad King"}}}, }}, {Id: 213344, Sources: []*proto.UIItemSource{ {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 80324, Name: "The Mad King"}}}, {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 80325, Name: "The Mad King"}}}, }}, {Id: 213345, Sources: []*proto.UIItemSource{ {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 80324, Name: "The Mad King"}}}, {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 80325, Name: "The Mad King"}}}, }}, {Id: 213346, Sources: []*proto.UIItemSource{ {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 80324, Name: "The Mad King"}}}, {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 80325, Name: "The Mad King"}}}, }}, {Id: 220626, Sources: []*proto.UIItemSource{ {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 82081, Name: "A Broken Ritual"}}}, {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 82083, Name: "A Broken Ritual"}}}, }}, {Id: 220627, Sources: []*proto.UIItemSource{ {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 82081, Name: "A Broken Ritual"}}}, {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 82083, Name: "A Broken Ritual"}}}, }}, {Id: 220628, Sources: []*proto.UIItemSource{ {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 82081, Name: "A Broken Ritual"}}}, {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 82083, Name: "A Broken Ritual"}}}, }}, {Id: 220629, Sources: []*proto.UIItemSource{ {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 82081, Name: "A Broken Ritual"}}}, {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 82083, Name: "A Broken Ritual"}}}, }}, {Id: 220630, Sources: []*proto.UIItemSource{ {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 82081, Name: "A Broken Ritual"}}}, {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 82083, Name: "A Broken Ritual"}}}, }}, { Id: 226545, Name: "Dalton's Horn", Icon: "inv_misc_horn_04", Ilvl: 60, RequiresLevel: 50, Phase: 4, Quality: proto.ItemQuality_ItemQualityEpic, ClassAllowlist: []proto.Class{proto.Class_ClassPaladin}, Type: proto.ItemType_ItemTypeRanged, RangedWeaponType: proto.RangedWeaponType_RangedWeaponTypeLibram, Stats: stats.Stats{stats.Intellect: 5}.ToFloatArray(), WeaponSkills: make([]float64, 16), Sources: []*proto.UIItemSource{ {Source: &proto.UIItemSource_Quest{Quest: &proto.QuestSource{Id: 84008, Name: "A Lesson in Grace"}}}, }, }, }
var OtherItemIdsToFetch = []string{}
var RuneOverrides = []*proto.UIRune{ {Id: 442893, ClassAllowlist: []proto.Class{proto.Class_ClassDruid, proto.Class_ClassMage, proto.Class_ClassHunter}}, {Id: 442876, ClassAllowlist: []proto.Class{proto.Class_ClassWarrior, proto.Class_ClassPaladin, proto.Class_ClassHunter, proto.Class_ClassShaman}}, {Id: 442887, ClassAllowlist: []proto.Class{proto.Class_ClassWarrior, proto.Class_ClassHunter, proto.Class_ClassRogue, proto.Class_ClassPriest, proto.Class_ClassShaman, proto.Class_ClassMage, proto.Class_ClassWarlock, proto.Class_ClassDruid}}, {Id: 459312, ClassAllowlist: []proto.Class{proto.Class_ClassWarrior, proto.Class_ClassPaladin, proto.Class_ClassRogue, proto.Class_ClassShaman, proto.Class_ClassWarlock, proto.Class_ClassDruid}}, {Id: 442894, ClassAllowlist: []proto.Class{proto.Class_ClassShaman, proto.Class_ClassMage, proto.Class_ClassWarlock, proto.Class_ClassHunter, proto.Class_ClassPriest}}, {Id: 442890, ClassAllowlist: []proto.Class{proto.Class_ClassWarrior, proto.Class_ClassHunter, proto.Class_ClassRogue, proto.Class_ClassShaman, proto.Class_ClassDruid}}, {Id: 442895, ClassAllowlist: []proto.Class{proto.Class_ClassShaman, proto.Class_ClassMage}}, {Id: 468758, ClassAllowlist: []proto.Class{proto.Class_ClassDruid, proto.Class_ClassMage, proto.Class_ClassPaladin, proto.Class_ClassPriest, proto.Class_ClassShaman}}, {Id: 442898, ClassAllowlist: []proto.Class{proto.Class_ClassPaladin, proto.Class_ClassPriest}}, {Id: 442881, ClassAllowlist: []proto.Class{proto.Class_ClassWarrior, proto.Class_ClassPaladin, proto.Class_ClassRogue, proto.Class_ClassPriest, proto.Class_ClassShaman, proto.Class_ClassDruid}}, {Id: 468762, ClassAllowlist: []proto.Class{proto.Class_ClassDruid, proto.Class_ClassHunter, proto.Class_ClassMage, proto.Class_ClassPaladin, proto.Class_ClassPriest, proto.Class_ClassShaman, proto.Class_ClassWarlock}}, {Id: 442896, ClassAllowlist: []proto.Class{proto.Class_ClassRogue, proto.Class_ClassShaman, proto.Class_ClassDruid}}, {Id: 442892, ClassAllowlist: []proto.Class{proto.Class_ClassWarrior, proto.Class_ClassPaladin, proto.Class_ClassHunter, proto.Class_ClassPriest, proto.Class_ClassShaman, proto.Class_ClassMage, proto.Class_ClassWarlock, proto.Class_ClassDruid}}, {Id: 442891, ClassAllowlist: []proto.Class{proto.Class_ClassWarrior, proto.Class_ClassHunter, proto.Class_ClassRogue}}, {Id: 442897, ClassAllowlist: []proto.Class{proto.Class_ClassPriest, proto.Class_ClassWarlock}}, {Id: 442813, ClassAllowlist: []proto.Class{proto.Class_ClassWarrior, proto.Class_ClassPaladin, proto.Class_ClassHunter, proto.Class_ClassRogue, proto.Class_ClassMage, proto.Class_ClassWarlock}}, {Id: 458393, Name: "Engrave Gloves - Cobra Slayer", Icon: "spell_nature_guardianward", Type: proto.ItemType_ItemTypeHands, ClassAllowlist: []proto.Class{proto.Class_ClassHunter}}, {Id: 29088, Name: "Engrave Ring - All Weapon Skills (Not Real)", Icon: "ability_hunter_swiftstrike", Type: proto.ItemType_ItemTypeFinger, ClassAllowlist: []proto.Class{proto.Class_ClassHunter, proto.Class_ClassPaladin, proto.Class_ClassRogue, proto.Class_ClassShaman, proto.Class_ClassWarrior}}, }
Overrides for runes as needed Regen db with "go run ./tools/database/gen_db -outDir=assets -gen=db" And ensure db files are copied from assets/db into dist/sod/database
Raid buffs / debuffs
var SoDVersionRegex = regexp.MustCompile(`115[0-9]+`)
var SpellIconoverrides = []*proto.IconData{
{Id: 415068, Name: "Exorcism (Rank 1)"},
{Id: 415069, Name: "Exorcism (Rank 2)"},
{Id: 415070, Name: "Exorcism (Rank 3)"},
{Id: 415071, Name: "Exorcism (Rank 4)"},
{Id: 415072, Name: "Exorcism (Rank 5)"},
{Id: 415073, Name: "Exorcism (Rank 6)"},
{Id: 403835, Name: "Shadow Cleave (Rank 1)"},
{Id: 403839, Name: "Shadow Cleave (Rank 2)"},
{Id: 403840, Name: "Shadow Cleave (Rank 3)"},
{Id: 403841, Name: "Shadow Cleave (Rank 4)"},
{Id: 403842, Name: "Shadow Cleave (Rank 5)"},
{Id: 403843, Name: "Shadow Cleave (Rank 6)"},
{Id: 403844, Name: "Shadow Cleave (Rank 7)"},
{Id: 403848, Name: "Shadow Cleave (Rank 8)"},
{Id: 403851, Name: "Shadow Cleave (Rank 9)"},
{Id: 403852, Name: "Shadow Cleave (Rank 10)"},
}
var WowheadProfessionIDs = map[int32]proto.Profession{ 164: proto.Profession_Blacksmithing, 165: proto.Profession_Leatherworking, 171: proto.Profession_Alchemy, 186: proto.Profession_Mining, 197: proto.Profession_Tailoring, 202: proto.Profession_Engineering, 333: proto.Profession_Enchanting, }
Functions ¶
func GetBestRegexIntValue ¶
func GetRegexIntValue ¶
func GetRegexStringValue ¶
func GetSchool ¶ added in v0.0.65
func GetSchool(school string) proto.SpellSchool
func ParseWagoDB ¶ added in v0.0.20
func ParseWagoDB(dbContents string) map[int32]WagoDbItem
Types ¶
type BlizzardAuthResponse ¶
type BlizzardAuthResponse struct {
AccessToken string `json:"access_token"`
}
type BlizzardItemResponse ¶
type BlizzardItemResponse struct {
ID int `json:"id"`
Name string `json:"name"`
Quality struct {
Type string `json:"type"`
} `json:"quality"`
ItemClass struct {
Id int `json:"id"`
} `json:"item_class"`
ItemSubclass struct {
Id int `json:"id"`
} `json:"item_subclass"`
InventoryType struct {
Type string `json:"type"`
} `json:"inventory_type"`
PreviewItem struct {
Armor struct {
Value int `json:"value"`
} `json:"armor"`
Stats []struct {
Type struct {
Type string `json:"type"`
} `json:"type"`
Value int `json:"value"`
} `json:"stats"`
} `json:"preview_item"`
}
There are more fields, these are just the ones we care about
func (BlizzardItemResponse) GetStatValue ¶
func (item BlizzardItemResponse) GetStatValue(statType string) int
type EnchantDBKey ¶
func EnchantToDBKey ¶
func EnchantToDBKey(enchant *proto.UIEnchant) EnchantDBKey
type FactionConfig ¶ added in v0.0.6
type ItemResponse ¶
type ItemResponse interface {
GetName() string
GetQuality() int
GetIcon() string
HasBuff() bool
TooltipWithoutSetBonus() string
GetTooltipRegexString(pattern *regexp.Regexp, matchIdx int) string
GetTooltipRegexValue(pattern *regexp.Regexp, matchIdx int) int
GetIntValue(pattern *regexp.Regexp) int
GetStats() Stats
GetWeaponSkills() []float64
IsEquippable() bool
GetItemLevel() int
GetRequiresLevel() int
GetRequiredClass() proto.Class
GetRequiredItemSlot() proto.ItemSlot
GetSpellRank() int
GetPhase() int
GetUnique() bool
GetItemType() proto.ItemType
GetArmorType() proto.ArmorType
GetWeaponType() proto.WeaponType
GetHandType() proto.HandType
GetRangedWeaponType() proto.RangedWeaponType
GetWeaponDamage() (float64, float64)
GetWeaponSpeed() float64
GetItemSetID() string
GetItemSetName() string
IsHeroic() bool
GetRequiredProfession() proto.Profession
}
type TooltipManager ¶
Generic class for fetching tooltip info from the web.
func (*TooltipManager) Fetch ¶
func (tm *TooltipManager) Fetch(minId, maxId int32, otherIds []string)
func (*TooltipManager) FetchFromWeb ¶
func (tm *TooltipManager) FetchFromWeb(idsToFetch []string) map[string]string
func (*TooltipManager) Read ¶
func (tm *TooltipManager) Read() map[int32]string
type WagoDbItem ¶ added in v0.0.20
type WagoDbItem struct {
FactionRestriction proto.UIItem_FactionRestriction
ItemSetID int32
}
type WeaponSkills ¶
type WeaponSkills [stats.WeaponSkillLen]float64
type WowDatabase ¶
type WowDatabase struct {
Items map[int32]*proto.UIItem
RandomSuffixes map[int32]*proto.ItemRandomSuffix
Enchants map[EnchantDBKey]*proto.UIEnchant
Runes map[int32]*proto.UIRune
Zones map[int32]*proto.UIZone
Npcs map[int32]*proto.UINPC
Factions map[int32]*proto.UIFaction
ItemIcons map[int32]*proto.IconData
SpellIcons map[int32]*proto.IconData
Encounters []*proto.PresetEncounter
}
func NewWowDatabase ¶
func NewWowDatabase() *WowDatabase
func ReadAtlasLootData ¶
func ReadAtlasLootData(inputsDir string) *WowDatabase
func ReadDatabaseFromJson ¶
func ReadDatabaseFromJson(jsonStr string) *WowDatabase
func (*WowDatabase) AddItemIcon ¶
func (db *WowDatabase) AddItemIcon(id int32, tooltips map[int32]WowheadItemResponse)
func (*WowDatabase) AddRune ¶
func (db *WowDatabase) AddRune(id int32, tooltip WowheadItemResponse)
func (*WowDatabase) AddShoulderRune ¶ added in v0.0.38
func (db *WowDatabase) AddShoulderRune(id int32, tooltip WowheadItemResponse)
func (*WowDatabase) AddSpellIcon ¶
func (db *WowDatabase) AddSpellIcon(id int32, tooltips map[int32]WowheadItemResponse)
func (*WowDatabase) Clone ¶
func (db *WowDatabase) Clone() *WowDatabase
func (*WowDatabase) MergeEnchant ¶
func (db *WowDatabase) MergeEnchant(src *proto.UIEnchant)
func (*WowDatabase) MergeEnchants ¶
func (db *WowDatabase) MergeEnchants(arr []*proto.UIEnchant)
func (*WowDatabase) MergeFaction ¶ added in v0.0.6
func (db *WowDatabase) MergeFaction(src *proto.UIFaction)
func (*WowDatabase) MergeFactions ¶ added in v0.0.6
func (db *WowDatabase) MergeFactions(arr []*proto.UIFaction)
func (*WowDatabase) MergeItem ¶
func (db *WowDatabase) MergeItem(src *proto.UIItem)
func (*WowDatabase) MergeItems ¶
func (db *WowDatabase) MergeItems(arr []*proto.UIItem)
func (*WowDatabase) MergeNpc ¶
func (db *WowDatabase) MergeNpc(src *proto.UINPC)
func (*WowDatabase) MergeNpcs ¶
func (db *WowDatabase) MergeNpcs(arr []*proto.UINPC)
func (*WowDatabase) MergeRune ¶
func (db *WowDatabase) MergeRune(src *proto.UIRune)
func (*WowDatabase) MergeRunes ¶
func (db *WowDatabase) MergeRunes(arr []*proto.UIRune)
func (*WowDatabase) MergeSpellIcon ¶ added in v0.0.7
func (db *WowDatabase) MergeSpellIcon(src *proto.IconData)
func (*WowDatabase) MergeSpellIcons ¶ added in v0.0.7
func (db *WowDatabase) MergeSpellIcons(arr []*proto.IconData)
func (*WowDatabase) MergeZone ¶
func (db *WowDatabase) MergeZone(src *proto.UIZone)
func (*WowDatabase) MergeZones ¶
func (db *WowDatabase) MergeZones(arr []*proto.UIZone)
func (*WowDatabase) ToUIProto ¶
func (db *WowDatabase) ToUIProto() *proto.UIDatabase
func (*WowDatabase) WriteBinary ¶
func (db *WowDatabase) WriteBinary(binFilePath string)
func (*WowDatabase) WriteBinaryAndJson ¶
func (db *WowDatabase) WriteBinaryAndJson(binFilePath, jsonFilePath string)
func (*WowDatabase) WriteJson ¶
func (db *WowDatabase) WriteJson(jsonFilePath string)
type WowheadDatabase ¶
type WowheadDatabase struct {
Items map[string]WowheadItem
RandomSuffixes map[string]WowheadRandomSuffix
}
func ParseWowheadDB ¶
func ParseWowheadDB(dbContents string) WowheadDatabase
type WowheadItem ¶
type WowheadItem struct {
ID int32 `json:"id"`
Name string `json:"name"`
Icon string `json:"icon"`
Version int32 `json:"versionNum"`
Quality int32 `json:"quality"`
Ilvl int32 `json:"itemLevel"`
Phase int32 `json:"contentPhase"`
RequiresLevel int32 `json:"requiredLevel"`
RaceMask uint16 `json:"raceMask"`
ClassMask uint16 `json:"classMask"`
Stats WowheadItemStats `json:"stats"`
RandomSuffixOptions []int32 `json:"randomEnchants"`
SourceTypes []int32 `json:"source"` // 1 = Crafted, 2 = Dropped by, 3 = sold by zone vendor? barely used, 4 = Quest, 5 = Sold by
SourceDetails []WowheadItemSource `json:"sourcemore"`
}
func (WowheadItem) ToProto ¶
func (wi WowheadItem) ToProto() *proto.UIItem
type WowheadItemResponse ¶
type WowheadItemResponse struct {
ID int32
Name string `json:"name"`
Quality int `json:"quality"`
Icon string `json:"icon"`
Tooltip string `json:"tooltip"`
Buff string `json:"buff"`
}
func NewWowheadItemResponse ¶
func NewWowheadItemResponse(id int32, tooltip string) WowheadItemResponse
func (WowheadItemResponse) GetArmorType ¶
func (item WowheadItemResponse) GetArmorType() proto.ArmorType
func (WowheadItemResponse) GetArmorValues ¶
func (item WowheadItemResponse) GetArmorValues() (int, int)
In Vanilla and TBC, both Armor and Bonus Armor scale with gear armor multipliers on all equipment.
func (WowheadItemResponse) GetHandType ¶
func (item WowheadItemResponse) GetHandType() proto.HandType
func (WowheadItemResponse) GetIcon ¶
func (item WowheadItemResponse) GetIcon() string
func (WowheadItemResponse) GetIntValue ¶
func (item WowheadItemResponse) GetIntValue(pattern *regexp.Regexp) int
func (WowheadItemResponse) GetItemLevel ¶
func (item WowheadItemResponse) GetItemLevel() int
func (WowheadItemResponse) GetItemSetID ¶ added in v0.0.14
func (item WowheadItemResponse) GetItemSetID() int
func (WowheadItemResponse) GetItemSetName ¶
func (item WowheadItemResponse) GetItemSetName() string
func (WowheadItemResponse) GetItemType ¶
func (item WowheadItemResponse) GetItemType() proto.ItemType
func (WowheadItemResponse) GetName ¶
func (item WowheadItemResponse) GetName() string
func (WowheadItemResponse) GetPeriodicBonusDamagePct ¶ added in v0.0.56
func (item WowheadItemResponse) GetPeriodicBonusDamagePct() int32
func (WowheadItemResponse) GetPhase ¶
func (item WowheadItemResponse) GetPhase() int
func (WowheadItemResponse) GetPhysicalBonusDamage ¶ added in v0.0.33
func (item WowheadItemResponse) GetPhysicalBonusDamage() float64
func (WowheadItemResponse) GetQuality ¶
func (item WowheadItemResponse) GetQuality() int
func (WowheadItemResponse) GetRangedWeaponType ¶
func (item WowheadItemResponse) GetRangedWeaponType() proto.RangedWeaponType
func (WowheadItemResponse) GetRequiredClasses ¶ added in v0.0.38
func (item WowheadItemResponse) GetRequiredClasses() []proto.Class
func (WowheadItemResponse) GetRequiredItemSlot ¶
func (item WowheadItemResponse) GetRequiredItemSlot() proto.ItemType
func (WowheadItemResponse) GetRequiredProfession ¶
func (item WowheadItemResponse) GetRequiredProfession() proto.Profession
func (WowheadItemResponse) GetRequiresLevel ¶
func (item WowheadItemResponse) GetRequiresLevel() int
func (WowheadItemResponse) GetSpellRank ¶
func (item WowheadItemResponse) GetSpellRank() int
func (WowheadItemResponse) GetStats ¶
func (item WowheadItemResponse) GetStats() Stats
func (WowheadItemResponse) GetTooltipRegexString ¶
func (item WowheadItemResponse) GetTooltipRegexString(pattern *regexp.Regexp, matchIdx int) string
func (WowheadItemResponse) GetTooltipRegexValue ¶
func (item WowheadItemResponse) GetTooltipRegexValue(pattern *regexp.Regexp, matchIdx int) int
func (WowheadItemResponse) GetUnique ¶
func (item WowheadItemResponse) GetUnique() bool
func (WowheadItemResponse) GetUniqueCategory ¶ added in v0.0.43
func (item WowheadItemResponse) GetUniqueCategory() string
func (WowheadItemResponse) GetWeaponDamage ¶
func (item WowheadItemResponse) GetWeaponDamage() (float64, float64, proto.SpellSchool)
Returns min/max of weapon damage
func (WowheadItemResponse) GetWeaponSkills ¶
func (item WowheadItemResponse) GetWeaponSkills() WeaponSkills
func (WowheadItemResponse) GetWeaponSpeed ¶
func (item WowheadItemResponse) GetWeaponSpeed() float64
func (WowheadItemResponse) GetWeaponType ¶
func (item WowheadItemResponse) GetWeaponType() proto.WeaponType
func (WowheadItemResponse) HasBuff ¶ added in v0.0.13
func (item WowheadItemResponse) HasBuff() bool
func (WowheadItemResponse) IsEquippable ¶
func (item WowheadItemResponse) IsEquippable() bool
func (WowheadItemResponse) IsHeroic ¶
func (item WowheadItemResponse) IsHeroic() bool
func (WowheadItemResponse) IsPattern ¶
func (item WowheadItemResponse) IsPattern() bool
func (WowheadItemResponse) IsRandomEnchant ¶
func (item WowheadItemResponse) IsRandomEnchant() bool
func (WowheadItemResponse) IsSanctified ¶ added in v0.0.40
func (item WowheadItemResponse) IsSanctified() bool
func (WowheadItemResponse) IsScalableArmorSlot ¶
func (item WowheadItemResponse) IsScalableArmorSlot() bool
func (WowheadItemResponse) IsTimeworn ¶ added in v0.0.32
func (item WowheadItemResponse) IsTimeworn() bool
func (WowheadItemResponse) ToItemProto ¶
func (item WowheadItemResponse) ToItemProto() *proto.UIItem
func (WowheadItemResponse) TooltipWithoutSetBonus ¶
func (item WowheadItemResponse) TooltipWithoutSetBonus() string
type WowheadItemSource ¶
type WowheadItemSource struct {
C int32 `json:"c"`
Name string `json:"n"` // Name of crafting spell
Icon string `json:"icon"` // Icon corresponding to the named entity
SkillID int32 `json:"s"` // Skill ID
EntityID int32 `json:"ti"` // Crafting Spell ID / NPC ID / ?? / Quest ID
ZoneID int32 `json:"z"` // Only for drop / sold by sources
}
type WowheadItemStats ¶
type WowheadItemStats struct {
Armor int32 `json:"armor"`
}
type WowheadRandomSuffix ¶
type WowheadRandomSuffix struct {
ID int32 `json:"id"`
Name string `json:"name"`
Stats WowheadRandomSuffixStats `json:"stats"`
EnchantIdList []int32 `json:"enchantIdList"`
}
func (WowheadRandomSuffix) ToProto ¶
func (wrs WowheadRandomSuffix) ToProto() *proto.ItemRandomSuffix
type WowheadRandomSuffixStats ¶
type WowheadRandomSuffixStats struct {
Armor int32 `json:"armor"`
Strength int32 `json:"str"`
Agility int32 `json:"agi"`
Stamina int32 `json:"sta"`
Intellect int32 `json:"int"`
Spirit int32 `json:"spi"`
SpellPower int32 `json:"spldmg"`
ArcanePower int32 `json:"arcsplpwr"`
FirePower int32 `json:"firsplpwr"`
FrostPower int32 `json:"frosplpwr"`
HolyPower int32 `json:"holsplpwr"`
NaturePower int32 `json:"natsplpwr"`
ShadowPower int32 `json:"shasplpwr"`
MeleeCrit int32 `json:"mlecritstrkpct"`
MP5 int32 `json:"manargn"`
AttackPower int32 `json:"mleatkpwr"`
RangedAttackPower int32 `json:"rgdatkpwr"`
Defense int32 `json:"def"`
Block int32 `json:"blockpct"`
Dodge int32 `json:"dodgepct"`
ArcaneResistance int32 `json:"arcres"`
FireResistance int32 `json:"firres"`
FrostResistance int32 `json:"frores"`
NatureResistance int32 `json:"natres"`
ShadowResistance int32 `json:"shares"`
Healing int32 `json:"splheal"`
}
type WowheadTooltipManager ¶
type WowheadTooltipManager struct {
TooltipManager
}
func NewWowheadItemTooltipManager ¶
func NewWowheadItemTooltipManager(filePath string) *WowheadTooltipManager
func NewWowheadSpellTooltipManager ¶
func NewWowheadSpellTooltipManager(filePath string) *WowheadTooltipManager
func (*WowheadTooltipManager) Read ¶
func (wtm *WowheadTooltipManager) Read() map[int32]WowheadItemResponse