Пример #1
0
        public void OnCooldown(IPlayerSkill snoPower, bool expired)
        {
            if (!expired)
            {
                return;
            }
            if (Hud.Game.IsInTown && !InTown)
            {
                return;
            }
            if (!snoPower.Player.IsMe)
            {
                return;
            }

            if (PowerSnos.Contains(snoPower.SnoPower.Sno))
            {
                var text = PowerCustomNames.ContainsKey(snoPower.SnoPower.Sno)
                    ? PowerCustomNames[snoPower.SnoPower.Sno]
                    : TextFunc(snoPower);

                Hud.Speak(text);
            }

            //Says.Debug(snoPower.SnoPower.Sno, snoPower.SnoPower.NameLocalized, expired);
        }
Пример #2
0
 public void Add(uint sno, string text = null)
 {
     PowerSnos.Add(sno);
     if (!string.IsNullOrWhiteSpace(text) && !PowerCustomNames.ContainsKey(sno))
     {
         PowerCustomNames.Add(sno, text);
     }
 }
Пример #3
0
 public void Remove(uint sno)
 {
     if (PowerSnos.Contains(sno))
     {
         PowerSnos.Remove(sno);
     }
     if (PowerCustomNames.ContainsKey(sno))
     {
         PowerCustomNames.Remove(sno);
     }
 }
Пример #4
0
 public void Clear()
 {
     PowerSnos.Clear();
     PowerCustomNames.Clear();
 }