Beispiel #1
0
 // NOTE: these are public, but only exist to be used by GameAttribute scripts.
 // They provide raw attribute access of values, no scripts will be triggered when used.
 public int _RawGetAttribute(GameAttributeI attribute, int? key)
 {
     return RawGetAttributeValue(attribute, key).Value;
 }
Beispiel #2
0
 public int this[GameAttributeI attribute]
 {
     get { return GetAttributeValue(attribute, null).Value; }
     set { SetAttributeValue(attribute, null, new GameAttributeValue(value)); }
 }
Beispiel #3
0
 public int this[GameAttributeI attribute, int? key]
 {
     get { return GetAttributeValue(attribute, key).Value; }
     set { SetAttributeValue(attribute, key, new GameAttributeValue(value)); }
 }
Beispiel #4
0
 public int GetItemBonus(GameAttributeI attributeI, int attributeKey)
 {
     return this.Loaded ? this.GetEquippedItems().Sum(item => item.Attributes[attributeI, attributeKey]) : 0;
 }