16 lines
371 B
JavaScript
16 lines
371 B
JavaScript
Template.effectsViewList.helpers({
|
|
effects: function(){
|
|
var selector = {
|
|
"parent.id": this.parentId,
|
|
"charId": this.charId,
|
|
};
|
|
if (this.parentGroup){
|
|
selector["parent.group"] = this.parentGroup;
|
|
}
|
|
let effects = Effects.find(selector, {
|
|
fields: {parent: 0},
|
|
}).fetch();
|
|
return _.sortBy(effects, effect => statOrder[effect.stat] || 999);
|
|
}
|
|
});
|