Drake53 / War3Net

A .NET implementation of Warcraft III related libraries.
MIT License
124 stars 27 forks source link

Expose more should be internal API to become public #49

Open KrayOristine opened 1 year ago

KrayOristine commented 1 year ago

I'm currently hit the limitation of war3net on building my own w3x file. So, can you expose more of the internal API to public so that people can build their own w3x file without the need of a world editor? For now, i has created a fork with modification, maybe if i can made it work i would send you the pull request.

Drake53 commented 1 year ago

I have added a new MpqStreamFactory class, containing all the logic that was previously in the MpqStream's constructor. This class has a public method that you can use: https://github.com/Drake53/War3Net/blob/vjass/src/War3Net.IO.Mpq/MpqStreamFactory.cs

You can take a look at the tests to see examples of how to use it: https://github.com/Drake53/War3Net/blob/vjass/tests/War3Net.IO.Mpq.Tests/MpqStreamUtilsTests.cs

IS4Code commented 12 months ago

@Drake53 I would also like to request some additional accessible API to use. In my case, I would like to access the information about a particular entry's hash and locale, or, to be precise, a way to enumerate the hashes and locales and identify the files corresponding to them.