Documentation
¶
Overview ¶
Package tact reads World of Warcraft game files either out of a local CASC install (.build.info picks the build, then root → encoding → .idx → data.NNN → BLTE resolves a file data id to its bytes) or straight off Blizzard's CDN (see cdn.go), which swaps the .idx/data.NNN step for archive indexes and range reads. Nothing falls back from one to the other.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildNumber ¶
BuildNumber extracts the trailing build number from a 4-part version string.
func LoadConfig ¶
LoadConfig reads a build/CDN config from the local install's Data/config/<xx>/<yy>/<hash> layout. Values are space-separated (typically `ckey [ekey]`). All keys are kept, including the ~318 unused `vfs-*` TVFS lines — they parse fine and are simply never consulted.
func RefreshKeyFile ¶
RefreshKeyFile keeps a local copy of the community list current with the same download-if-stale rule as the listfile: a usable existing file is never lost to a network failure, and only a missing file makes the download mandatory.
Types ¶
type AvailableBuild ¶
AvailableBuild is one .build.info product entry, reduced to the fields this local-only reader consumes.
func ParseBuildInfo ¶
func ParseBuildInfo(path string) ([]AvailableBuild, error)
ParseBuildInfo reads <BaseDir>/.build.info (typed pipe format: the header line names columns as "Name!TYPE:len") and returns all product entries.
func SelectBuild ¶
func SelectBuild(entries []AvailableBuild, product string) (AvailableBuild, error)
SelectBuild returns the first entry for the given product.
type Build ¶
type Build struct {
Entry AvailableBuild
BuildNumber uint32
Keys *KeyStore // TACT keys for encrypted BLTE chunks; nil leaves them zero-filled
// contains filtered or unexported fields
}
func OpenCDN ¶
OpenCDN loads the current build of product from the CDN, using the version service of region (e.g. "us") to find both.
func (*Build) OpenFileByCKey ¶
OpenFileByCKey resolves a content key through encoding and opens the first encoding key locally.
type KeyStore ¶
type KeyStore struct {
// contains filtered or unexported fields
}
KeyStore holds TACT keys by their 64-bit lookup name — the value a BLTE 'E' chunk and a WDC5 section header both carry to say which key they need. Keys reach it from three places: the game files' own TactKey.db2, TACTKEY hotfix records the server pushed into DBCache.bin, and the community list. It also remembers every name a chunk asked for and did not find, so the extractor can say what is still locked.
func NewKeyStore ¶
func NewKeyStore() *KeyStore
func (*KeyStore) LoadKeyFile ¶
LoadKeyFile adds every key in a community-format file. Malformed lines are skipped rather than fatal, since the list is hand-maintained.
type Listfile ¶
Listfile manages the community listfile.csv with download-if-stale semantics: HEAD + Last-Modified vs local mtime; a failed freshness check triggers a re-download, and a failed download falls back to the existing file when one exists.