internal override QE Add(QE evaluator) { QE qe = new QEMulti(); qe.Add(this); qe.Add(evaluator); return qe; }
private static void CastQCannon(Obj_AI_Hero target, bool useE) { var qePred = QE.GetPrediction(target); if (qePred.HitChance >= HitChance.High && qCd == 0 && eCd == 0 && useE) { var gateVector = Me.Position + Vector3.Normalize(target.ServerPosition - Me.Position) * MiscOption.GetSlider("E", "gatePlace").Value; if (Me.Distance(qePred.CastPosition) < QE.Range + 100) { if (E.Ready && QE.Ready) { E.Cast(gateVector); QE.Cast(qePred.CastPosition); return; } } } var qPred = Q.GetPrediction(target); if ((!useE || !E.Ready) && qCd == 0 && qPred.HitChance >= HitChance.High && Me.Distance(target.ServerPosition) <= Q.Range && Q.Ready && eCd != 0) { Q.Cast(target); } }
public static QEBitmap ForQE(QE qe) { var bitmap = new bool[4]; qe.IndexBitMap(bitmap); return(new QEBitmap(bitmap)); }
/// <summary> /// The on draw. /// </summary> /// <param name="args"> /// The args. /// </param> private static void OnDraw(EventArgs args) { foreach (var Enemy in GameObjects.EnemyHeroes.Where(x => x.IsValidTarget(2000))) { if (DrawDmg.Value) { Indicator.Unit = Enemy; Indicator.DrawDmg((float)ComboDamage(Enemy), Color.DarkRed); } } if (RangeForm()) { if (CannonQERange.Value && QE.IsReady() && E.IsReady()) { Render.Circle.DrawCircle(ObjectManager.Player.Position, QE.Range, System.Drawing.Color.Aqua, 2); } if (CannonQRange.Value && Q.IsReady()) { Render.Circle.DrawCircle(ObjectManager.Player.Position, Q.Range, System.Drawing.Color.Cyan, 2); } } else { if (HammerQRange.Value && Q1.IsReady()) { Render.Circle.DrawCircle(ObjectManager.Player.Position, Q1.Range, System.Drawing.Color.IndianRed, 2); } } }
private static string EvaluatorToString(QE evaluator) { switch (evaluator.GetType().Name) { case "QEMulti": { var sb = new StringBuilder(); foreach (QE qe in ((QEMulti)evaluator).Evaluators()) { sb.Append(EvaluatorToString(qe)); } return(sb.ToString()); } case "QE": return("=="); case "QESmaller": return("<"); case "QEGreater": return(">"); case "QEEqual": return("="); case "QENot": return("not"); case "QEStartsWith": return("startswith"); case "QEEndsWith": return("endswith"); case "QEContains": return("contains"); } throw new NotSupportedException(); }
internal override QE Add(QE evaluator) { QE qe = new QEMulti(); qe.Add(this); qe.Add(evaluator); return(qe); }
internal override QE Add(QE evaluator) { if (!(evaluator is QENot)) { i_evaluator = i_evaluator.Add(evaluator); } return(this); }
internal override QE Add(QE evaluator) { if (!(evaluator is QENot)) { i_evaluator = i_evaluator.Add(evaluator); } return this; }
public List <EmployeeSalaryIncrementReportModel> GetReportData(DateTime?DateFrom, DateTime?DateTo, int?DepartmentID, int?DesignationID, int?LocationID, int?EmployementTypeID) { using (dbVisionEntities db = new dbVisionEntities()) { var ReportData = (from sl in db.tblEmployeeSalaryIncrements join r in db.tblEmployees on sl.EmployeeID equals r.EmployeeID join pe in db.tblEmployeeServiceDetails on r.EmployeeLastServiceDetailID equals pe.EmployeeServiceDetailID into PE from ep in PE.DefaultIfEmpty() join np in db.tblEmployeeNoPrefixes on r.EmployeeNoPrefixID equals np.EmployeeNoPrefixID into NP from pn in NP.DefaultIfEmpty() join qe in db.tblEmployeeDesignations on ep.EmployeeDesignationID equals qe.EmployeeDesignationID into QE from eq in QE.DefaultIfEmpty() join lc in db.tblLocations on ep.LocationID equals lc.LocationID into LC from L in LC.DefaultIfEmpty() join jdep in db.tblEmployeeDepartments on ep.EmployeeDepartmentID equals jdep.EmployeeDepartmentID into gdep from dep in gdep.DefaultIfEmpty() where ((DateFrom == null || sl.EmployeeSalaryIncrementDate <= DateTo) && (DateTo == null || sl.EmployeeSalaryIncrementDate == null || sl.EmployeeSalaryIncrementDate >= DateFrom)) && r.CompanyID == Model.CommonProperties.LoginInfo.LoggedInCompany.CompanyID && (DesignationID == null || ep.EmployeeDesignationID == DesignationID.Value) && (LocationID == null || ep.LocationID == LocationID.Value) && (DepartmentID == null || ep.EmployeeDepartmentID == DepartmentID.Value) && (EmployementTypeID == null || (ep != null && (ep.EmploymentType == EmployementTypeID || (EmployementTypeID == 3 && (ep.EmploymentType == 1 || ep.EmploymentType == 2))))) && r.rstate != 2 select new EmployeeSalaryIncrementReportModel() { EmployeeSalaryIncrementID = (sl != null ? sl.EmployeeSalaryIncrementID : 0), EmployeeSalaryIncrementNo = (sl != null ? sl.EmployeeSalaryIncrementNo : 0), EmployeeNoPrefix = (pn != null ? pn.EmployeeNoPrefixName : null), PriviousBasicSalary = sl.LastIncAmount, EmployeeNo = r.EmployeeNo, EmployeeName = (r != null ? r.EmployeeFirstName + " " + r.EmployeeLastName : ""), LastIncDate = sl.LastIncDate, CurrentBasicSalary = (sl != null ? sl.CurrentBasicSalary : 0), CurrentIncDate = sl.EmployeeSalaryIncrementDate, NewBasicSalary = sl.NewBasicSalary, IncrementAmount = (sl != null ? sl.IncrementAmount : 0), IncrementPercentage = (sl != null ? sl.IncrementPercentage : 0), Remarks = sl.Remarks, Designation = eq.EmployeeDesignationName, Department = dep.EmployeeDepartmentName, Location = L.LocationName, EmployementTypeID = (eEmploymentType)ep.EmploymentType, }).ToList(); return(ReportData); } }
public void Push(int x) { SE se = new SE(x); QE qe = new QE(x, id++); se.qe = qe; qe.se = se; stack.Push(se); pq.Enqueue(qe); }
public int CompareTo(object obj) { QE qe = obj as QE; if (val != qe.val) { return(qe.val - val); } return(qe.id - id); }
public int PopMax() { while (pq.Any() && pq.Peek().removed) { pq.Dequeue(); } QE temp = pq.Dequeue(); temp.se.removed = true; return(temp.val); }
public override void Execute() { var target = TargetSelector.GetTarget(Q.Range, DamageType.Magical); if (target == null || target.IsZombie || target.HasUndyingBuff()) { return; } //RKS if (SpellManager.R.IsReady() && target.IsValidTarget(R.Range) && Prediction.Health.GetPrediction(target, R.CastDelay) <= SpellDamage.GetRealDamage(SpellSlot.R, target) && Prediction.Health.GetPrediction(target, R.CastDelay) > Misc.OverkillR) { R.Cast(target); } //RKS //AutoHarass var tower = EntityManager.Turrets.Allies.FirstOrDefault(t => t.IsInRange(Player.Instance, 920)); if (tower == null && Settings.KeyAutoHarass) { if (Q.IsReady() && E.IsReady() && target.IsValidTarget(QE.Range) && Settings.UseAutoQ && Settings.UseAutoE && Player.Instance.ManaPercent > Settings.ManaAutoHarass) { Functions.QE(QE.GetPrediction(target).CastPosition); } else { if (Q.IsReady() && target.IsValidTarget(Q.Range) && Settings.UseAutoQ && Player.Instance.ManaPercent > Settings.ManaAutoHarass) { Q.Cast(target); } if (E.IsReady() && target.IsValidTarget(E.Range) && Settings.UseAutoE && Player.Instance.ManaPercent > Settings.ManaAutoHarass) { E.Cast(target); } } if (W.IsReady() && target.IsValidTarget(W.Range) && Settings.UseAutoE && Player.Instance.ManaPercent > Settings.ManaAutoHarass) { if (Player.Instance.Spellbook.GetSpell(SpellSlot.W).ToggleState != 2 && lastWCast + 1000 < Environment.TickCount) { W.Cast(Functions.GrabWPost(false)); lastWCast = Environment.TickCount; } if (Player.Instance.Spellbook.GetSpell(SpellSlot.W).ToggleState == 2 && lastWCast + 500 < Environment.TickCount) { W.Cast(W.GetPrediction(target).CastPosition); } } } }
/// <summary> /// The cast Q range. /// </summary> private static void CastQERange() { var Minions = GameObjects.EnemyMinions.Where(x => x.IsValidTarget(QE.Range)).ToList(); var FarmPos = QE.GetCircularFarmLocation(Minions, QE.Width); var MinHit = FarmPos.MinionsHit; if (QE.IsReady() && (ObjectManager.Player.Mana > Q.Instance.ManaCost + E.Instance.ManaCost)) { if (MinHit >= LaneCannonQHit.Value) { QE.Cast(FarmPos.Position); } } }
/// <summary> /// The cast QE range. /// </summary> private static void CastQERange() { if (QE.IsReady() && E.IsReady() && (ObjectManager.Player.Mana > Q.Instance.SData.Mana + E.Instance.SData.Mana)) { var Enemies = GameObjects.EnemyHeroes.Where(x => (x != null) && x.IsValidTarget()); foreach (var Enemy in Enemies.Where(x => x.IsValidTarget(QE.Range) && (CannonQEDmg(x) > x.Health))) { var Predinction = Q.GetPrediction(Enemy); if (Predinction.Hitchance >= HitChance.VeryHigh) { Q.Cast(Predinction.CastPosition); } } } }
public override void Execute() { var target = TargetSelector.GetTarget(QE.Range, DamageType.Magical); if (target == null || target.IsZombie || target.HasUndyingBuff()) { return; } if (R.IsReady() && target.IsValidTarget(R.Range) && Settings.UseR && target.Health <= SpellDamage.GetRealDamage(SpellSlot.R, target) && target.Health > Misc.OverkillR) { R.Cast(target); } if (Q.IsReady() && E.IsReady() && target.IsValidTarget(QE.Range) && Settings.UseQ && Settings.UseE) { Functions.QE(QE.GetPrediction(target).CastPosition); } else { if (Q.IsReady() && target.IsValidTarget(Q.Range) && Settings.UseQ) { Q.Cast(target); } if (E.IsReady() && target.IsValidTarget(E.Range) && Settings.UseE) { E.Cast(target); } } if (W.IsReady() && target.IsValidTarget(W.Range) && Settings.UseW) { if (Player.Instance.Spellbook.GetSpell(SpellSlot.W).ToggleState != 2 && lastWCast + 650 < Environment.TickCount) { W.Cast(Functions.GrabWPost(false)); lastWCast = Environment.TickCount; } if (Player.Instance.Spellbook.GetSpell(SpellSlot.W).ToggleState == 2 && lastWCast + 300 < Environment.TickCount) { W.Cast(W.GetPrediction(target).CastPosition); } } }
/// <summary> /// The cast QE range. /// </summary> private static void CastQERange() { var target = Variables.TargetSelector.GetTarget(QE.Range, DamageType.Physical); if (target != null) { if (QE.IsReady() && E.IsReady() && target.IsValidTarget(QE.Range) && (ObjectManager.Player.Mana > Q.Instance.SData.Mana + E.Instance.SData.Mana)) { var Prediction = QE.GetPrediction(target); if (Prediction.Hitchance >= HitChance.VeryHigh) { QE.Cast(Prediction.CastPosition); } } } }
public static void ComboEQ() { var target = TargetSelector.GetTarget(Spells.QE.Range, DamageType.Magical); if (target != null && Q.IsReady()) { Extension.QEcomboing = true; var pred = QE.GetPrediction(target); if (E.IsInRange(pred.UnitPosition)) { Q.Cast(Player.Instance.Position.Extend(pred.CastPosition, Player.Instance.Distance(pred.CastPosition) - 20f).To3DWorld()); } else { Q.Cast(Player.Instance.Position.Extend(pred.CastPosition, Spells.E.Range - 50f).To3DWorld()); } } }
public override void Execute() { var target = TargetSelector.GetTarget(Q.Range, DamageType.Physical); if (target == null || target.IsZombie) { return; } if (Q.IsReady() && E.IsReady() && target.IsValidTarget(QE.Range) && Settings.UseQ && Settings.UseE && Player.Instance.ManaPercent > Settings.ManaHarass) { Functions.QE(QE.GetPrediction(target).CastPosition); } else { if (Q.IsReady() && target.IsValidTarget(Q.Range) && Settings.UseQ && Player.Instance.ManaPercent > Settings.ManaHarass) { Q.Cast(target); } if (E.IsReady() && target.IsValidTarget(E.Range) && Settings.UseE && Player.Instance.ManaPercent > Settings.ManaHarass) { E.Cast(target); } } if (W.IsReady() && target.IsValidTarget(W.Range) && Settings.UseW && Player.Instance.ManaPercent > Settings.ManaHarass) { if (Player.Instance.Spellbook.GetSpell(SpellSlot.W).ToggleState != 2 && lastWCast + 700 < Environment.TickCount) { W.Cast(Functions.GrabWPost(true)); lastWCast = Environment.TickCount; } if (Player.Instance.Spellbook.GetSpell(SpellSlot.W).ToggleState >= 1 && lastWCast + 300 < Environment.TickCount) { W.Cast(W.GetPrediction(target).CastPosition); } } }
private static void CastQCannonMouse() { Me.IssueOrder(OrderType.MoveTo, Game.CursorPos); if (isMelee && !R.Ready) { return; } if (isMelee && R.Ready) { R.Cast(); return; } if (eCd == 0 && qCd == 0 && !isMelee) { if (MiscOption.GetList("QE", "SemiQEMode").Value == 1) { var gateDis = MiscOption.GetSlider("E", "gatePlace").Value; var gateVector = Me.ServerPosition + Vector3.Normalize(Game.CursorPos - Me.ServerPosition) * gateDis; if (E.Ready && QE.Ready) { E.Cast(gateVector); QE.Cast(Game.CursorPos); } } else { var qTarget = MyTargetSelector.GetTarget(QE.Range); if (qTarget != null && qTarget.IsValidTarget(QE.Range) && qCd == 0) { CastQCannon(qTarget, true); } } } }
internal QENot(QE a_evaluator) { // CS i_evaluator = a_evaluator; }
private static void Combo() { var target = TargetSelector.GetTarget(1300, TargetSelector.DamageType.Magical); if (Q.IsReady() && (Config.Item("UseQCombo").GetValue <bool>())) { var Qprediction = Q.GetPrediction(target); if (Qprediction.Hitchance >= HitChance.VeryHigh) { Q.Cast(Qprediction.CastPosition); } } if (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 1 && W.IsReady()) { var WGrabObject = GetGrabableObjectPos(target == null); if (WGrabObject.To2D().IsValid() && Utils.TickCount - W.LastCastAttemptT > Game.Ping + 300) { W.Cast(WGrabObject); W.LastCastAttemptT = Utils.TickCount; } else if (target != null && Player.Spellbook.GetSpell(SpellSlot.W).ToggleState != 1 && W.IsReady() && Utils.TickCount - W.LastCastAttemptT > Game.Ping + 100) { if (OrbManager.WObject(false) != null) { W.From = OrbManager.WObject(false).ServerPosition; W.Cast(target, false, true); } } } else if (target != null && Player.Spellbook.GetSpell(SpellSlot.W).ToggleState != 1 && W.IsReady() && Utils.TickCount - W.LastCastAttemptT > Game.Ping + 100) { if (OrbManager.WObject(false) != null) { W.From = OrbManager.WObject(false).ServerPosition; W.Cast(target, false, true); } } if (E.IsReady() && (Config.Item("UseECombo").GetValue <bool>())) { foreach (var orb in OrbManager.GetOrbs(true)) { if (Player.Distance(orb) < E.Range + 100) { var startPoint = orb.To2D().Extend(Player.ServerPosition.To2D(), 100); var endPoint = Player.ServerPosition.To2D() .Extend(orb.To2D(), Player.Distance(orb) > 200 ? 1300 : 1000); QE.Delay = E.Delay + Player.Distance(orb) / E.Speed; QE.From = orb; var enemyPred = QE.GetPrediction(target); if (enemyPred.Hitchance >= HitChance.VeryHigh && enemyPred.UnitPosition.To2D().Distance(startPoint, endPoint, false) < QE.Width + target.BoundingRadius) { E.Cast(orb, true); W.LastCastAttemptT = Utils.TickCount; return; } } } } if (E.IsReady() && Q.IsReady() && (Config.Item("UseQECombo").GetValue <bool>())) { QE.Delay = E.Delay + Q.Range / E.Speed; QE.From = Player.ServerPosition.To2D().Extend(target.ServerPosition.To2D(), Q.Range).To3D(); var prediction = QE.GetPrediction(target); if (prediction.Hitchance >= HitChance.High) { Q.Cast(Player.ServerPosition.To2D().Extend(prediction.CastPosition.To2D(), Q.Range - 100)); QET = Utils.TickCount; W.LastCastAttemptT = Utils.TickCount; } } if (R.IsReady() && (Config.Item("UseRCombo").GetValue <bool>())) { if (target.Health < R.GetDamage(target)) { R.Cast(target); } } }
private static void Combo() { var target = TargetSelector.GetTarget(1300, TargetSelector.DamageType.Magical); if (Q.IsReady() && (Config.Item("UseQCombo").GetValue <bool>())) { var Qprediction = Q.GetPrediction(target); if (Qprediction.Hitchance >= HitChance.VeryHigh) { Q.Cast(Qprediction.CastPosition); } } if (Player.Spellbook.GetSpell(SpellSlot.W).ToggleState == 1 && W.IsReady() && Config.Item("UseWCombo").GetValue <bool>()) { foreach (var enemy in HeroManager.Enemies.Where(x => x.IsValidTarget(W.Range + W.Width) && W.GetPrediction(x).Hitchance >= HitChance.High)) { UseW(enemy, enemy); } } if (E.IsReady() && (Config.Item("UseECombo").GetValue <bool>())) { foreach (var orb in OrbManager.GetOrbs(true)) { if (Player.Distance(orb) < E.Range + 100) { var startPoint = orb.To2D().Extend(Player.ServerPosition.To2D(), 100); var endPoint = Player.ServerPosition.To2D() .Extend(orb.To2D(), Player.Distance(orb) > 200 ? 1300 : 1000); QE.Delay = E.Delay + Player.Distance(orb) / E.Speed; QE.From = orb; var enemyPred = QE.GetPrediction(target); if (enemyPred.Hitchance >= HitChance.VeryHigh && enemyPred.UnitPosition.To2D().Distance(startPoint, endPoint, false) < QE.Width + target.BoundingRadius) { E.Cast(orb, true); W.LastCastAttemptT = Utils.TickCount; return; } } } } if (E.IsReady() && Q.IsReady() && (Config.Item("UseQECombo").GetValue <bool>())) { QE.Delay = E.Delay + Q.Range / E.Speed; QE.From = Player.ServerPosition.To2D().Extend(target.ServerPosition.To2D(), Q.Range).To3D(); var prediction = QE.GetPrediction(target); if (prediction.Hitchance >= HitChance.High) { Q.Cast(Player.ServerPosition.To2D().Extend(prediction.CastPosition.To2D(), Q.Range - 100)); QET = Utils.TickCount; W.LastCastAttemptT = Utils.TickCount; } } if (R.IsReady() && (Config.Item("UseRCombo").GetValue <bool>())) { if (target.Health < R.GetDamage(target)) { R.Cast(target); } } }
public List <EmployeeMinimumWagesReport> GetReportData(DateTime?DateFrom, DateTime?DateTo, int?DepartmentID, int?DesignationID, int?LocationID, int?EmployementTypeID) { using (dbVisionEntities db = new dbVisionEntities()) { var Res = (from r in db.tblEmployees join pe in db.tblEmployeeServiceDetails on r.EmployeeLastServiceDetailID equals pe.EmployeeServiceDetailID into PE from ep in PE.DefaultIfEmpty() join np in db.tblEmployeeNoPrefixes on r.EmployeeNoPrefixID equals np.EmployeeNoPrefixID into NP from pn in NP.DefaultIfEmpty() join qe in db.tblEmployeeDesignations on ep.EmployeeDesignationID equals qe.EmployeeDesignationID into QE from eq in QE.DefaultIfEmpty() join lc in db.tblLocations on ep.LocationID equals lc.LocationID into LC from L in LC.DefaultIfEmpty() join mw in db.tblMinimumWageCategories on ep.MinimumWageCategoryID equals mw.MinimumWageCategoryID into MW from M in MW.DefaultIfEmpty() where ((DateFrom == null || ep.EmploymentEffectiveDate <= DateTo) && (DateTo == null || ep.TerminationDate == null || ep.TerminationDate >= DateFrom)) && r.CompanyID == Model.CommonProperties.LoginInfo.LoggedInCompany.CompanyID && (DesignationID == null || ep.EmployeeDesignationID == DesignationID.Value) && (LocationID == null || ep.LocationID == LocationID.Value) && (DepartmentID == null || ep.EmployeeDepartmentID == DepartmentID.Value) && (EmployementTypeID == 3 ? (EmployementTypeID == null || ep.EmploymentType != 0) : (EmployementTypeID == null || ep.EmploymentType == EmployementTypeID.Value)) && r.rstate != (int)eRecordState.Deleted select new EmployeeMinimumWagesReport() { EmployeeID = r.EmployeeID, EmployeeNoPrefix = (pn != null ? pn.EmployeeNoPrefixName : null), EmployeeNo = r.EmployeeNo, EmployementTypeID = (eEmploymentType)ep.EmploymentType, EmployeeName = r.EmployeeFirstName + " " + r.EmployeeLastName, Designation = eq.EmployeeDesignationName, Category = M.MinimumWageCategoryName, Location = L.LocationName, LocationTypeID = (eLocationType)L.LocationTypeID, BasicSalary = ep.BasicSalary, MinWagesSal = ((from d in db.tblMinimumWageRates where d.MinimumWageCategoryID == ep.MinimumWageCategoryID && ((DateFrom == null || d.WEDateFrom >= DateFrom) && (d.WEDateTo == null)) orderby d.MinimumWageRateID select new { minsale = (eLocationType)L.LocationTypeID == eLocationType.Rural ? d.MinimumWageCategoryRuralRate : d.MinimumWageCategoryUrbanRate }).FirstOrDefault() == null ? 0 : (from d in db.tblMinimumWageRates where d.MinimumWageCategoryID == ep.MinimumWageCategoryID && ((DateFrom == null || d.WEDateFrom >= DateFrom) && (d.WEDateTo == null)) orderby d.MinimumWageRateID select new { minsale = (eLocationType)L.LocationTypeID == eLocationType.Rural ? d.MinimumWageCategoryRuralRate : d.MinimumWageCategoryUrbanRate }).FirstOrDefault().minsale), }).ToList(); return(Res); } }
public static Db4objects.Db4o.Internal.Fieldindex.QEBitmap ForQE(QE qe) { bool[] bitmap = new bool[4]; qe.IndexBitMap(bitmap); return(new Db4objects.Db4o.Internal.Fieldindex.QEBitmap(bitmap)); }