Skip to content

Instantly share code, notes, and snippets.

@Gethe
Created February 14, 2020 14:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save Gethe/017d2bd7b1307f17dccd5dd7c32cc96c to your computer and use it in GitHub Desktop.
Save Gethe/017d2bd7b1307f17dccd5dd7c32cc96c to your computer and use it in GitHub Desktop.
Read DB2
local WOWDIR = "E:/World of Warcraft"
local CDN = "http://us.patch.battle.net:1119/wow/#us"
local FILE = "DBFilesClient/ManifestInterfaceData.db2"
local casc, dbc = require("casc"), require("dbc")
local conf = {
base = WOWDIR .. "/data",
locale = casc.locale.US,
verifyHashes = false,
log = print
}
local _, _, _, version = casc.localbuild(WOWDIR .. "\\.build.info", casc.selectActiveBuild)
print(("Build: %s"):format(tostring(version)))
local handle = assert(casc.open(CDN, conf))
local fileData = assert(handle:readFile(FILE))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment