Made character arrays of objects into their own collections

This commit is contained in:
Thaum
2015-01-28 10:20:23 +00:00
parent 80c2c3249d
commit 4f205eb970
8 changed files with 59 additions and 40 deletions

View File

@@ -0,0 +1,21 @@
Buffs = new Meteor.Collection("buffs");
//buffs are temporary once applied and store things which expire and their expiry time
Schemas.Buff = new SimpleSchema({
//buff id
_id: {
type: String,
regEx: SimpleSchema.RegEx.Id,
autoValue: function(){
if(!this.isSet) return Random.id();
}},
charId: {
type: String,
regEx: SimpleSchema.RegEx.Id
},
//expiry time
expiry: { type: Number, optional: true},
duration: { type: Number }
});
Buffs.attachSchema(Schemas.Buff);