internal void SAtt(E_Attribute att, int v) { if (!Attributes.ContainsKey(att)) { Attributes[att] = new Attribute(); } Attributes[att].Value = v; }
internal int GAtt(E_Attribute att) { if (!Attributes.ContainsKey(att)) { Attributes[att] = new Attribute() { Value = 0 } } ; return(Attributes[att].Value); }
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); }
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); } }