diff --git a/rpg-docs/Model/Character/Buffs.js b/rpg-docs/Model/Character/Buffs.js index dd065e2f..e6e00710 100644 --- a/rpg-docs/Model/Character/Buffs.js +++ b/rpg-docs/Model/Character/Buffs.js @@ -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, diff --git a/rpg-docs/client/views/character/buffs/buffViewList/buffViewList.html b/rpg-docs/client/views/character/buffs/buffViewList/buffViewList.html index 720f7814..d8273057 100644 --- a/rpg-docs/client/views/character/buffs/buffViewList/buffViewList.html +++ b/rpg-docs/client/views/character/buffs/buffViewList/buffViewList.html @@ -9,8 +9,8 @@
- {{#each conditions}} - {{>buffListItem}} + {{#each condition in conditions}} + {{>buffListItem buff=condition}} {{/each}}
{{#if totalBuffs.count}} diff --git a/rpg-docs/lib/methods/conditions.js b/rpg-docs/lib/methods/conditions.js index 0916941d..2202c5f8 100644 --- a/rpg-docs/lib/methods/conditions.js +++ b/rpg-docs/lib/methods/conditions.js @@ -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