Ejemplo n.º 1
0
 public override bool vmethod_1(Ship ship_0, out Ship ship_1)
 {
     ship_1 = null;
     if (ship_0 == null)
     {
         return(false);
     }
     if (base.vmethod_0(ship_0, out ship_1, false))
     {
         return(true);
     }
     if (ship_0 != null)
     {
         NpcShip npcShip = base.Context.method_71(200);
         CooldownTracker <BotAction> cooldowns = base.Context.Cooldowns;
         if (npcShip != null && cooldowns.method_0(BotAction.SelectShip) && cooldowns.method_0(BotAction.TargetQuickSwitch) && npcShip != ship_0 && this.vmethod_53(ship_0, npcShip))
         {
             cooldowns.method_1(BotAction.TargetQuickSwitch, 625.0);
             ship_1 = npcShip;
             return(true);
         }
     }
     if (base.C.AttackingId == ship_0.Id && this.vmethod_51(ship_0 as NpcShip) && ship_0.HpPercentage < 24.75f && base.C.float_0 >= 24.75f && base.C.method_73().Any(new Func <NpcShip, bool>(this.method_38)))
     {
         base.C.NpcLockout.method_1(ship_0.Id, 1428.0);
         return(true);
     }
     return(false);
 }
Ejemplo n.º 2
0
        public void BeReady_WhenCreated()
        {
            var tracker = new CooldownTracker(1, MakeMock(out Mock <IClock> mock));

            mock.Setup(x => x.UtcNow).Returns(DateTime.UtcNow);

            tracker.IsReady.Should().BeTrue();
        }
Ejemplo n.º 3
0
        public void NotBeReady_AfterUsed()
        {
            var tracker = new CooldownTracker(1, MakeMock(out Mock <IClock> mock));

            mock.Setup(x => x.UtcNow).Returns(DateTime.UtcNow);

            tracker.Run(new ChatUser("UserName", "UserId"));

            tracker.IsReady.Should().BeFalse();
        }
Ejemplo n.º 4
0
 private void OnLoad()
 {
     MainMenu();
     AdvCallbacks.Init(_menu);
     var cdt = new CooldownTracker(_menu);
     var fT  = new FoWTracker(_menu);
     var ga  = new GankAlert(_menu);
     var rt  = new RecallTracker(_menu);
     var bct = new BossTracker(_menu);
     var jct = new JungleCampTracker(_menu);
     var wt  = new WardTracker(_menu);
     var aw  = new AdditionalAwareness(_menu);
 }
Ejemplo n.º 5
0
        public void BeReady_AfterWaiting()
        {
            const int minutes = 1;
            var       tracker = new CooldownTracker(minutes, MakeMock(out Mock <IClock> mock));

            mock.Setup(x => x.UtcNow).Returns(DateTime.UtcNow);

            tracker.Run(new ChatUser("UserName", "UserId"));

            mock.Setup(x => x.UtcNow).Returns(DateTime.UtcNow.AddMinutes(minutes));

            tracker.IsReady.Should().BeTrue();
        }
Ejemplo n.º 6
0
 public RefreshCommand(ITwitchClient twitchClient)
     : base(x => x.RefreshCommandWords, x => true)
 {
     _twitchClient    = twitchClient;
     _cooldownTracker = new CooldownTracker(1);
 }