ladislav-zezula / CascLib

An open-source implementation of library for reading CASC storages from Blizzard games since 2014
MIT License
419 stars 123 forks source link

[WoW] Missing EKeys for enUS, enGB and LowViolence files #122

Closed Qartar closed 5 years ago

Qartar commented 5 years ago

I'm seeing an issue where roughly 80k files aren't being associated with an EKey (FindEKeyEntry in DoStorageSearch_RootFile returns NULL) and consequently cannot be searched by name, either directly or with a wildcard. By removing the continue a couple lines down I was able to get CASC_FIND_DATA with szFileName populated for these files but still couldn't open them due to the missing EKey.

It looks like most or possibly all of these files are either using enUS/enGB locales or have the LowViolence content flag set (as seen in CASCExplorer). Here's a very small sample:

dbfilesclient/artifact.db2
interface/cinematics/bfa_800_ltc_a.mp3
interface/garrison/portraits/followerportrait_5822.blp
interface/worldmap/microdungeon/valleyofthefourwinds/cavernofendlessechoes/cavernofendlessechoes14_6.blp
sound/character/pc_-_highmountain_tauren_female/vo_735_pc_-_highmountain_tauren_female_68_f.ogg

All of the above files are visible and exportable in CASCExplorer but I'm not sure if this is just because the files aren't present/indexed on my local data due to locale. The fact that the CKeys still exist makes me suspect this is an issue in CascLib but maybe I'm misunderstanding how CKeys are populated. Let me know if you'd like me to provide a more comprehensive list.

ladislav-zezula commented 5 years ago

I just tried with CascView and I can download every file you mentioned. Are you absolutely sure that you have the newest listfile (https://github.com/wowdev/wow-listfile)?

Qartar commented 5 years ago

Yes, as mentioned above I can get filenames for the affected files if I ignore the missing EKey which means they're in the listfile. Does CascView publish source? It's possible I'm just using the API incorrectly, would be helpful to compare.

Qartar commented 5 years ago

I was calling CascOpenStorage with CASC_LOCALE_ALL under the impression that doing so meant 'any'. It looks I should be using CASC_LOCALE_NONE for that use-case, is that correct?

ladislav-zezula commented 5 years ago

It looks I should be using CASC_LOCALE_NONE for that use-case, is that correct?

Aye, that's what CascView does.

Qartar commented 5 years ago

Using CASC_LOCALE_NONE gives me everything so I'll close as user-error. Thanks!