Esempio n. 1
0
        public void SetRuneState(byte index, bool set = true)
        {
            bool foundRune = CooldownOrder.Contains(index);

            if (set)
            {
                RuneState |= (byte)(1 << index);                      // usable
                if (foundRune)
                {
                    CooldownOrder.Remove(index);
                }
            }
            else
            {
                RuneState &= (byte)~(1 << index);                     // on cooldown
                if (!foundRune)
                {
                    CooldownOrder.Add(index);
                }
            }
        }
Esempio n. 2
0
        public void SetRuneState(byte index, bool set = true)
        {
            var id = CooldownOrder.LookupByIndex(index);

            if (set)
            {
                RuneState |= (byte)(1 << index);                      // usable
                if (id != 0)
                {
                    CooldownOrder.RemoveAt(index);
                }
            }
            else
            {
                RuneState &= (byte)~(1 << index);                     // on cooldown
                if (id == 0)
                {
                    CooldownOrder.Add(index);
                }
            }
        }