Exemple #1
0
 internal void SAtt(E_Attribute att, int v)
 {
     if (!Attributes.ContainsKey(att))
     {
         Attributes[att] = new Attribute();
     }
     Attributes[att].Value = v;
 }
Exemple #2
0
 internal int GAtt(E_Attribute att)
 {
     if (!Attributes.ContainsKey(att))
     {
         Attributes[att] = new Attribute()
         {
             Value = 0
         }
     }
     ;
     return(Attributes[att].Value);
 }
Exemple #3
0
        public bool AddStat(E_Attribute astat)
        {
            var stat = playerLink.Attribs[astat];

            if (Extra == 0 || stat == ushort.MaxValue)
            {
                return(false);
            }

            Extra--;

            playerLink.Attribs[astat]++;

            return(true);
        }
Exemple #4
0
 public int this [E_Attribute i] {
     get {
         Attribute outv = AttribMap.GetOrAdd(i, new Attribute()
         {
             Value = 0
         });
         return(outv.Value);
     }
     set {
         Attribute outv = AttribMap.GetOrAdd(i, new Attribute()
         {
             Value = value
         });
         System.Threading.Interlocked.Exchange(ref outv.Value, value);
     }
 }