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,
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,
optional: true,
},
"appliedByDetails.name": {
type: String,

View File

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

View File

@@ -26,7 +26,12 @@ Meteor.methods({
var condition = getCondition(conditionName);
//create the buff
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