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
- type BlizzardAuthResponse
- type BlizzardItemResponse
- type EnchantDBKey
- type ItemResponse
- type Stats
- type TooltipManager
- type WotlkItemResponse
- func (item WotlkItemResponse) GetArmorType() proto.ArmorType
- func (item WotlkItemResponse) GetClassAllowlist() []proto.Class
- func (item WotlkItemResponse) GetGemSockets() []proto.GemColor
- func (item WotlkItemResponse) GetGemStats() Stats
- func (item WotlkItemResponse) GetHandType() proto.HandType
- func (item WotlkItemResponse) GetIcon() string
- func (item WotlkItemResponse) GetIntValue(pattern *regexp.Regexp) int
- func (item WotlkItemResponse) GetItemLevel() int
- func (item WotlkItemResponse) GetItemSetName() string
- func (item WotlkItemResponse) GetItemType() proto.ItemType
- func (item WotlkItemResponse) GetName() string
- func (item WotlkItemResponse) GetPhase() int
- func (item WotlkItemResponse) GetQuality() int
- func (item WotlkItemResponse) GetRangedWeaponType() proto.RangedWeaponType
- func (item WotlkItemResponse) GetRequiredProfession() proto.Profession
- func (item WotlkItemResponse) GetSocketBonus() Stats
- func (item WotlkItemResponse) GetSocketColor() proto.GemColor
- func (item WotlkItemResponse) GetStats() Stats
- func (item WotlkItemResponse) GetTooltipRegexString(pattern *regexp.Regexp, matchIdx int) string
- func (item WotlkItemResponse) GetTooltipRegexValue(pattern *regexp.Regexp, matchIdx int) int
- func (item WotlkItemResponse) GetUnique() bool
- func (item WotlkItemResponse) GetWeaponDamage() (float64, float64)
- func (item WotlkItemResponse) GetWeaponSpeed() float64
- func (item WotlkItemResponse) GetWeaponType() proto.WeaponType
- func (item WotlkItemResponse) IsEquippable() bool
- func (item WotlkItemResponse) IsHeroic() bool
- func (item WotlkItemResponse) IsPattern() bool
- func (item WotlkItemResponse) IsRandomEnchant() bool
- func (item WotlkItemResponse) TooltipWithoutSetBonus() string
- type WotlkTooltipManager
- type WowDatabase
- func (db *WowDatabase) AddItemIcon(id int32, tooltips map[int32]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) MergeGem(src *proto.UIGem)
- func (db *WowDatabase) MergeGems(arr []*proto.UIGem)
- func (db *WowDatabase) MergeItem(src *proto.UIItem)
- func (db *WowDatabase) MergeItems(arr []*proto.UIItem)
- func (db *WowDatabase) WriteBinaryAndJson(binFilePath, jsonFilePath string)
- type WowheadItemResponse
- func (item WowheadItemResponse) GetArmorType() proto.ArmorType
- func (item WowheadItemResponse) GetClassAllowlist() []proto.Class
- func (item WowheadItemResponse) GetGemSockets() []proto.GemColor
- func (item WowheadItemResponse) GetGemStats() Stats
- 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) GetItemSetName() string
- func (item WowheadItemResponse) GetItemType() proto.ItemType
- func (item WowheadItemResponse) GetName() string
- func (item WowheadItemResponse) GetPhase() int
- func (item WowheadItemResponse) GetQuality() int
- func (item WowheadItemResponse) GetRangedWeaponType() proto.RangedWeaponType
- func (item WowheadItemResponse) GetRequiredProfession() proto.Profession
- func (item WowheadItemResponse) GetSocketBonus() Stats
- func (item WowheadItemResponse) GetSocketColor() proto.GemColor
- 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) GetWeaponDamage() (float64, float64)
- func (item WowheadItemResponse) GetWeaponSpeed() float64
- func (item WowheadItemResponse) GetWeaponType() proto.WeaponType
- func (item WowheadItemResponse) IsEquippable() bool
- func (item WowheadItemResponse) IsGem() bool
- func (item WowheadItemResponse) IsHeroic() bool
- func (item WowheadItemResponse) IsPattern() bool
- func (item WowheadItemResponse) IsRandomEnchant() bool
- func (item WowheadItemResponse) ToGemProto() *proto.UIGem
- func (item WowheadItemResponse) ToItemProto() *proto.UIItem
- func (item WowheadItemResponse) TooltipWithoutSetBonus() string
- type WowheadTooltipManager
Constants ¶
This section is empty.
Variables ¶
View Source
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.
View Source
var EnchantOverrides = []*proto.UIEnchant{}/* 223 elements not displayed */
View Source
var ExtraItemIcons = []int32{
33874,
43005,
41174,
41196,
12662,
27655,
27657,
27658,
27664,
33052,
33825,
33872,
34753,
34754,
34756,
34758,
34767,
34769,
42994,
42995,
42996,
42998,
42999,
43000,
43015,
13512,
22851,
22853,
22854,
22861,
22866,
33208,
40079,
44939,
46376,
46377,
46378,
46379,
40072,
40078,
40097,
40109,
44328,
44332,
13452,
13454,
22824,
22827,
22831,
22833,
22834,
22835,
22840,
28103,
28104,
31679,
32062,
32067,
32068,
39666,
40068,
40070,
40073,
40076,
44325,
44327,
44329,
44330,
44331,
9088,
9224,
13442,
20520,
22105,
22788,
22828,
22832,
22837,
22838,
22839,
22849,
31677,
33447,
33448,
40093,
40211,
40212,
40536,
40771,
41119,
42641,
43231,
43233,
43235,
7676,
}
Item icons to include in the DB, so they don't need to be separately loaded in the UI.
View Source
var GemDenyList = map[int32]struct{}{
32735: struct{}{},
35489: struct{}{},
38545: struct{}{},
38546: struct{}{},
38547: struct{}{},
38548: struct{}{},
38549: struct{}{},
38550: struct{}{},
}
View Source
var GemOverrides = []*proto.UIGem{ {Id: 33131, Stats: stats.Stats{stats.AttackPower: 32, stats.RangedAttackPower: 32}.ToFloatArray()}, }
Allows manual overriding for Gem fields in case WowHead is wrong.
View Source
var ItemAllowList = map[int32]struct{}{
11815: {},
12590: {},
15808: {},
18843: {},
18844: {},
18847: {},
18848: {},
19019: {},
19808: {},
20837: {},
20966: {},
24114: {},
28572: {},
28830: {},
29383: {},
29387: {},
29994: {},
29996: {},
30032: {},
30627: {},
30720: {},
32387: {},
32658: {},
33135: {},
33140: {},
33143: {},
33144: {},
33504: {},
33506: {},
33507: {},
33510: {},
33829: {},
33831: {},
34472: {},
34473: {},
37032: {},
37574: {},
38072: {},
38212: {},
38287: {},
38289: {},
39208: {},
41752: {},
6360: {},
8345: {},
9449: {},
27510: {},
27802: {},
27909: {},
28231: {},
28349: {},
15056: {},
15057: {},
15058: {},
21278: {},
43068: {},
43069: {},
43070: {},
43071: {},
43072: {},
43073: {},
43074: {},
43075: {},
43076: {},
43077: {},
43078: {},
43079: {},
43080: {},
43081: {},
43082: {},
43083: {},
}
Keep these sorted by item ID.
View Source
var ItemDenyList = map[int32]struct{}{
17782: {},
17783: {},
17802: {},
18582: {},
18583: {},
18584: {},
24265: {},
32384: {},
32421: {},
32422: {},
33482: {},
33350: {},
34576: {},
34577: {},
34578: {},
34579: {},
34580: {},
50251: {},
53500: {},
}
Keep these sorted by item ID.
View Source
var ItemOverrides = []*proto.UIItem{}/* 108 elements not displayed */
Functions ¶
func GetBestRegexIntValue ¶
func GetRegexIntValue ¶
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 ItemResponse ¶
type ItemResponse interface { GetName() string GetQuality() int GetIcon() string TooltipWithoutSetBonus() string GetTooltipRegexString(pattern *regexp.Regexp, matchIdx int) string GetTooltipRegexValue(pattern *regexp.Regexp, matchIdx int) int GetIntValue(pattern *regexp.Regexp) int GetStats() Stats GetClassAllowlist() []proto.Class IsEquippable() bool GetItemLevel() 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 GetGemSockets() []proto.GemColor GetSocketBonus() Stats GetSocketColor() proto.GemColor GetGemStats() Stats 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)
func (*TooltipManager) Read ¶
func (tm *TooltipManager) Read() map[int32]string
type WotlkItemResponse ¶
type WotlkItemResponse struct { ID int32 Name string `json:"name"` Quality int `json:"quality"` Icon string `json:"icon"` Tooltip string `json:"tooltip"` }
func NewWotlkItemResponse ¶
func NewWotlkItemResponse(id int32, tooltip string) WotlkItemResponse
func (WotlkItemResponse) GetArmorType ¶
func (item WotlkItemResponse) GetArmorType() proto.ArmorType
func (WotlkItemResponse) GetClassAllowlist ¶
func (item WotlkItemResponse) GetClassAllowlist() []proto.Class
func (WotlkItemResponse) GetGemSockets ¶
func (item WotlkItemResponse) GetGemSockets() []proto.GemColor
func (WotlkItemResponse) GetGemStats ¶
func (item WotlkItemResponse) GetGemStats() Stats
func (WotlkItemResponse) GetHandType ¶
func (item WotlkItemResponse) GetHandType() proto.HandType
func (WotlkItemResponse) GetIcon ¶
func (item WotlkItemResponse) GetIcon() string
func (WotlkItemResponse) GetIntValue ¶
func (item WotlkItemResponse) GetIntValue(pattern *regexp.Regexp) int
func (WotlkItemResponse) GetItemLevel ¶
func (item WotlkItemResponse) GetItemLevel() int
func (WotlkItemResponse) GetItemSetName ¶
func (item WotlkItemResponse) GetItemSetName() string
func (WotlkItemResponse) GetItemType ¶
func (item WotlkItemResponse) GetItemType() proto.ItemType
func (WotlkItemResponse) GetName ¶
func (item WotlkItemResponse) GetName() string
func (WotlkItemResponse) GetPhase ¶
func (item WotlkItemResponse) GetPhase() int
WOTLK DB has no phase info
func (WotlkItemResponse) GetQuality ¶
func (item WotlkItemResponse) GetQuality() int
func (WotlkItemResponse) GetRangedWeaponType ¶
func (item WotlkItemResponse) GetRangedWeaponType() proto.RangedWeaponType
func (WotlkItemResponse) GetRequiredProfession ¶
func (item WotlkItemResponse) GetRequiredProfession() proto.Profession
func (WotlkItemResponse) GetSocketBonus ¶
func (item WotlkItemResponse) GetSocketBonus() Stats
func (WotlkItemResponse) GetSocketColor ¶
func (item WotlkItemResponse) GetSocketColor() proto.GemColor
func (WotlkItemResponse) GetStats ¶
func (item WotlkItemResponse) GetStats() Stats
func (WotlkItemResponse) GetTooltipRegexString ¶
func (item WotlkItemResponse) GetTooltipRegexString(pattern *regexp.Regexp, matchIdx int) string
func (WotlkItemResponse) GetTooltipRegexValue ¶
func (item WotlkItemResponse) GetTooltipRegexValue(pattern *regexp.Regexp, matchIdx int) int
func (WotlkItemResponse) GetUnique ¶
func (item WotlkItemResponse) GetUnique() bool
func (WotlkItemResponse) GetWeaponDamage ¶
func (item WotlkItemResponse) GetWeaponDamage() (float64, float64)
Returns min/max of weapon damage
func (WotlkItemResponse) GetWeaponSpeed ¶
func (item WotlkItemResponse) GetWeaponSpeed() float64
func (WotlkItemResponse) GetWeaponType ¶
func (item WotlkItemResponse) GetWeaponType() proto.WeaponType
func (WotlkItemResponse) IsEquippable ¶
func (item WotlkItemResponse) IsEquippable() bool
func (WotlkItemResponse) IsHeroic ¶
func (item WotlkItemResponse) IsHeroic() bool
func (WotlkItemResponse) IsPattern ¶
func (item WotlkItemResponse) IsPattern() bool
func (WotlkItemResponse) IsRandomEnchant ¶
func (item WotlkItemResponse) IsRandomEnchant() bool
func (WotlkItemResponse) TooltipWithoutSetBonus ¶
func (item WotlkItemResponse) TooltipWithoutSetBonus() string
type WotlkTooltipManager ¶
type WotlkTooltipManager struct {
TooltipManager
}
func NewWotlkItemTooltipManager ¶
func NewWotlkItemTooltipManager(filePath string) *WotlkTooltipManager
func (*WotlkTooltipManager) Read ¶
func (wtm *WotlkTooltipManager) Read() map[int32]WotlkItemResponse
type WowDatabase ¶
type WowDatabase struct { Items map[int32]*proto.UIItem Enchants map[EnchantDBKey]*proto.UIEnchant Gems map[int32]*proto.UIGem ItemIcons map[int32]*proto.IconData SpellIcons map[int32]*proto.IconData Encounters []*proto.PresetEncounter }
func NewWowDatabase ¶
func NewWowDatabase() *WowDatabase
func (*WowDatabase) AddItemIcon ¶
func (db *WowDatabase) AddItemIcon(id int32, tooltips map[int32]WowheadItemResponse)
func (*WowDatabase) AddSpellIcon ¶
func (db *WowDatabase) AddSpellIcon(id int32, tooltips map[int32]WowheadItemResponse)
func (*WowDatabase) Clone ¶ added in v0.1.6
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) MergeGem ¶
func (db *WowDatabase) MergeGem(src *proto.UIGem)
func (*WowDatabase) MergeGems ¶
func (db *WowDatabase) MergeGems(arr []*proto.UIGem)
func (*WowDatabase) MergeItem ¶
func (db *WowDatabase) MergeItem(src *proto.UIItem)
func (*WowDatabase) MergeItems ¶
func (db *WowDatabase) MergeItems(arr []*proto.UIItem)
func (*WowDatabase) WriteBinaryAndJson ¶
func (db *WowDatabase) WriteBinaryAndJson(binFilePath, jsonFilePath string)
type WowheadItemResponse ¶
type WowheadItemResponse struct { ID int32 Name string `json:"name"` Quality int `json:"quality"` Icon string `json:"icon"` Tooltip string `json:"tooltip"` }
func NewWowheadItemResponse ¶
func NewWowheadItemResponse(id int32, tooltip string) WowheadItemResponse
func (WowheadItemResponse) GetArmorType ¶
func (item WowheadItemResponse) GetArmorType() proto.ArmorType
func (WowheadItemResponse) GetClassAllowlist ¶
func (item WowheadItemResponse) GetClassAllowlist() []proto.Class
func (WowheadItemResponse) GetGemSockets ¶
func (item WowheadItemResponse) GetGemSockets() []proto.GemColor
func (WowheadItemResponse) GetGemStats ¶
func (item WowheadItemResponse) GetGemStats() Stats
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) 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) GetPhase ¶
func (item WowheadItemResponse) GetPhase() int
func (WowheadItemResponse) GetQuality ¶
func (item WowheadItemResponse) GetQuality() int
func (WowheadItemResponse) GetRangedWeaponType ¶
func (item WowheadItemResponse) GetRangedWeaponType() proto.RangedWeaponType
func (WowheadItemResponse) GetRequiredProfession ¶
func (item WowheadItemResponse) GetRequiredProfession() proto.Profession
func (WowheadItemResponse) GetSocketBonus ¶
func (item WowheadItemResponse) GetSocketBonus() Stats
func (WowheadItemResponse) GetSocketColor ¶
func (item WowheadItemResponse) GetSocketColor() proto.GemColor
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) GetWeaponDamage ¶
func (item WowheadItemResponse) GetWeaponDamage() (float64, float64)
Returns min/max of weapon damage
func (WowheadItemResponse) GetWeaponSpeed ¶
func (item WowheadItemResponse) GetWeaponSpeed() float64
func (WowheadItemResponse) GetWeaponType ¶
func (item WowheadItemResponse) GetWeaponType() proto.WeaponType
func (WowheadItemResponse) IsEquippable ¶
func (item WowheadItemResponse) IsEquippable() bool
func (WowheadItemResponse) IsGem ¶
func (item WowheadItemResponse) IsGem() 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) ToGemProto ¶
func (item WowheadItemResponse) ToGemProto() *proto.UIGem
func (WowheadItemResponse) ToItemProto ¶
func (item WowheadItemResponse) ToItemProto() *proto.UIItem
func (WowheadItemResponse) TooltipWithoutSetBonus ¶
func (item WowheadItemResponse) TooltipWithoutSetBonus() string
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
Source Files
¶
Click to show internal directories.
Click to hide internal directories.