Changed how effects are applied and removed to enable effects expiring after a set duration.
This commit is contained in:
12
rpg-docs/Model/Character/SubSchemas/Expiration.js
Normal file
12
rpg-docs/Model/Character/SubSchemas/Expiration.js
Normal file
@@ -0,0 +1,12 @@
|
||||
//schema to store all effects which expire and their expiry dates
|
||||
Schemas.Expiration = new SimpleSchema({
|
||||
_id: {
|
||||
type: String,
|
||||
regEx: SimpleSchema.RegEx.Id,
|
||||
autoValue: function(){
|
||||
if(!this.isSet) return Random.id();
|
||||
}},
|
||||
stat: { type: String },
|
||||
effectId: { type: String, regEx: SimpleSchema.RegEx.Id },
|
||||
expiry: { type: Number }
|
||||
});
|
||||
Reference in New Issue
Block a user