コード例 #1
0
        private void LastHitQ()
        {
            if (!Q.IsReady())
            {
                return;
            }

            List <Obj_AI_Base> allMinionsQ = MinionManager.GetMinions(ObjectManager.Player.ServerPosition,
                                                                      Q.Range + QWidth, MinionTypes.All, MinionTeam.NotAlly);

            if (allMinionsQ.Count > 0)
            {
                foreach (var minion in allMinionsQ)
                {
                    var health = HealthPrediction.GetHealthPrediction(minion, 700);

                    var qPred = Q2.GetCircularFarmLocation(allMinionsQ);

                    if (qPred.MinionsHit == 1)
                    {
                        if (Player.GetSpellDamage(minion, SpellSlot.Q) - 15 > health)
                        {
                            Q2.Cast(minion, packets());
                        }
                    }
                    else
                    {
                        if (Player.GetSpellDamage(minion, SpellSlot.Q, 1) - 15 > health)
                        {
                            Q2.Cast(minion, packets());
                        }
                    }
                }
            }
        }