forked from MephisTools/diablo2-protocol
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathindex.js
49 lines (47 loc) · 1.53 KB
/
index.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
const createClientDiablo = require('./lib/client/createClientDiablo')
const { createSplitter } = require('./lib/utils/splitter')
const { decompress, compress, getPacketSize } = require('./lib/utils/compression')
const d2gsReader = require('./lib/utils/d2gsSpecialReader')
const getHash = require('./lib/utils/getHash')
const createServerDiablo = require('./lib/server/createServerDiablo')
const ServerDiablo = require('./lib/server/serverDiablo')
const createServerSid = require('./lib/server/createServerSid')
const createServerMcp = require('./lib/server/createServerMcp')
const ServerD2gs = require('./lib/server/serverD2gs')
const itemParser = require('./lib/utils/itemParser')
const bitfieldLE = require('./lib/utils/bitfieldLE')
const { defaultVersion, supportedVersions } = require('./version')
const cdKey = require('./lib/utils/cdkey')
const cdKey26 = require('./lib/utils/cdkey26')
const checkRevision = require('./lib/utils/checkRevision')
const protocol = supportedVersions.reduce((acc, version) => {
acc[version] = {
sid: require(`./data/${version}/sid`),
bnftp: require(`./data/${version}/bnftp`),
mcp: require(`./data/${version}/mcp`),
d2gs: require(`./data/${version}/d2gs`)
}
return acc
}, {})
module.exports = {
protocol,
createClientDiablo,
createSplitter,
decompress,
compress,
getPacketSize,
d2gsReader,
getHash,
createServerDiablo,
createServerSid,
createServerMcp,
ServerD2gs,
ServerDiablo,
itemParser,
bitfieldLE,
supportedVersions,
defaultVersion,
cdKey,
cdKey26,
checkRevision
}