@rhyster/wow-casc-dbc 1.0.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/LICENSE ADDED
@@ -0,0 +1,20 @@
1
+ Copyright (c) 2024 Rhyster
2
+
3
+ Permission is hereby granted, free of charge, to any person obtaining
4
+ a copy of this software and associated documentation files (the
5
+ "Software"), to deal in the Software without restriction, including
6
+ without limitation the rights to use, copy, modify, merge, publish,
7
+ distribute, sublicense, and/or sell copies of the Software, and to
8
+ permit persons to whom the Software is furnished to do so, subject to
9
+ the following conditions:
10
+
11
+ The above copyright notice and this permission notice shall be
12
+ included in all copies or substantial portions of the Software.
13
+
14
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
15
+ EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
16
+ MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
17
+ NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
18
+ LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
19
+ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
20
+ WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
package/README.md ADDED
@@ -0,0 +1,36 @@
1
+ # WoW CASC & DBC
2
+
3
+ Node.js tool to fetch World of Warcraft data files from CASC and parse DBC/DB2 files.
4
+
5
+ ## Snippet
6
+
7
+ ```javascript
8
+ // Get version
9
+ const region = 'us';
10
+ const product = 'wow';
11
+ const version = await CASCClient.getProductVersion(region, product);
12
+
13
+ // Client initialization
14
+ const client = new CASCClient(region, product, version);
15
+ await client.init();
16
+ await client.loadRemoteTACTKeys();
17
+ await client.loadRemoteListFile();
18
+
19
+ // Fetch file
20
+ const fileDataID = client.getFileDataIDByName('dbfilesclient/questxp.db2');
21
+ const cKeys = client.getContentKeysByFileDataID(fileDataID);
22
+ const cKey = cKeys.find((data) => !!(data.localeFlags & CASCClient.LocaleFlags.enUS));
23
+ const { buffer } = await client.getFileByContentKey(cKey.cKey);
24
+
25
+ // Parse DB2 file
26
+ const reader = new WDCReader(buffer);
27
+ const parser = new DBDParser(reader);
28
+
29
+ // Access DB2 file
30
+ // reader.getRowData
31
+ // parser.getRowData
32
+ ```
33
+
34
+ ## License
35
+
36
+ MIT License