Support 8.2 Root
As the root format has changed since 8.2, CASCHost need some updates.
Fortunately, the client still parses the old root format, so the "necessary" update is just about reading correctly.
For files with no names, we need to generate a hash to allow changes on those existing files given the following structure: {customDirectory}/{prefix}{filedata}. Thus, you can replace files with just filedata quite easily.
This is not really a proper fix but it works ( both adding and replacing files ).
- For your first point, "[...] have a namehash, you don't have to generate one either", that's right. However, without rewriting too much things on CASCHost, it allows you to replace easily the file.
e.g: I want to replace the file with the following filedata: 53183 ; CASCHost need to know that you want to replace the file with this filedata not creating another one, so having a custom path with a namehash is the way to go until further rewrite.
- Well, the client still parses the old structure, so you don't need to alter writing. The proper way, is to do so but it works so I didn't bother to do it.
As I said previously, this PR is not a proper fix. I will update my PR but until then, it allows you to use CASCHost on 8.2. ( W I P )
@RussianBias Afaik it does not parse the old structure? I tried multiple times and it did not work.
https://i.imgur.com/b8VgDrE.png Works on my side (8.2.0.31478). Do you have any errors showing up ? I'm using a clean client ( just downloaded ) and no .build.info.
This PR is confirmed working on 8.2.5 retail version, just in case.
This PR is confirmed working on 8.2.5 retail version, just in case.
Since nothing changed on the root format :P