unequip specs

This commit is contained in:
ntr
2019-03-15 19:42:38 +11:00
parent 9df24a8f07
commit 0b21a5090d
4 changed files with 19 additions and 6 deletions
+7 -1
View File
@@ -52,6 +52,12 @@ class StatSheet extends Phaser.Scene {
create(cryp) {
this.registry.events.on('changedata', this.updateData, this);
const ws = this.registry.get('ws');
const player = this.registry.get('player');
if (!player) return false;
const { vbox } = player;
this.cryp = cryp;
const del = this.add.existing(new DeleteHitBox(this, X + WIDTH * 0.7, Y + HEIGHT * 0.6));
@@ -116,7 +122,7 @@ class StatSheet extends Phaser.Scene {
if (hitBox) {
hitBox.itemDeselect();
// add socket function for unlearn here
console.log(`delete: ${item.item}`);
ws.sendVboxUnequip(vbox.instance, cryp.id, item.item);
}
return true;
});