public void a(int A_0, bool A_1) { if (PluginCore.cq.an.h() == A_0) { cv cv = PluginCore.cq.p.d(A_0); if (cv != null) { int num = PluginCore.cq.ax.get_Actions().get_Vital().get_Item(2); int num2 = PluginCore.cq.ax.get_Actions().get_Vital().get_Item(1); int num3 = PluginCore.cq.an.b(); int num4 = ((int)Math.Ceiling((double)((num2 * er.i("Recharge-Norm-HitP")) / 100.0))) - 1; if (((num != 0) && (num2 != 0)) && (num3 != 0)) { bool flag = true; v v = PluginCore.cq.x.c["MonsterImmunities"].a(0, k.a(cv.g())); if ((v != null) && ((k.e(v[1]) & 2) > 0)) { flag = false; } MySpell spell = bq.a(num, num2, num4, num3, flag, A_1); if (spell != null) { PluginCore.cq.g.a(spell, A_0); } else { PluginCore.cq.ak.Recharge(eRechargeVital_Single.Health); } } } } }
public void a(int A_0, int A_1) { if (((PluginCore.cq.ax.get_Actions().get_CombatMode() == 8) && (this.a() == s.b.a)) && !PluginCore.cq.g.e()) { if (this.c.Contains(A_0)) { if (PluginCore.cq.n.e() == 0) { return; } this.f = 2; } else { this.f = 0; } this.d = false; this.g = A_0; this.h = A_1; this.i = null; if (dh.b(A_0)) { if (PluginCore.cq.aw.get_WorldFilter().get_Item(A_0).get_HasIdData()) { this.a(A_0, true); } else { PluginCore.cq.u.b(A_0, new b0.b(this.a)); } } PluginCore.cq.n.a("WandCaster: Begin", e8.i); this.a(s.b.d); } }
private void a(ActiveSpellInfo A_0) { if (!A_0.IsCoolDown) { MySpell spell = A_0.Spell; if (this.d.ContainsKey(spell.RealFamily)) { dl.b b; b = new dl.b { b = spell.Quality, c = spell.Id, d = A_0.ExpireTime, a = b.d }; this.d[spell.RealFamily].a.Add(b); } else { dl.a a = new dl.a(); dl.b item = new dl.b(); a.a = new MyList <dl.b>(0x18); item.b = spell.Quality; item.c = spell.Id; item.d = A_0.ExpireTime; item.a = item.d; a.a.Add(item); this.d.Add(spell.RealFamily, a); } PluginCore.PC.d(A_0.Id, PluginCore.cq.aw.get_CharacterFilter().get_Id(), (int)(A_0.Duration * 1000.0)); } }
public void f() { int num = 0; int num2 = 0; MySpell spell = this.a(out num, out num2); if ((spell != null) && (num2 == 0)) { this.a.g.a(spell, num); } else if (num2 != 0) { if (cx.a(PluginCore.cq.p.d(num2))) { if (!PluginCore.cq.ap.d()) { PluginCore.cq.n.a("Buffing: item selected with cooldown and not busy. " + PluginCore.cq.aw.get_WorldFilter().get_Item(num2).get_Name(), e8.e); this.a.ax.get_Actions().UseItem(num2, 0); this.a.n.n.a(ActionLockType.ItemUse, this.a.n.j); } else { PluginCore.cq.n.a("Buffing: item selected with cooldown, waiting for idle. " + PluginCore.cq.aw.get_WorldFilter().get_Item(num2).get_Name(), e8.e); } } else { PluginCore.cq.n.a("Buffing: regular item selected. " + PluginCore.cq.aw.get_WorldFilter().get_Item(num2).get_Name(), e8.e); this.a.ax.get_Actions().UseItem(num2, 0); this.a.n.n.a(ActionLockType.ItemUse, this.a.n.j); } } }
public b a(b A_0, int A_1) { ag.a a = new ag.a(A_0); MySpell spell = PluginCore.cq.e.a("Major Blood Thirst"); MySpell spell2 = PluginCore.cq.e.a("Minor Blood Thirst"); bool flag = false; bool flag2 = false; for (int i = 0; i < PluginCore.cq.aw.get_WorldFilter().get_Item(A_1).get_SpellCount(); i++) { if (PluginCore.cq.aw.get_WorldFilter().get_Item(A_1).Spell(i) == spell.Id) { flag = true; } if (PluginCore.cq.aw.get_WorldFilter().get_Item(A_1).Spell(i) == spell2.Id) { flag2 = true; } } if (flag && flag2) { flag2 = false; } if (flag) { a.b += 4.0; } if (flag2) { a.b += 2.0; } return(new b(a)); }
private void a(MySpell A_0, int A_1, bool A_2, bool A_3, ChatTextInterceptEventArgs A_4) { if ((A_1 == this.a) && (A_1 != 0)) { this.i(); if (!A_0.HitsMultipleTargets) { if (A_2) { this.b(0); } else { foreach (ei.a a in k) { if (A_4.get_Color() == a.b) { int num; Match match = a.a.Match(A_4.get_Text()); if (match.Success && int.TryParse(match.Groups[1].Value, out num)) { this.a((int)(this.b - num)); this.c = num; break; } } } } } } }
public static int a() { MySpell spell = PluginCore.cq.h.b("Heal Self I"); if (spell == null) { return(0); } string name = spell.Name; if (name != null) { int num; if (bx.f == null) { Dictionary <string, int> dictionary1 = new Dictionary <string, int>(8); dictionary1.Add("Heal Self I", 0); dictionary1.Add("Heal Self II", 1); dictionary1.Add("Heal Self III", 2); dictionary1.Add("Heal Self IV", 3); dictionary1.Add("Heal Self V", 4); dictionary1.Add("Heal Self VI", 5); dictionary1.Add("Adja's Intervention", 6); dictionary1.Add("Incantation of Heal Self", 7); bx.f = dictionary1; } if (bx.f.TryGetValue(name, out num)) { switch (num) { case 0: return(0x11); case 1: return(0x19); case 2: return(0x20); case 3: return(0x2d); case 4: return(0x43); case 5: return(0x57); case 6: return(0x73); case 7: return(0x87); } } } return(10); }
public void a(MySpell A_0, int A_1) { if (A_0.Duration > 0.0) { this.a(A_0, A_1, DateTimeOffset.Now + TimeSpan.FromMilliseconds(A_0.DurationMS)); this.a(A_1, A_0.Id, (int)A_0.Duration); PluginCore.PC.d(A_0.Id, A_1, (int)A_0.DurationMS); } }
private void a(string A_0, int A_1, int A_2) { MySpell spell = PluginCore.cq.e.a(A_0); if (spell != null) { this.a(spell, A_1, A_2); } }
private void b(MySpell A_0, int A_1, bool A_2, bool A_3) { if (A_0.Duration > 0.0) { this.a(A_0, A_1, DateTimeOffset.Now + TimeSpan.FromMilliseconds((double)A_0.EffectiveDurationMS)); this.a(A_1, A_0.Id, A_0.EffectiveDurationS); PluginCore.PC.d(A_0.Id, A_1, A_0.EffectiveDurationMS); } }
public void a(MySpell A_0, int A_1, bool A_2) { if (((PluginCore.cq.ax.get_Actions().get_CombatMode() == 8) && ((A_0.School.Name != "Void Magic") || !PluginCore.cq.n.n.b(ActionLockType.VoidSpellLockedOut))) && ((A_0.School.Name != "War Magic") || !PluginCore.cq.n.n.b(ActionLockType.WarSpellLockedOut))) { this.l = A_2; if ((A_0.isValid && !PluginCore.cq.z.d()) && (this.h == dv.d.a)) { try { if (A_0.Duration > 0.0) { PluginCore.PC.b(A_0.Id, A_1, A_0.SkillWithSchool); } this.k.n.a("Casting: " + A_0.Name + " on " + A_1.ToString() + " (" + this.k.aw.get_WorldFilter().get_Item(A_1).get_Name() + ")", e8.d); } catch (Exception) { this.k.n.a("Casting: " + A_0.Name + " on " + A_1.ToString() + " (Target Invalid)", e8.d); } this.f = A_0; this.e = A_1; cv cv = PluginCore.cq.p.d(this.e); if (cv != null) { if (this.f.School.Name.Equals("Item Enchantment")) { this.d = null; } else if (cv.k == PluginCore.cg) { this.d = "yourself"; } else { this.d = cv.g(); } } else { this.d = null; } this.a(A_0.Id, A_1); if (PluginCore.cq.ax.get_Actions().get_Vital().get_Item(6) < 10) { this.j.a(100); } else { this.j.a(200); } this.m = 0x1388 / this.j.h(); PluginCore.cq.n.a("SpellCaster: Begin", e8.i); this.a(dv.d.b); } } }
static Ward() { switch (ObjectManager.Player.ChampionName) { case "Katarina": JumpSpell = SpellDb.E; break; } GameObject.OnCreate += GameObject_OnCreate; }
private MySpell a(string A_0) { MySpell spell = PluginCore.cq.e.a(A_0); if (spell == null) { return(null); } return(this.a(spell)); }
public bool b(MySpell A_0, bool A_1) { eGameSkillID warMagic; switch (A_0.School.Id) { case 1: warMagic = eGameSkillID.WarMagic; break; case 2: warMagic = eGameSkillID.LifeMagic; break; case 3: warMagic = eGameSkillID.ItemEnchantment; break; case 4: warMagic = eGameSkillID.CreatureEnchantment; break; case 5: warMagic = eGameSkillID.VoidMagic; break; default: throw new Exception("Wtf?"); } int num = dh.a(warMagic, true); if (!this.b.aw.get_CharacterFilter().IsSpellKnown(A_0.Id)) { this.a = eCanCastSpellDiagnosticPoint.Fail_SpellNotInSpellbook; return(false); } if (!A_0.HasScarabsInInventory) { this.a = eCanCastSpellDiagnosticPoint.Fail_NoScarabsInInventory; return(false); } if (num < (A_0.Difficulty + this.b.l.a(A_1))) { this.a = eCanCastSpellDiagnosticPoint.Fail_SkillTooLow; return(false); } if (this.b(A_0)) { this.a = eCanCastSpellDiagnosticPoint.Fail_HasBannedComponent; return(false); } this.a = eCanCastSpellDiagnosticPoint.Success; return(true); }
static SafeUnderTurret() { switch (ObjectManager.Player.ChampionName) { case "Katarina": JumpSpell = SpellDb.E; break; } Obj_AI_Base.OnProcessSpellCast += OnProcessSpellCast; }
private bool a(MySpell A_0, int A_1) { MySpell spell = this.e.h.a(A_0); if (spell != null) { this.e.g.a(spell, A_1); return(true); } a5.a(eChatType.Errors, "Error: no usable spell detected in the same class as \"" + A_0.Name + "\""); return(false); }
private void a() { foreach (v v in this.g["Spells"].d()) { MySpell spell = PluginCore.cq.e.b(k.e(v[0])); int num = k.e(v[1]) - dh.a(); if (num >= 0) { DateTimeOffset offset = DateTimeOffset.Now + TimeSpan.FromSeconds((double)num); this.a(spell, k.e(v[2]), offset); } } }
public static void a(eRechargeVital_Single A_0, MySpell A_1) { ActionLockType type = a(A_0); if (!PluginCore.cq.n.a(8, 0, true)) { PluginCore.cq.n.n.a(type, TimeSpan.FromSeconds(er.h("RechargeBoostTimeSeconds"))); } if (PluginCore.cq.ax.get_Actions().get_CombatMode() == 8) { PluginCore.cq.n.n.a(type); PluginCore.cq.g.a(A_1, PluginCore.cg); } }
private void a(int A_0, string A_1, ref MyList <int> A_2) { if ((A_0 == 3) || (A_0 == 2)) { MySpell spell = this.a.h.a(A_1); if ((spell != null) && spell.isValid) { A_2.Add(spell.Id); } else { ai.a("Unknown skill detected! Unable to buff this. (" + A_1 + ")"); } } }
public bool a(MySpell A_0, int A_1) { if (A_0 != null) { ev cq = PluginCore.cq; MySpell spell = cq.h.a(A_0); if (spell != null) { l.g(); cq.g.a(spell, A_1); return(true); } a5.a(eChatType.Errors, "Error: no usable spell detected in the same class as \"" + A_0.Name + "\""); } return(false); }
public MySpell a(MySpell A_0, bool A_1) { MySpell spell = null; eGameSkillID warMagic; if ((A_0 == null) || !A_0.isValid) { return(null); } switch (A_0.School.Id) { case 1: warMagic = eGameSkillID.WarMagic; break; case 2: warMagic = eGameSkillID.LifeMagic; break; case 3: warMagic = eGameSkillID.ItemEnchantment; break; case 4: warMagic = eGameSkillID.CreatureEnchantment; break; case 5: warMagic = eGameSkillID.VoidMagic; break; default: throw new Exception("Wtf?"); } int num = dh.a(warMagic, true); int quality = 0; foreach (MySpell spell2 in this.b.e.a(A_0.RealFamily)) { if (((((spell2.School.Id == A_0.School.Id) && (spell2.Quality > quality)) && ((spell2.isFellowship == A_0.isFellowship) && (A_0.isUntargetted == spell2.isUntargetted))) && (((A_0.a().a(spell2.a()) == 0) && this.b.aw.get_CharacterFilter().IsSpellKnown(spell2.Id)) && ((num >= (spell2.Difficulty + this.b.l.a(A_1))) && spell2.HasScarabsInInventory))) && !this.b(spell2)) { quality = spell2.Quality; spell = spell2; } } return(spell); }
public void b(int A_0, int A_1, int A_2) { if (this.a.e.c(A_0)) { MySpell spell = PluginCore.cq.e.b(A_0); if (!this.c.ContainsKey(A_1)) { this.c.Add(A_1, new MySortedList <int, MyList <dg.b> >(0x38)); } if (!this.c[A_1].ContainsKey(spell.RealFamily)) { this.c[A_1].Add(spell.RealFamily, new MyList <dg.b>(0x39)); } PluginCore.cq.n.a(string.Format("External attempt {0} on {1}", spell.Name, A_1), e8.e); this.c[A_1][spell.RealFamily].Add(new dg.b(DateTimeOffset.Now + TimeSpan.FromMilliseconds(6000.0), A_2, A_0)); } }
private MySpell a(eDamageElement A_0, c A_1) { MySpell spell = PluginCore.cq.h.a(PluginCore.cq.h.a(A_0, eCombatSpellType.War)); MySpell spell2 = PluginCore.cq.h.a(PluginCore.cq.h.a(A_0, eCombatSpellType.Arc)); if ((spell == null) && (spell2 == null)) { a5.a(eChatType.Errors, "Error: no usable attack spell detected for element \"" + er.a(A_0) + "\""); PluginCore.cq.c.StopMacro(); return(null); } if (spell == null) { return(spell2); } if (spell2 != null) { if (spell.Quality > spell2.Quality) { return(spell); } if (spell2.Quality > spell.Quality) { return(spell2); } switch (er.e("UseArcs")) { case 1: return(spell); case 2: if (A_1.e < er.h("ArcRange")) { return(spell); } return(spell2); case 3: return(spell2); } } return(spell); }
private void a(int A_0, bool A_1) { if (A_1 && (A_0 == this.g)) { try { this.i = PluginCore.cq.e.b(PluginCore.cq.aw.get_WorldFilter().get_Item(A_0).Values(0xd000008, 0)); int num = PluginCore.cq.aw.get_WorldFilter().get_Item(A_0).Values(0x6a, 0); if (this.i.Duration > 0.0) { PluginCore.PC.b(this.i.Id, this.h, num); } PluginCore.cq.i.b(this.i.Id, this.h, num); } catch (Exception) { } } }
private void c() { if (this.b == null) { this.b = new List <MySpell>(); Dictionary <int, bool> dictionary = new Dictionary <int, bool>(); using (IEnumerator enumerator = PluginCore.cq.e.c()) { while (enumerator.MoveNext()) { MySpell current = (MySpell)enumerator.Current; if ((!dictionary.ContainsKey(current.RealFamily) && current.isUntargetted) && ((current.Duration >= 1.0) && !current.isOffensive)) { this.b.Add(current); dictionary.Add(current.RealFamily, false); } } } } }
public static MySpell a(int A_0, int A_1, int A_2, int A_3, bool A_4, bool A_5) { d.Clear(); if (A_4) { foreach (v v in PluginCore.cq.x.c["DrainSpellOptions"].d()) { MySpell spell = PluginCore.cq.e.b(k.e(v[0])); if (PluginCore.cq.h.c(spell)) { d.Add(new bq.d(spell, k.e(v[1]), k.f(v[2]), k.f(v[4]), k.e(v[3]))); } } } foreach (v v2 in PluginCore.cq.x.c["MartyrSpellOptions"].d()) { if ((A_5 && (k.e(v2[0]) == 0xeea)) || (!A_5 && (k.e(v2[0]) != 0xeea))) { MySpell spell2 = PluginCore.cq.e.b(k.e(v2[0])); if (PluginCore.cq.h.c(spell2)) { d.Add(new bq.a(spell2, k.e(v2[1]), k.f(v2[2]), k.f(v2[3]))); } } } d.Add(bq.b.a()); bq.f f = new bq.f { b = new bq.c(A_0, A_1, A_3) }; bq.f f2 = b(f, A_2); if ((f2 == null) || (f2.a.Count <= 0)) { return(null); } if (f2.a[0] is bq.b) { return(null); } return(f2.a[0].b); }
public static void a(MySpell A_0, out MySpell A_1, out int A_2) { A_1 = null; A_2 = 0; if (A_0 != null) { foreach (int num in PluginCore.PC.c1) { cv cv = PluginCore.cq.p.d(num); if ((((cv != null) && (cv.c() == ObjectClass.WandStaffOrb)) && ((PluginCore.cq.p.f(num) == PluginCore.cg) && dh.b(num))) && PluginCore.cq.z.a(num)) { int i = cv.i; MySpell p = PluginCore.cq.e.b(i); if (((p != null) && A_0.SameCompClass(p)) && ((A_1 == null) || (A_1.Quality < p.Quality))) { A_1 = p; A_2 = num; } } } } }
public static bool a(int A_0) { ev cq = PluginCore.cq; using (IEnumerator <KeyValuePair <int, ActiveSpellInfo> > enumerator = PluginCore.cq.a.d()) { while (enumerator.MoveNext()) { KeyValuePair <int, ActiveSpellInfo> current = enumerator.Current; if ((!current.Value.IsCoolDown && (current.Value.Spell.Difficulty <= A_0)) && ((current.Value.Duration != -1.0) && !current.Value.Spell.isUntargetted)) { MySpell spell = current.Value.Spell; for (int i = 0; i < 7; i++) { if (spell.RealFamily == cq.h.a((eDamageElement)i, eCombatSpellType.Vuln).RealFamily) { return(true); } } } } } return(false); }
public TimeSpan a(int A_0, MySpell A_1) { if (A_1 == null) { return(TimeSpan.Zero); } TimeSpan zero = TimeSpan.Zero; if (this.c.ContainsKey(A_0) && this.c[A_0].ContainsKey(A_1.RealFamily)) { foreach (dg.b b in this.c[A_0][A_1.RealFamily]) { if ((PluginCore.cq.e.b(b.c).Quality >= A_1.Quality) && (b.a > DateTimeOffset.Now)) { return(TimeSpan.MaxValue); } } } if (this.b.ContainsKey(A_0) && this.b[A_0].ContainsKey(A_1.RealFamily)) { int quality = A_1.Quality; for (int i = 0; i < this.b[A_0][A_1.RealFamily].Keys.Count; i++) { int num3 = this.b[A_0][A_1.RealFamily].Keys[i]; if (this.a.e.b(num3).Quality >= quality) { TimeSpan span2 = (TimeSpan)(this.b[A_0][A_1.RealFamily][num3].a - DateTimeOffset.Now); if (span2 > zero) { zero = span2; } } } } return(zero); }
private void a(MySpell A_0, int A_1, DateTimeOffset A_2) { if (!this.b.ContainsKey(A_1)) { this.b.Add(A_1, new MySortedList <int, MySortedList <int, dg.a> >(0x36)); } if (!this.b[A_1].ContainsKey(A_0.RealFamily)) { this.b[A_1].Add(A_0.RealFamily, new MySortedList <int, dg.a>(0x37)); } if (!this.b[A_1][A_0.RealFamily].ContainsKey(A_0.Id)) { this.b[A_1][A_0.RealFamily].Add(A_0.Id, new dg.a(DateTimeOffset.MinValue)); } if (this.a.i.b[A_1][A_0.RealFamily][A_0.Id].b < A_2) { PluginCore.cq.n.a(string.Format("Cast {0} on {1} ending at {2}, OVERRIDDEN", A_0.Name, A_1, A_2.ToString()), e8.e); this.b[A_1][A_0.RealFamily][A_0.Id] = new dg.a(A_2); } else { PluginCore.cq.n.a(string.Format("Cast {0} on {1} ending at {2}, newer already present", A_0.Name, A_1, A_2.ToString()), e8.e); } }