private void a(object A_0, CreateObjectEventArgs A_1) { try { if (A_1.get_New().get_ObjectClass() == 0x1b) { CoordsObject obj2 = A_1.get_New().Coordinates(); dz dz = dz.a(obj2.get_EastWest(), obj2.get_NorthSouth(), 0.0); if (this.e.ContainsKey(A_1.get_New().get_Id()) && (dz.a(this.e[A_1.get_New().get_Id()].l, false) > 0.004167)) { this.e.Remove(A_1.get_New().get_Id()); } if (!this.e.ContainsKey(A_1.get_New().get_Id())) { b5.a a = new b5.a { l = dz, h = A_1.get_New().get_Name() == ("Corpse of " + CoreManager.get_Current().get_CharacterFilter().get_Name()) }; this.e.Add(A_1.get_New().get_Id(), a); PluginCore.cq.u.a(A_1.get_New().get_Id(), b0.a.c); } else { this.e[A_1.get_New().get_Id()].d = DateTimeOffset.Now; this.e[A_1.get_New().get_Id()].a = false; } } } catch (Exception exception) { ad.a(exception); } }
public bool d() { ReadOnlyCollection <cv> onlys = PluginCore.cq.p.a(ObjectClass.Monster); dz dz = PluginCore.cq.p.d(PluginCore.cq.p.f()).b(PluginCore.cq.ax.get_Actions()); if (this.a.ToString() != k.b(base.a["n"])) { try { this.a = new Regex(k.b(base.a["n"]), RegexOptions.Compiled); } catch { this.a = new Regex(""); ai.a("Warning: invalid regex \"" + k.b(base.a["n"]) + "\" in Meta condition."); } } double num = k.f(base.a["r"]) / 240.0; int num2 = k.e(base.a["c"]); int num3 = 0; foreach (cv cv in onlys) { if (this.a.IsMatch(cv.e()) && (dz.a(cv.b(PluginCore.cq.ax.get_Actions()), true) <= num)) { num3++; if (num3 >= num2) { return(true); } } } return(false); }
public bool c() { ReadOnlyCollection <cv> onlys = PluginCore.cq.p.a(ObjectClass.Monster); dz dz = PluginCore.cq.p.d(PluginCore.cq.p.f()).b(PluginCore.cq.ax.get_Actions()); double num = k.f(base.a["r"]) / 240.0; foreach (cv cv in onlys) { if (dz.a(cv.b(PluginCore.cq.ax.get_Actions()), true) <= num) { return(false); } } return(true); }
public bool d() { ReadOnlyCollection <cv> onlys = PluginCore.cq.p.a(ObjectClass.Monster); dz dz = PluginCore.cq.p.d(PluginCore.cq.p.f()).b(PluginCore.cq.ax.get_Actions()); double num = k.f(base.a["r"]) / 240.0; int num2 = k.e(base.a["c"]); int num3 = k.e(base.a["p"]); int num4 = 0; foreach (cv cv in onlys) { if ((PluginCore.cq.d.a(cv).a == num3) && (dz.a(cv.b(PluginCore.cq.ax.get_Actions()), true) <= num)) { num4++; if (num4 >= num2) { return(true); } } } return(false); }
public void b() { ev cq = PluginCore.cq; if (this.a != null) { MyQuad <int, eDamageElement, ePrismaticDamageBehavior, int> quad = this.a.a(); if (((eDamageElement)quad.b) == eDamageElement.Random) { quad.b = (eDamageElement)this.d; this.d++; if (this.d == 7) { this.d = 0; } } bool flag = (this.a.b().b == eDamageElement.Fists) && PluginCore.cq.h.c(PluginCore.cq.e.a("Tusker Fists")); int num = quad.a; eDamageElement b = quad.b; TimeSpan span = TimeSpan.FromSeconds((double)er.i("DebuffPrecastSeconds")); float num2 = 1f; CombatState state = 8; if (dh.b(num) && (dh.c(num) == PluginCore.cg)) { state = PluginCore.cq.n.a(PluginCore.cq.aw.get_WorldFilter().get_Item(num).get_ObjectClass()); if (state == 2) { fn.a a = PluginCore.cq.n.d(num); if ((a.i == 1) && (PluginCore.cq.n.c(quad.d) != a1.c)) { if ((b == eDamageElement.Slash) && a.d) { num2 = 0.5f; } else { num2 = 0f; } } else if (((b == eDamageElement.Pierce) && a.d) && !a.f) { num2 = 0.2f; } else if (((b == eDamageElement.Pierce) && a.d) && (a.f && (PluginCore.cq.n.c(quad.d) == a1.c))) { num2 = 0.49f; } else if (((b == eDamageElement.Pierce) && a.d) && (a.f && (PluginCore.cq.n.c(quad.d) != a1.d))) { num2 = 0.2f; } else { num2 = 1f; } } } if (er.j("UseRecklessness") && dh.b(eGameSkillID.Recklessness)) { if (num2 < 0.11f) { num2 = 0.11f; } if (num2 > 0.9f) { num2 = 0.9f; } } bool flag2 = !cq.d.a(this.a.a).s; bool i = cq.d.a(this.a.a).i; bool r = cq.d.a(this.a.a).r; if (cq.d.a(this.a.a).h&& (cq.i.a(this.a.b, this.a(cq.e.a("Magic Yield Other I"))) <= span)) { this.a("Magic Yield Other I", this.a.b, num); } else if (cq.d.a(this.a.a).m&& (cq.i.a(this.a.b, this.a(cq.e.a("Weakening Curse I"))) <= span)) { this.a("Weakening Curse I", this.a.b, num); } else if (cq.d.a(this.a.a).n&& (cq.i.a(this.a.b, this.a(cq.e.a("Festering Curse I"))) <= span)) { this.a("Festering Curse I", this.a.b, num); } else if (cq.d.a(this.a.a).o&& (cq.i.a(this.a.b, this.a(cq.e.a("Corruption I"))) <= TimeSpan.Zero)) { this.a("Corruption I", this.a.b, num); } else if (cq.d.a(this.a.a).p&& (cq.i.a(this.a.b, this.a(cq.e.a("Destructive Curse I"))) <= TimeSpan.Zero)) { this.a("Destructive Curse I", this.a.b, num); } else if (cq.d.a(this.a.a).q&& (cq.i.a(this.a.b, this.a(cq.e.a("Corrosion I"))) <= TimeSpan.Zero)) { this.a("Corrosion I", this.a.b, num); } else if (cq.d.a(this.a.a).f&& (cq.i.a(this.a.b, this.a(cq.e.a("Imperil Other I"))) <= span)) { this.a("Imperil Other I", this.a.b, num); } else if (cq.d.a(this.a.a).g&& (cq.i.a(this.a.b, this.a(cq.h.a(b, eCombatSpellType.Vuln))) <= span)) { this.a(cq.h.a(b, eCombatSpellType.Vuln), this.a.b, num); } else if ((cq.d.a(this.a.a).c != eDamageElement.None) && (cq.i.a(this.a.b, this.a(cq.h.a(cq.d.a(this.a.a).c, eCombatSpellType.Vuln))) <= span)) { this.a(cq.h.a(cq.d.a(this.a.a).c, eCombatSpellType.Vuln), this.a.b, num); } else if (cq.d.a(this.a.a).j&& (cq.i.a(this.a.b, this.a(cq.e.a("Gravity Well"))) <= span)) { this.a("Gravity Well", this.a.b, num); } else if (cq.d.a(this.a.a).k&& (cq.i.a(this.a.b, this.a(cq.e.a("Broadside of a Barn"))) <= span)) { this.a("Broadside of a Barn", this.a.b, num); } else if (cq.d.a(this.a.a).l&& (cq.i.a(this.a.b, this.a(cq.e.a("Fester Other I"))) <= span)) { this.a("Fester Other I", this.a.b, num); } else if (flag) { if (state != 8) { PluginCore.cq.v.d(); if (!PluginCore.cq.n.a(8, 0, true)) { return; } } else { PluginCore.cq.v.d(); if (!PluginCore.cq.n.a(8, num, false)) { return; } } cv cv = PluginCore.cq.p.d(PluginCore.cg); cv cv2 = this.a.a; if (cv != null) { dz dz = cv.b(PluginCore.cq.ax.get_Actions()); dz w = cv2.w; if (!PluginCore.cq.aq.a(dz.a(w) - 0.062831853071795868)) { return; } } this.a("Tusker Fists", this.a.b); } else if (state == 8) { PluginCore.cq.aq.b(); PluginCore.cq.v.d(); if (PluginCore.cq.n.a(8, num, false)) { if ((i && (this.b >= er.i("MinimumRingTargets"))) || ((i && !flag2) && (!r && (this.b > 0)))) { if (b == eDamageElement.DrainAuto) { PluginCore.cq.ao.a(this.a.b, true); } else { MySpell spell = cq.h.a(b, eCombatSpellType.Ring); if (spell.HasScarabsInInventory) { this.a(spell, this.a.b); } else { this.a(this.a(b, this.a), this.a.b); } } } else if ((flag2 && !r) || ((!flag2 && !r) && i)) { if (b == eDamageElement.DrainAuto) { PluginCore.cq.ao.a(this.a.b, false); } else { this.a(this.a(b, this.a), this.a.b); } } else if (!flag2 && r) { if (b == eDamageElement.DrainAuto) { PluginCore.cq.ao.a(this.a.b, false); } else { MySpell spell2 = PluginCore.cq.h.a(PluginCore.cq.h.a(b, eCombatSpellType.Streak)); if (spell2 != null) { this.a(spell2, this.a.b); } else { ai.a(string.Format("No streak spell usable for element '{0}', using bolt/arc instead.", er.a(b))); this.a(this.a(b, this.a), this.a.b); } } } else if (flag2 && r) { MySpell spell3 = PluginCore.cq.h.a(PluginCore.cq.h.a(b, eCombatSpellType.Streak)); int num3 = 0; if (spell3 != null) { if (PluginCore.cq.an.d() > 0) { num3 = PluginCore.cq.an.d() / 7; } else { num3 = spell3.Difficulty / 7; } } bool flag5 = ((PluginCore.cq.an.h() == this.a.b) && (PluginCore.cq.an.b() > 0)) && (PluginCore.cq.an.b() < num3); if (b == eDamageElement.DrainAuto) { PluginCore.cq.ao.a(this.a.b, false); } else if (flag5 && (spell3 != null)) { this.a(spell3, this.a.b); } else { if (flag5) { ai.a(string.Format("No streak spell usable for element '{0}', using bolt/arc instead.", er.a(b))); } this.a(this.a(b, this.a), this.a.b); } } } } else { PluginCore.cq.aq.b(); if (PluginCore.cq.n.a(state, num, false, b, quad.c, quad.d)) { PluginCore.cq.v.a(this.a.b, num2, null); } } } }