Пример #1
0
 public void f()
 {
     if (this.c())
     {
         int key = 0;
         int e   = -2147483648;
         foreach (int num3 in this.d.Keys)
         {
             if (this.d[num3].e > e)
             {
                 key = num3;
                 e   = this.d[num3].e;
             }
         }
         this.d[key].a = true;
         cz.a local1 = this.d[key];
         local1.g++;
         if (this.d[key].g > 20)
         {
             this.d.Remove(key);
         }
         else
         {
             PluginCore.cq.ax.get_Actions().UseItem(key, 0);
         }
     }
 }
Пример #2
0
 private void a(cv A_0)
 {
     try
     {
         int k = A_0.k;
         if (((PluginCore.cq.aw.get_WorldFilter().get_Item(k) != null) && ((PluginCore.cq.q.j != 0) && (PluginCore.cq.aw.get_WorldFilter().get_Item(k).get_Container() == PluginCore.cq.q.j))) && !this.c.ContainsKey(k))
         {
             this.h--;
             cz.a a = new cz.a {
                 c = this.b(k)
             };
             if (a.c)
             {
                 PluginCore.cq.u.a(k, b0.a.b);
             }
             else
             {
                 this.a(k, a);
             }
             this.c.Add(k, a);
         }
     }
     catch (Exception exception)
     {
         ad.a(exception);
     }
 }
Пример #3
0
    private void a(int A_0, cz.a A_1)
    {
        LootAction  action = PluginCore.cq.ag.a(A_0);
        WorldObject obj2   = CoreManager.get_Current().get_WorldFilter().get_Item(A_0);

        if (obj2 != null)
        {
            switch (action.a)
            {
            case eLootAction.NoLoot:
                goto Label_00BF;

            case eLootAction.KeepUpTo:
            {
                string str = obj2.get_Name();
                int    num = dh.a(str);
                if (this.e.ContainsKey(str))
                {
                    num += this.e[str];
                }
                if (num >= action.b)
                {
                    goto Label_00BF;
                }
                if (this.e.ContainsKey(str))
                {
                    Dictionary <string, int> dictionary;
                    string str2;
                    (dictionary = this.e)[str2 = str] = dictionary[str2] + 1;
                }
                else
                {
                    this.e[str] = 1;
                }
                break;
            }
            }
            A_1.f = action;
            this.d.Add(A_0, A_1);
        }
        return;

Label_00BF:
        if (this.a(A_0, true))
        {
            A_1.f = LootAction.a();
            this.d.Add(A_0, A_1);
        }
        else
        {
            if (PluginCore.cq.ab.a(obj2))
            {
                int num2 = PluginCore.cq.ab.f() - this.f;
                if (num2 > 0)
                {
                    this.f++;
                    A_1.f = new LootAction(eLootAction.ManaStone);
                    this.d.Add(A_0, A_1);
                    return;
                }
            }
            if (PluginCore.cq.ab.b(obj2))
            {
                int num3 = PluginCore.cq.ab.h() - this.g;
                if (num3 > 0)
                {
                    this.g++;
                    A_1.f = new LootAction(eLootAction.ManaTank);
                    this.d.Add(A_0, A_1);
                }
            }
        }
    }