Esempio n. 1
0
 public PlayerAttribute this[object key]
 {
     get
     {
         if (!internalAttributes.ContainsKey(key))
         {
             var attribute = new PlayerAttribute(this.Name, this.autoReset, this.isMark, this.isStatus);
             attribute.internalKey = key;
             internalAttributes.Add(key, attribute);
         }
         return internalAttributes[key];
     }
 }
Esempio n. 2
0
 public int this[PlayerAttribute key]
 {
     get
     {
         if (!attributes.ContainsKey(key))
         {
             return 0;
         }
         else
         {
             return attributes[key];
         }
     }
     set
     {
         if (!attributes.ContainsKey(key))
         {
             attributes.Add(key, value);
         }
         else if (attributes[key] == value)
         {
             return;
         }
         attributes[key] = value;
         OnPropertyChanged("Attributes");
     }
 }
Esempio n. 3
0
 public void CalldownCleanupCrew(ISkill skill, PlayerAttribute attr)
 {
     if (!markCleanup.ContainsKey(skill)) markCleanup.Add(skill, new List<PlayerAttribute>());
     markCleanup[skill].Add(attr);
 }
Esempio n. 4
0
 public void RegisterMarkCleanup(ISkill skill, PlayerAttribute attr)
 {
     cleanupSquad.CalldownCleanupCrew(skill, attr);
 }
Esempio n. 5
0
 public static PlayerAttribute Register(string attributeName, bool autoReset = false, bool isAMark = false, bool isStatus = false)
 {
     if (_attributeNames == null)
     {
         _attributeNames = new Dictionary<string, PlayerAttribute>();
     }
     if (_attributeNames.ContainsKey(attributeName))
     {
         return _attributeNames[attributeName];
         //throw new DuplicateAttributeKeyException(attributeName);
     }
     var attr = new PlayerAttribute(attributeName, autoReset, isAMark, isStatus);
     _attributeNames.Add(attributeName, attr);
     return attr;
 }