Receive and respond to friend requests and inventory offers

This commit is contained in:
Casper Warden
2017-12-19 19:59:06 +00:00
parent 6cbe790657
commit 70fd5a99ce
23 changed files with 382 additions and 11 deletions

View File

@@ -1,5 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const UUID_1 = require("./UUID");
const AssetType_1 = require("../enums/AssetType");
class Inventory {
constructor(clientEvents) {
this.main = {
@@ -10,6 +12,21 @@ class Inventory {
};
this.clientEvents = clientEvents;
}
findFolderForType(type) {
if (this.main.root === undefined) {
return UUID_1.UUID.zero();
}
if (type === AssetType_1.AssetType.Folder) {
return this.main.root;
}
let found = UUID_1.UUID.zero();
this.main.skeleton.forEach((folder) => {
if (folder.typeDefault === type) {
found = folder.folderID;
}
});
return found;
}
}
exports.Inventory = Inventory;
//# sourceMappingURL=Inventory.js.map