public static void Execute() { if (player.ManaPercent < MenuValue.JungleClear.ManaLimit) { return; } if (MenuValue.JungleClear.UseQ && Q.IsReady()) { var monster = Q.GetJungleMobs(); if (monster.Any()) { Q.Cast(monster.First()); } } if (MenuValue.JungleClear.UseE && E.IsReady()) { var mob = E.GetJungleMobs(); if (mob.Any()) { var creep = mob.OrderBy(x => x.Distance(player)).ToArray(); var source = E1.IsInRange(creep[0]) ? creep[0].Position.To2D() : player.Position.Extend(creep[0], E1.Range - 10); var line = EntityManager.MinionsAndMonsters.GetLineFarmLocation(mob, E.Width, 500, source); E.CastStartToEnd(line.CastPosition, source.To3DWorld()); } } }
public override int GetHashCode() { unchecked { return((E1.GetHashCode() * 397) ^ E2.GetHashCode()); } }
public void CanCorrectlyBuildGraph1() { var builder = new ContainerBuilder(); builder.RegisterType <A1>().SingleInstance(); builder.RegisterType <CD1>().As <IC1, ID1>().SingleInstance(); builder.RegisterType <E1>().SingleInstance(); builder.Register(ctr => new B1(ctr.Resolve <A1>())); var target = builder.Build(); E1 e = target.Resolve <E1>(); A1 a = target.Resolve <A1>(); B1 b = target.Resolve <B1>(); IC1 c = target.Resolve <IC1>(); ID1 d = target.Resolve <ID1>(); Assert.IsInstanceOf <CD1>(c); CD1 cd = (CD1)c; Assert.AreSame(a, b.A); Assert.AreSame(a, cd.A); Assert.AreNotSame(b, cd.B); Assert.AreSame(c, e.C); Assert.AreNotSame(b, e.B); Assert.AreNotSame(e.B, cd.B); }
/// <summary> /// The cast qe hammer. /// </summary> private static void CastQEHammer() { var Enemies = GameObjects.EnemyHeroes.Where(x => (x != null) && x.IsValidTarget()); foreach (var Enemy in Enemies.Where(x => x.IsValidTarget(E1.Range) && (Q1.GetDamage(x) + HammerEDmg(x) > x.Health))) { if (RangeForm()) { if (R.IsReady()) { R.Cast(); } } else { if (Q1.IsReady() && E1.IsReady()) { Q1.Cast(Enemy); if (E1.IsReady()) { E1.Cast(); } } } } }
/// <summary> /// Harass End /// </summary> /// /// <summary> /// KS /// </summary> private static void ks() { var target = TargetSelector.GetTarget(W.Range, TargetSelector.DamageType.Magical); if (Menu.Item("ksW").GetValue <bool>() && W.IsReady() && target.IsValidTarget(W.Range) && W.IsReady() && W.IsKillable(target)) { W.CastIfHitchanceEquals(target, HitChance.VeryHigh); } if (Menu.Item("ksE").GetValue <bool>() && E.IsReady() && target.IsValidTarget(E.Range) && E.IsReady() && E.IsKillable(target)) { E.CastIfHitchanceEquals(target, HitChance.VeryHigh); } if (Menu.Item("ksWR").GetValue <bool>() && R.IsReady() && W.IsReady() && target.IsValidTarget(W1.Range) && W1.IsKillable(target)) { R.Cast(); W1.CastIfHitchanceEquals(target, HitChance.VeryHigh); } if (Menu.Item("ksER").GetValue <bool>() && R.IsReady() && E.IsReady() && target.IsValidTarget(E1.Range) && E1.IsKillable(target)) { E1.CastIfHitchanceEquals(target, HitChance.VeryHigh); } }
public Intersections _IntersectLocal(Ray ray) { var dirCrossE2 = ray.Direction * E2; var det = E1.DotProduct(dirCrossE2); if (Math.Abs(det) < Helper.Epsilon) { return(new Intersections()); } var f = 1.0 / det; var p1ToOrigin = ray.Origin - P1; var u = f * p1ToOrigin.DotProduct(dirCrossE2); if (u < 0 || u > 1) { return(new Intersections()); } var originCrossE1 = p1ToOrigin * E1; var v = f * ray.Direction.DotProduct(originCrossE1); if (v < 0 || (u + v) > 1) { return(new Intersections()); } var t = f * E2.DotProduct(originCrossE1); return(new Intersections { new Intersection(t, this, u, v) }); }
/// <summary> /// R /// </summary> private static void rR() { if (R.IsReady() && W.IsReady() && (Menu.Item("comboR").GetValue <bool>() && Menu.Item("rW").GetValue <bool>())) { var target = TargetSelector.GetTarget(W1.Range, TargetSelector.DamageType.Magical); R.Cast(); if (target.IsValidTarget(W1.Range)) { W1.CastIfHitchanceEquals(target, HitChance.VeryHigh); } } if (R.IsReady() && E.IsReady() && (Menu.Item("comboR").GetValue <bool>() && Menu.Item("rE").GetValue <bool>())) { var target = TargetSelector.GetTarget(E1.Range, TargetSelector.DamageType.Magical); R.Cast(); if (target.IsValidTarget(E1.Range)) { E1.CastIfHitchanceEquals(target, HitChance.High); } } if (R.IsReady() && Q.IsReady() && (Menu.Item("comboR").GetValue <bool>() && Menu.Item("rQ").GetValue <bool>())) { var target = TargetSelector.GetTarget(600, TargetSelector.DamageType.Magical); R.Cast(); Q.Cast(Player); } }
public static void Main() { E1 b = E1.A; E2 d = E2.A; bool brr = b == d; }
public override Expr Simplify() { var e1 = E1.Simplify(); var e2 = E2.Simplify(); if (e2.GetType() == typeof(CstI)) { if ((e2 as CstI).Value == 1) { return(e1); } if (e1.GetType() == typeof(CstI)) { if ((e1 as CstI).Value == 1) { return(e2); } else if ((e2 as CstI).Value == 0 || (e1 as CstI).Value == 0) { return(new CstI(0)); } } } return(new Mul(e1, e2)); }
public static void AssertComplex(Class1 c, E1 item1, E1 item2, E1 item3, char l1, char l2, char l3) { Assert.NotNull(c, "ac #1"); Assert.NotNull(c.Sub1, "ac #2"); //Cycle references are ignored during serialization therefore deserialization will not restore it //Assert.NotNull(c.Sub1.Owner, "ac #3"); //Assert.True(c.Sub1.Owner == c, "ac #4"); Assert.NotNull(c.Sub2, "ac #5"); //Cycle references are ignored during serialization therefore deserialization will not restore it //Assert.NotNull(c.Sub2.Owner, "ac #6"); //Assert.True(c.Sub2.Owner == c, "ac #7"); Assert.True((object)c.Sub1 is SubClass1, "ac #8"); Assert.True((object)c.Sub2 is SubClass2, "ac #9"); Assert.True((object)c.Sub1.List1 is List <E1>, "ac #10"); Assert.True((object)c.Sub2.List1 is List <char>, "ac #11"); Assert.AreEqual(3, c.Sub1.List1.Count, "ac #12"); Assert.AreEqual(3, c.Sub2.List1.Count, "ac #13"); Assert.AreEqual(item1, c.Sub1.List1[0], "ac #14"); Assert.AreEqual(item2, c.Sub1.List1[1], "ac #15"); Assert.AreEqual(item3, c.Sub1.List1[2], "ac #16"); Assert.AreEqual(l1, c.Sub2.List1[0], "ac #17"); Assert.AreEqual(l2, c.Sub2.List1[1], "ac #18"); Assert.AreEqual(l3, c.Sub2.List1[2], "ac #19"); }
//Entity without StoredProcedures protected void Button1_Click(object sender, EventArgs e) { try { EMPDATA E = new EMPDATA(); E.EMPNO = int.Parse(txtEmployeeNo.Text); E.ENAME = txtEmployeeName.Text; E.JOB = txtJob.Text; E.MGR = int.Parse(txtMGR.Text); E.HIREDATE = DateTime.Parse(txtHireDate.Text); E.SAL = int.Parse(txtSalary.Text); E.COMM = int.Parse(txtCommission.Text); E.DEPTNO = int.Parse(txtDepartmentNo.Text); D.EMPDATAs.Add(E); D.SaveChanges(); } catch (DbUpdateException E1) { SqlException ex = E1.GetBaseException() as SqlException; if (ex.Message.Contains("EMP_PK")) { Label1.Text = "No Duplicate Empno"; } else if (ex.Message.Contains("FK__EMPDATA_DEPTNO")) { Label1.Text = "No Duplicate Deptno"; } else { Label1.Text = ex.Message; } } }
private void E5_Tick(object sender, EventArgs e) { PS3.Extension.WriteString(0x004eb39c, "^5S^7pec Ops ^5M^7od Menu ^5B^7y ^5M^7rNiato - ^5A^7ccount ^5M^7enu^5\n\nLevel 50\nLevel 0\nLegit Stats\nHight Stats\n^2-->^5Max Stats"); if (Key_IsDown((uint)0) == "R1") { E5.Stop(); E1.Start(); } if (Key_IsDown((uint)0) == "X") { byte[] buffer = new byte[] { 0x75, 0x30 }; PS3.SetMemory(0x01881591, buffer); byte[] buffer1 = new byte[] { 0x14, 0x73 }; PS3.SetMemory(0x01881595, buffer1); byte[] buffer2 = new byte[] { 0xEB }; PS3.SetMemory(0x01881599, buffer2); byte[] buffer3 = new byte[] { 0x16, 0x03 }; PS3.SetMemory(0x018815a5, buffer3); } if (Key_IsDown((uint)0) == "R3") { E5.Stop(); HostMenuMain.Start(); } if (Key_IsDown((uint)0) == "L1") { E5.Stop(); E4.Start(); } }
private void Jungle() { if (Program.LaneClear && Player.Mana > RMANA + WMANA + WMANA) { var mobs = Cache.GetMinions(Player.ServerPosition, 700, MinionTeam.Neutral); if (mobs.Count > 0) { var mob = mobs[0]; if (Range) { if (Q.IsReady() && Config.Item("jungleQ", true).GetValue <bool>()) { Q.Cast(mob.ServerPosition); return; } if (W.IsReady() && Config.Item("jungleE", true).GetValue <bool>()) { if (SebbyLib.Orbwalking.InAutoAttackRange(mob)) { W.Cast(); } return; } if (Config.Item("jungleR", true).GetValue <bool>()) { R.Cast(); } } else { if (Q1.IsReady() && Config.Item("jungleQm", true).GetValue <bool>() && mob.IsValidTarget(Q1.Range)) { Q1.Cast(mob); return; } if (W1.IsReady() && Config.Item("jungleWm", true).GetValue <bool>()) { if (mob.IsValidTarget(300)) { W.Cast(); } return; } if (E1.IsReady() && Config.Item("jungleEm", true).GetValue <bool>() && mob.IsValidTarget(E1.Range)) { if (mob.IsValidTarget(E1.Range)) { E1.Cast(mob); } return; } if (Config.Item("jungleR", true).GetValue <bool>()) { R.Cast(); } } } } }
protected override Intersections LocalIntersect(Ray ray) { var results = new Intersections(); var dirCrossE2 = ray.Direction.Cross(E2); var det = E1.Dot(dirCrossE2); if (Math.Abs(det) < MathHelper.Epsilon) { return(results); } var f = 1.0 / det; var p1ToOrigin = new Vector(ray.Origin - P1); var u = f * p1ToOrigin.Dot(dirCrossE2); if ((u < 0) || (u > 1)) { return(results); } var originCrossE1 = p1ToOrigin.Cross(E1); var v = f * ray.Direction.Dot(originCrossE1); if ((v < 0) || (u + v > 1)) { return(results); } var t = f * E2.Dot(originCrossE1); results.Add(new Intersection(t, this, u, v)); return(results); }
/// <summary> /// The cast R. /// </summary> private static void CastR() { var target = Variables.TargetSelector.GetTarget(Q1.Range); if (R.IsReady() && ComboR.Value && target.IsValidTarget()) { if (RangeForm()) { if (!Q.IsReady() && !W.IsReady() && (HammerQ_CD_R == 0) && (target.DistanceToPlayer() < Q1.Range)) { R.Cast(); } } else { if (!Q1.IsReady() && !W1.IsReady() && (CannonQ_CD_R == 0) && ((CannonW_CD_R == 0) || (CannonE_CD_R == 0))) { R.Cast(); } if (!Q1.IsReady() && !W1.IsReady() && !E1.IsReady()) { R.Cast(); } } } }
protected internal override IntersectionList LocalIntersect(Ray localRay) { Vector directionCrossE2 = localRay.Direction.Cross(E2); double determinant = E1.Dot(directionCrossE2); if (determinant.IsApproximatelyEqual(0)) { return(IntersectionList.Empty); } double f = 1.0 / determinant; Vector p1ToOrigin = localRay.Origin - P1; double u = f * p1ToOrigin.Dot(directionCrossE2); if (u < 0 || u > 1) { return(IntersectionList.Empty); } Vector originCrossE1 = p1ToOrigin.Cross(E1); double v = f * localRay.Direction.Dot(originCrossE1); if (v < 0 || u + v > 1) { return(IntersectionList.Empty); } double t = f * E2.Dot(originCrossE1); return(new IntersectionList(new Intersection(t, this, u, v))); }
public static Class1 CreateComplex(E1 item1, E1 item2, E1 item3, char l1, char l2, char l3) { var c = new Class1(); c.Sub1 = new SubClass1 { Owner = c, List1 = new List <E1> { item1, item2, item3 } }; c.Sub2 = new SubClass2 { Owner = c, List1 = new List <char> { l1, l2, l3 } }; return(c); }
protected (bool, float, float, float) TestLocalIntersection(Ray localRay) { Tuple dirCrossE2 = localRay.Direction.Cross(E2); float det = E1.Dot(dirCrossE2); if (Abs(det) < Constants.floatEps) { return(false, 0, 0, 0); } float invDet = 1.0f / det; Tuple p1ToOrigin = localRay.Origin - P1; float u = invDet * p1ToOrigin.Dot(dirCrossE2); if (u < 0 || u > 1) { return(false, 0, 0, 0); } Tuple originCrossE1 = p1ToOrigin.Cross(E1); float v = invDet * localRay.Direction.Dot(originCrossE1); if (v < 0 || (u + v) > 1) { return(false, 0, 0, 0); } float t = invDet * E2.Dot(originCrossE1); return(true, t, u, v); }
private void A1_Tick(object sender, EventArgs e) { PS3.Extension.WriteString(0x004eb39c, "^5S^7pec Ops ^5M^7od Menu ^5B^7y ^5M^7rNiato - ^5M^7ain ^5M^7enu\n\n^2-->^5Host Menu\nClient 1 Menu\nReset Menu\nAccount Menu\nTeleport Menu\nVision Menu\nCredit Menu\n\n\n^3Client 0 : ^2" + textBox1.Text + "\n^3Client 1 : ^2" + textBox2.Text + "^5"); if (Key_IsDown((uint)0) == "X") { HostMenuMain.Stop(); B1.Start(); } if (Key_IsDown((uint)0) == "R1") { HostMenuMain.Stop(); Client1.Start(); } if (Key_IsDown((uint)0) == "R3 + L3") { HostMenuMain.Stop(); B1.Stop(); B2.Stop(); B3.Stop(); B4.Stop(); B5.Stop(); Client1.Stop(); C1.Stop(); C2.Stop(); C3.Stop(); C4.Stop(); ResetMenu.Stop(); D1.Stop(); D2.Stop(); D3.Stop(); D4.Stop(); D5.Stop(); AccountMenu.Stop(); E1.Stop(); E2.Stop(); E3.Stop(); E4.Stop(); E5.Stop(); TeleportMenu.Stop(); F1.Stop(); F2.Stop(); F3.Stop(); F4.Stop(); VisionMenu.Stop(); G1.Stop(); G2.Stop(); G3.Stop(); G4.Stop(); G5.Stop(); G6.Stop(); OtherMenu.Stop(); H1.Stop(); PS3.Extension.WriteString(0x004eb39c, "^5Menu ^1Closed"); simpleButton2.Enabled = true; toolStripStatusLabel2.Text = "Not Started !"; toolStripStatusLabel2.ForeColor = Color.Red; simpleButton3.Enabled = false; } }
public void ZeroOneRemoval() { var x = VF("x"); var ex = Ex.Block(Ex.Add(x, E1), Ex.Add(x, E0), E1.Mul(x), x.Mul(E0), x.Sub(E0), E0.Sub(x)); AreEqual("((x+1);\n(x+0);\n(1*x);\n(x*0);\n(x-0);\n(0-x);)", ex.Debug()); AreEqual("((x+1);\nx;\nx;\n0;\nx;\n(0-x);)", ex.FlatDebug()); }
private void check_e1(E1 v, int?a, int?b) { Assert.AreEqual(a, v.a); Assert.AreEqual(a, v.GetA()); Assert.AreEqual(b, v.b); Assert.AreEqual(b, v.GetB()); }
public void ValidateDocument() { Assert.IsFalse(DevUtilsXmlUtils.ValidateDocument(null, Xsd, Ns.NamespaceName), "Error validating xml, expected false"); Assert.IsFalse(DevUtilsXmlUtils.ValidateDocument(E1.ToString(), null, Ns.NamespaceName), "Error validating xml, expected false"); Assert.IsFalse(DevUtilsXmlUtils.ValidateDocument(E1.ToString(), Xsd, null), "Error validating xml, expected false"); Assert.IsFalse(DevUtilsXmlUtils.ValidateDocument(E1.ToString(), Xsd, Ns.NamespaceName), "Error validating xml, expected false"); Assert.IsTrue(DevUtilsXmlUtils.ValidateDocument(E2.ToString(), Xsd, Ns.NamespaceName), "Error validating xml, expected true"); }
private void testEnumExport(E1 e, XType t, Field f) { StructValue sv = vf.ExportCustomValue(e); sv.CheckType(t); Assert.AreEqual(1, sv.Count); Assert.IsTrue((Boolean)sv.Get(f)); }
private void afterAttack(AttackableUnit unit, AttackableUnit target) { if (unit.IsMe && !player.IsBurrowed() && E1.IsReady() && player.ManaPercent > 99f) { E1.CastOnUnit((Obj_AI_Base)target); } }
public override Expr Simplify() { if ((E2 as CstI) != null && (E2 as CstI).Value == 0) { return(E1.Simplify()); } return(new Sub(E1.Simplify(), E2.Simplify())); }
private void testEnumImport(E1 e, XType t, Field f) { StructValue sv = new StructValue(t, vf); sv.Add(f, true); E1 a = (E1)vf.ImportCustomValue(sv); Assert.AreEqual(e, a); }
/// <summary> /// Normalize a vector. /// </summary> public static tv2 Norm(ev2 v2) => EEx.ResolveV2(v2, xy => { var mag = VFloat(); return(Ex.Block(new[] { mag }, mag.Is(Mag(xy)), Ex.Condition(mag.GT(ExC(M.MAG_ERR)), xy.Mul(E1.Div(mag)), xy ) )); });
/// <summary> /// Normalize a vector. /// </summary> public static tv3 Norm3(ev3 v3) => EEx.ResolveV3(v3, xyz => { var mag = VFloat(); return(Ex.Block(new[] { mag }, mag.Is(v3Mag(xyz)), Ex.Condition(mag.GT(ExC(M.MAG_ERR)), xyz.Mul(E1.Div(mag)), xyz ) )); });
private async Task InitOnEntry(Event e) { var tcs = (e as Config1).Tcs; var e1 = new E1(); var m = await this.Context.CreateActorAndExecuteAsync(typeof(N1)); await this.Context.SendEventAndExecuteAsync(m, e1); this.Assert(e1.Value is 1); tcs.SetResult(true); }
void Start() { current_population = new List <Child>(); player = GameObject.Find("Player"); indicator = GameObject.Find("Damage Indicator"); path = Application.streamingAssetsPath + "/Enemies.json"; enemydatabase = File.ReadAllText(path); Enemy en = JsonUtility.FromJson <Enemy>(enemydatabase); Sprite[] sprites = Resources.LoadAll <Sprite>("Art/CharacterSpriteSheet"); AnimationController eac = enemy.GetComponent <AnimationController>(); eac.SecondsPerFrame = 0.25f; eac.spr = enemy.GetComponent <SpriteRenderer>(); eac.Animations = new AnimationController.SpriteAnimation[2]; eac.Animations[0] = new AnimationController.SpriteAnimation(); eac.Animations[0].name = "Idle"; eac.Animations[0].sprites = new Sprite[4]; eac.Animations[0].sprites[0] = sprites[45]; eac.Animations[0].sprites[1] = sprites[46]; eac.Animations[0].sprites[2] = sprites[47]; eac.Animations[0].sprites[3] = sprites[48]; eac.Animations[1] = new AnimationController.SpriteAnimation(); eac.Animations[1].name = "Attack"; eac.Animations[1].sprites = new Sprite[5]; eac.Animations[1].sprites[0] = sprites[24]; eac.Animations[1].sprites[1] = sprites[25]; eac.Animations[1].sprites[2] = sprites[26]; eac.Animations[1].sprites[3] = sprites[27]; eac.Animations[1].sprites[4] = sprites[28]; EnemyController ec; GameObject E1; for (int i = -75; i < 75; i += 35) { for (int j = -75; j < 75; j += 35) { for (int k = 0; k < 4; k++) { E1 = Instantiate(enemy, new Vector3(i + Random.value * 5 - 2.5f, j + Random.value * 5 - 2.5f, 0), Quaternion.identity); ec = E1.GetComponent <EnemyController>(); ec.target = player; ec.distanceThreshold = Random.value * 15 + 2; ec.attackThreshold = Random.value * 3 + 0; ec.damageIndicator = indicator; ec.attack = Random.value * 5 + 1; ec.speed = Random.value * 10 + 2; ec.defense = Random.value * .7f + .1f; Enemies.Add(E1); } } } }