Ejemplo n.º 1
0
        public void AddHelm(Helm h)
        {
            Hashtable ht  = this.helms;
            string    key = h.Name;

            if (KeyExists(key, ht) && (int)ht[key] < MaxHelms)
            {
                this.helms[key] = (int)ht[key] + 1;
            }
            else
            {
                ht.Add(key, 1);
            }
        }
Ejemplo n.º 2
0
        public void RemoveHelm(Helm h)
        {
            Hashtable ht  = this.helms;
            string    key = h.Name;

            if (KeyExists(key, ht))
            {
                if ((int)ht[key] > 1)
                {
                    this.helms[key] = (int)ht[key] - 1;
                }
                else
                {
                    ht.Remove(key);
                }
            }
        }