Browse Source

Fixes #144

tags/v0.1.3^2
Big Bad Waffle 7 years ago
parent
commit
439be433df
4 changed files with 25 additions and 11 deletions
  1. BIN
     
  2. BIN
     
  3. +21
    -9
      src/client/js/components/chest.js
  4. +4
    -2
      src/server/components/inventory.js

BIN
View File


BIN
View File


+ 21
- 9
src/client/js/components/chest.js View File

@@ -4,19 +4,29 @@ define([

) {
var colors = [
'f2f5f5',
'9a5a3c',
'3fa7dd',
'faac45',
'a24eff',
'ff6942'
'ffeb38'
];

var chances = [
0.02,
0.05,
0.01,
0.03,
0.055,
0.1,
0.17
0.16
];

var indices = {
'50': 0,
'51': 1,
'128': 2,
'52': 3,
'53': 4
};

return {
type: 'chest',

@@ -35,13 +45,15 @@ define([
}
}

var color = colors[this.obj.cell - 50];
var index = indices[this.obj.cell];

var color = colors[index];

this.obj.addComponent('particles', {
chance: chances[this.obj.cell - 50],
chance: chances[index],
blueprint: {
color: {
start: colors[this.obj.cell - 50]
start: colors[index]
},
alpha: {
start: 0.75,
@@ -51,7 +63,7 @@ define([
start: 1,
end: 4
},
chance: chances[this.obj.cell - 50]
chance: chances[index]
}
});
},


+ 4
- 2
src/server/components/inventory.js View File

@@ -347,8 +347,10 @@ define([

if (topQuality == 0)
bagCell = 50;
else if (topQuality < 3)
else if (topQuality == 1)
bagCell = 51;
else if (topQuality == 2)
bagCell = 128;
else if (topQuality == 3)
bagCell = 52;
else
@@ -371,7 +373,7 @@ define([

return obj;
},
getItem: function(item, hideMessage) {
//We need to know if a mob dropped it for quest purposes
var fromMob = item.fromMob;


Loading…
Cancel
Save