Adding conditions now works again

This commit is contained in:
Jacob
2017-08-09 11:36:45 +01:00
parent dad575de64
commit 0d023e2ba3
3 changed files with 10 additions and 4 deletions

View File

@@ -46,8 +46,9 @@ Schemas.Buff = new SimpleSchema({
type: String, type: String,
regEx: SimpleSchema.RegEx.Id, regEx: SimpleSchema.RegEx.Id,
}, },
appliedByDetails: {//the name and collection of the thing that applied the buff, and the character's name appliedByDetails: {//the name and collection of the thing that applied the buff
type: Object, type: Object,
optional: true,
}, },
"appliedByDetails.name": { "appliedByDetails.name": {
type: String, type: String,

View File

@@ -9,8 +9,8 @@
</div> </div>
<div flex class="bottom list"> <div flex class="bottom list">
<div class="conditionsList"> <div class="conditionsList">
{{#each conditions}} {{#each condition in conditions}}
{{>buffListItem}} {{>buffListItem buff=condition}}
{{/each}} {{/each}}
</div> </div>
{{#if totalBuffs.count}} {{#if totalBuffs.count}}

View File

@@ -26,7 +26,12 @@ Meteor.methods({
var condition = getCondition(conditionName); var condition = getCondition(conditionName);
//create the buff //create the buff
var buff = _.extend( var buff = _.extend(
{charId: charId, type: "inate"}, condition.buff {
charId: charId,
type: "inate",
appliedBy: charId,
},
condition.buff
); );
//make sure the character doesn't already have the buff //make sure the character doesn't already have the buff