public Choice(SelectRule rule, Character character) { this.rule = rule; this.character = character; this.options = new ObservableCollection<RuleElement>(); FillItems(); if (this.rule.Filter != null) { this.rule.Filter.FilterChanged += OnFilterChanged; } }
public abstract void Revoke(Character character);
protected override void UnbindCharacter(Character character) { this.boundStat.PropertyChanged -= OnBoundStatPropertyChanged; this.boundStat = null; }
protected override void UnbindCharacter(Character character) { this.baseRule.UnbindCharacter(character); }
protected abstract void UnbindCharacter(Character character);
public override sealed void Apply(Character character) { character.GetStat(Stat).AddModifier(this); BindCharacter(character); }
public override void Apply(Character character) { character.TextStrings[this.name] = this.value; }
public override void Revoke(Character character) { character.Revoke(this.element); }
public void Apply(Character character) { foreach (Rule rule in this.rules) { rule.Apply(character); } }
public override void Revoke(Character character) { /// TODO: Errrr... maybe? }
public override void Apply(Character character) { character.Grant(this.element); }
public override void Apply(Character character) { character.Alias(this.name, this.alias); }
public void Unbind(Character character) { this.character.Inventory.PropertyChanged -= InventoryPropertyChanged; this.character = null; }
public void Bind(Character character) { this.character = character; this.character.Inventory.PropertyChanged += InventoryPropertyChanged; }
public override bool Check(Character character) { return character.Grants.Contains(this.boundElement); }
public void Revoke(Character character) { foreach (Rule rule in this.rules) { rule.Revoke(character); } }
public abstract bool Check(Character character);
public override bool Check(Character character) { return this.left.Check(character) && this.right.Check(character); }
public override void Revoke(Character character) { character.TextStrings.Remove(this.name); }
public override bool Check(Character character) { int required = this.count; for (int i = 0; i < prereqs.Length && required > 0; i++) { if (this.prereqs[i].Check(character)) { required--; } } return (required == 0); }
public override void Revoke(Character character) { throw new NotImplementedException(); }
public override bool Check(Character character) { return false; }
public override sealed void Revoke(Character character) { UnbindCharacter(character); character.GetStat(Stat).RemoveModifier(this); }
public override bool Check(Character character) { return !this.prereq.Check(character); }
protected override void UnbindCharacter(Character character) { }
public override bool Check(Character character) { throw new NotImplementedException(); }
protected override void BindCharacter(Character character) { this.boundStat = character.GetStat(this.sourceStat); this.boundStat.PropertyChanged += OnBoundStatPropertyChanged; }
public override bool Check(Character character) { for (int i = 0; i < this.boundElements.Length; i++) { if (character.Grants.Contains(this.boundElements[i])) { return true; } } return false; }
protected override void UnbindCharacter(Character character) { this.predicate.Unbind(character); base.UnbindCharacter(character); }
public abstract void Apply(Character character);