예제 #1
0
 private void c(cv A_0)
 {
     if (this.a(A_0.k))
     {
         if (PluginCore.cq.p.f(A_0))
         {
             if (!this.a.Contains(A_0.k) && !this.b.Contains(A_0.k))
             {
                 if (A_0.b())
                 {
                     this.b.Add(A_0.k);
                 }
                 else
                 {
                     this.a.Add(A_0.k);
                 }
             }
         }
         else
         {
             if (this.a.Contains(A_0.k))
             {
                 this.a.Remove(A_0.k);
             }
             if (this.b.Contains(A_0.k))
             {
                 this.b.Remove(A_0.k);
             }
         }
     }
 }
예제 #2
0
 private void d(cv A_0)
 {
     if (this.a.Contains(A_0.k))
     {
         if (A_0.b())
         {
             this.a.Remove(A_0.k);
             this.b.Add(A_0.k);
         }
     }
     else if (this.b.Contains(A_0.k) && !A_0.b())
     {
         this.b.Remove(A_0.k);
         this.a.Add(A_0.k);
         PluginCore.cq.n.n.a(ActionLockType.ManaStoneUse);
     }
 }
예제 #3
0
 private void b(cv A_0)
 {
     if (PluginCore.cq.p.f(A_0) && this.a(A_0.k))
     {
         if (A_0.b())
         {
             this.b.Add(A_0.k);
         }
         else
         {
             this.a.Add(A_0.k);
         }
     }
 }
예제 #4
0
    public bool b(WorldObject A_0)
    {
        if (!PluginCore.cq.p.i.ContainsKey(A_0.get_Id()))
        {
            return(false);
        }
        cv cv = PluginCore.cq.p.i[A_0.get_Id()];

        if (!cv.j)
        {
            return(false);
        }
        if (!cv.b())
        {
            return(false);
        }
        if (!cv.a.ContainsKey(0x6b))
        {
            return(false);
        }
        if (cv.a[0x6b] < er.i("ManaTankMinimumMana"))
        {
            return(false);
        }
        if (!cv.a.ContainsKey(0x69))
        {
            return(false);
        }
        if (cv.a[0x69] == 0)
        {
            return(false);
        }
        if (cv.a.ContainsKey(0xab) && (cv.a[0xab] > 0))
        {
            return(false);
        }
        return(true);
    }
예제 #5
0
    public int i()
    {
        if (this.b.Count == 0)
        {
            return(0);
        }
        int num = this.b[0];

        if (!PluginCore.cq.p.b(num, PluginCore.cq.ax))
        {
            return(0);
        }
        if (!this.a(num))
        {
            return(0);
        }
        cv cv = PluginCore.cq.p.i[num];

        if (!cv.b())
        {
            return(0);
        }
        return(num);
    }
예제 #6
0
    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);
                }
            }
        }
    }