public static void a(string A_0, k A_1) { string[] files = Directory.GetFiles(PluginCore.ci, "*.usd"); foreach (string str in files) { string[] strArray2 = str.Split(new char[] { '\\' }); string str2 = strArray2[strArray2.Length - 1]; if (str2 == PluginCore.cq.l.m) { er.b(A_0, A_1); } else { bf bf = new bf(str); v v = bf["Settings"].a(0, k.a(A_0)); if (v == null) { v v2 = new v(bf["Settings"]); v2[0] = k.a(A_0); v2[1] = A_1; bf["Settings"].c(v2); } else { v[1] = A_1; } bf.c(str); } } string[] strArray4 = new string[] { "Done saving setting ", A_0, " to all profiles. (Changed ", files.Length.ToString(), " profiles)" }; PluginCore.e(string.Concat(strArray4)); }
public bv(CoreManager A_0) { string path = Path.Combine(PluginCore.ci, "gameinfodb.ugd"); if (File.Exists(path)) { try { this.c.b(path); bf bf = new bf(); bf.d("uTank2.Resources.defaultinfodb.ugd"); if (this.a(this.c) != this.a(bf)) { this.c = bf; } } catch (Exception) { this.c.d("uTank2.Resources.defaultinfodb.ugd"); } } else { this.c.d("uTank2.Resources.defaultinfodb.ugd"); } A_0.get_WorldFilter().add_CreateObject(new EventHandler <CreateObjectEventArgs>(this.a)); }
public void e() { this.f = Path.Combine(PluginCore.ci, PluginCore.cq.aw.get_CharacterFilter().get_Name() + "_" + PluginCore.cq.aw.get_CharacterFilter().get_Server() + ".ast"); try { this.g = new bf(this.f); int num = this.c(); if (num > 0) { this.g = new bf(); this.g.d("uTank2.Resources.defaultitemagedb.ugd"); this.g.c(this.f); a5.a(eChatType.Warnings, "Rollback detected. Resetting stored item spell timers. (Spell cast " + ((num - dh.a())).ToString() + " seconds in the future)"); } else { this.a(); } } catch (Exception) { this.g = new bf(); this.g.d("uTank2.Resources.defaultitemagedb.ugd"); this.g.c(this.f); } }
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)); } } }
public override void a(BinaryReader A_0) { this.listB = new List <d1>(); long position = A_0.BaseStream.Position; while (A_0.BaseStream.Position - position < (long)((ulong)this.jB.uintB)) { j a_ = default(j); a_.a(A_0); long position2 = A_0.BaseStream.Position; d1 d; if ((a_.a9A & (a9)2147483648u) != a9.n) { d = new cd(); } else { switch (a_.a9A) { case a9.f: d = new u(); break; case a9.g: d = new @do(); break; case a9.h: d = new cg(); break; case a9.l: d = new c2(); break; case a9.m: d = new cy(); break; case a9.n: d = new cx(); break; default: d = new bf(); break; } } d.a(a_); d.a(A_0); this.listB.Add(d); A_0.BaseStream.Seek(position2 + (long)((ulong)a_.uintB), SeekOrigin.Begin); } }
private int a(bf A_0) { try { return(k.e(A_0["DBVersion"].d()[0][0])); } catch (Exception) { return(1); } }
float getInterpol(Seq seq, float t) { bf f = baseFunc; int rangeInt = baseFuncRangeInt; int tInt = (int)Mathf.Floor(t); float result = 0; for (int i = tInt - rangeInt; i <= tInt + rangeInt; i++) { result += seq(i) * f(t - i); } return(result); }
public TagussanBSpline(Vector3[] points, int degree) { if (copy) { //this.points = []; this.points = new float[points.Length][]; for (var i = 0; i < points.Length; i++) { this.points[i] = new float[] { points[i].x, points[i].y, points[i].z }; } } else { //this.points = points; } this.degree = degree; dimension = 3;// points[0].le; if (degree == 2) { baseFunc = basisDeg2; baseFuncRangeInt = 2; } else if (degree == 3) { baseFunc = basisDeg3; baseFuncRangeInt = 2; } else if (degree == 4) { baseFunc = basisDeg4; baseFuncRangeInt = 3; } else if (degree == 5) { baseFunc = basisDeg5; baseFuncRangeInt = 3; } }
public void k() { if (!string.IsNullOrEmpty(this.j())) { bf bf = new bf(); a0 a = new a0(new string[] { "CType", "AType", "CData", "AData", "State" }); bf.Add("CondAct", a); foreach (KeyValuePair <string, List <d8> > pair in this.c) { foreach (d8 d in pair.Value) { v v = new v(a); v[0] = k.a((int)d.a.f()); v[1] = k.a((int)d.b.d()); v[2] = d.a.i(); v[3] = d.b.i(); v[4] = k.a(d.c); a.c(v); } } bf.c(Path.Combine(PluginCore.ci, this.j())); } }
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(); } }