Beispiel #1
0
    private void a()
    {
        bf bf = new bf();

        bf.b(Path.Combine(PluginCore.ci, this.j()));
        this.c.Clear();
        if (!bf.ContainsKey("CondAct"))
        {
            a5.a(eChatType.Errors, "Meta file load: DB format invalid.");
            this.c.Clear();
        }
        else
        {
            a0 a = bf["CondAct"];
            for (int i = 0; i < a.c(); i++)
            {
                fl fl = cl.a((c3)k.e(a.d()[i][0]));
                b3 b  = cl.a((ep)k.e(a.d()[i][1]));
                if ((b == null) || (fl == null))
                {
                    a5.a(eChatType.Errors, "Meta file load: unsupported cond/act type.");
                    this.c.Clear();
                    return;
                }
                fl.h(a.d()[i][2]);
                b.h(a.d()[i][3]);
                string key = k.b(a.d()[i][4]);
                if (!this.c.ContainsKey(key))
                {
                    this.c[key] = new List <d8>();
                }
                this.c[key].Add(new d8(fl, b, key));
            }
        }
    }
Beispiel #2
0
 private void a(bool A_0, TextReader A_1)
 {
     if (A_0)
     {
         try
         {
             bf bf = new bf();
             bf.a(A_1);
             int num = bf.b() - 1;
             if (num > 0)
             {
                 foreach (KeyValuePair <string, a0> pair in this.c)
                 {
                     int num2 = 0;
                     for (int i = 0; i < pair.Value.a(); i++)
                     {
                         if (pair.Value.b(i))
                         {
                             num2 = i;
                             break;
                         }
                     }
                     if (bf.ContainsKey(pair.Key))
                     {
                         pair.Value.a(bf[pair.Key], num2);
                     }
                 }
                 string str = Path.Combine(PluginCore.ci, "gameinfodb.ugd");
                 try
                 {
                     this.c.c(str);
                 }
                 catch
                 {
                 }
                 PluginCore.cq.d.c();
                 PluginCore.e("GameInfoDB updated (" + num.ToString() + " changed records).");
             }
             else
             {
                 PluginCore.e("GameInfoDB is current.");
             }
         }
         catch (Exception exception)
         {
             PluginCore.e("GameInfoDB update failed due to an unknown error.");
             PluginCore.cq.n.a(exception.Message, e8.f);
             PluginCore.cq.n.a(exception.StackTrace, e8.f);
         }
     }
     else
     {
         PluginCore.e("GameInfoDB update failed (" + A_1.ReadToEnd() + ").");
     }
     this.b = true;
     this.f();
     if (this.a != null)
     {
         this.a();
     }
 }