Browse Source

bug #1912

tags/v0.10.6.11^2
Shaun 2 years ago
parent
commit
63ebb138f1
3 changed files with 3 additions and 9 deletions
  1. +1
    -1
      src/server/components/equipment.js
  2. +1
    -7
      src/server/components/inventory.js
  3. +1
    -1
      src/server/components/inventory/getItem.js

+ 1
- 1
src/server/components/equipment.js View File

@@ -126,7 +126,7 @@ module.exports = {

if ((!obj.mob) || (item.ability)) {
if (item.spell)
inventory.learnAbility({ itemId }, item.runeSlot);
inventory.learnAbility({ itemId, runeSlot: item.runeSlot });
else
obj.syncer.setArray(true, 'inventory', 'getItems', inventory.simplifyItem(item));
}


+ 1
- 7
src/server/components/inventory.js View File

@@ -145,13 +145,7 @@ module.exports = {
}
},

learnAbility: function (itemId, runeSlot) {
if (itemId.has('itemId')) {
let msg = itemId;
itemId = msg.itemId;
runeSlot = msg.slot;
}

learnAbility: function ({ itemId, runeSlot }) {
let item = this.findItem(itemId);
let statValues = this.obj.stats.values;
if (!item)


+ 1
- 1
src/server/components/inventory/getItem.js View File

@@ -124,7 +124,7 @@ module.exports = (cpnInv, item, hideMessage, noStack, hideAlert, createBagIfFull

if (item.eq) {
if (item.ability)
cpnInv.learnAbility({ itemId: item.id }, item.runeSlot);
cpnInv.learnAbility({ itemId: item.id, runeSlot: item.runeSlot });
else {
delete item.eq;
obj.equipment.equip({ itemId: item.id });


Loading…
Cancel
Save