Mercurial > repos > snowblizz-super-API-ideas
changeset 295:f8f441f2fcfe
Re #323: WarFoundry.API - SystemStats cannot remove stat
Update SystemStats
Implement RemoveStatSlot
author | Tsudico |
---|---|
date | Sat, 18 Dec 2010 20:53:52 +0000 |
parents | 52985d48b263 |
children | ed5e6d92ecd9 |
files | api/Objects/SystemStats.cs |
diffstat | 1 files changed, 8 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/api/Objects/SystemStats.cs Fri Dec 17 20:40:30 2010 +0000 +++ b/api/Objects/SystemStats.cs Sat Dec 18 20:53:52 2010 +0000 @@ -52,6 +52,14 @@ return stats.IndexOf(slot); } + public void RemoveStatSlot(string name) + { + statsByName.Remove(name); + StatSlot slot = new StatSlot(name); + slot.SystemStats = this; + stats.Remove(slot); + } + public int SlotCount { get { return stats.Count; }