Browse Source

bug #1891: fixed various identified bugs

tags/v0.10.6^2
Shaun 2 years ago
parent
commit
ce8970c068
5 changed files with 8 additions and 13 deletions
  1. +2
    -2
      src/client/ui/factory.js
  2. +0
    -1
      src/client/ui/templates/characters/characters.js
  3. +0
    -1
      src/client/ui/templates/createCharacter/createCharacter.js
  4. +5
    -8
      src/server/components/inventory.js
  5. +1
    -1
      src/server/objects/objBase.js

+ 2
- 2
src/client/ui/factory.js View File

@@ -19,7 +19,7 @@ define([
if (root)
this.root = root + '/';

events.on('onBuildIngameUis', this.onEnterGame.bind(this));
events.on('onBuildIngameUis', this.onBuildIngameUis.bind(this));
events.on('onUiKeyDown', this.onUiKeyDown.bind(this));
events.on('onResize', this.onResize.bind(this));

@@ -31,7 +31,7 @@ define([
});
},

onEnterGame: async function () {
onBuildIngameUis: async function () {
events.clearQueue();

await Promise.all(


+ 0
- 1
src/client/ui/templates/characters/characters.js View File

@@ -97,7 +97,6 @@ define([
onPlay: function () {
this.el.removeClass('disabled');
this.destroy();
events.emit('onEnterGame');
},

onNewClick: function () {


+ 0
- 1
src/client/ui/templates/createCharacter/createCharacter.js View File

@@ -151,7 +151,6 @@ define([
if (!result) {
this.clear();
this.destroy();
events.emit('onEnterGame');
} else
this.el.find('.message').html(result);
},


+ 5
- 8
src/server/components/inventory.js View File

@@ -272,19 +272,16 @@ module.exports = {
this.obj.syncer.setArray(true, 'inventory', 'getItems', item);
},

stashItem: function (id) {
let item = this.findItem(id);
stashItem: async function (id) {
const item = this.findItem(id);
if (!item || item.quest || item.noStash)
return;

delete item.pos;

let stash = this.obj.stash;
if (!stash.active)
return;

let clonedItem = extend({}, item);
const success = stash.deposit(clonedItem);
const stash = this.obj.stash;
const clonedItem = extend({}, item);
const success = await stash.deposit(clonedItem);
if (!success)
return;



+ 1
- 1
src/server/objects/objBase.js View File

@@ -312,7 +312,7 @@ module.exports = {
this.x = xNew;
this.y = yNew;

if (physics.addObject(this, xNew, yNew))
if (physics.addObject(this, xNew, yNew, xOld, yOld))
physics.removeObject(this, xOld, yOld, xNew, yNew);
else {
this.x = xOld;


Loading…
Cancel
Save