@2003scape/rsc-client
Version:
runescape classic web client
15 lines (12 loc) • 352 B
JavaScript
const serverOpcodes = require('../opcodes/server');
function fromCharArray(a) {
return Array.from(a)
.map((c) => String.fromCharCode(c))
.join('');
}
module.exports = {
[serverOpcodes.SOUND]: function (data, size) {
const soundName = fromCharArray(data.slice(1, size));
this.playSoundFile(soundName);
}
};