private void b(NetworkMessageEventArgs A_0) { this.u = new o(); this.u.c = A_0.get_Message().Value <int>("merchant"); this.u.d = A_0.get_Message().Value <int>("buyCategories"); this.u.e = A_0.get_Message().Value <int>("unknown1"); this.u.f = A_0.get_Message().Value <int>("buyValue"); this.u.g = A_0.get_Message().Value <int>("unknown2"); this.u.h = A_0.get_Message().Value <float>("buyRate"); this.u.i = A_0.get_Message().Value <float>("sellRate"); int num = A_0.get_Message().Value <int>("itemCount"); for (int i = 0; i < num; i++) { cv cv = new cv(); MessageStruct struct2 = A_0.get_Message().Struct("items").Struct(i); cv.u = struct2.Value <int>("count"); cv.k = struct2.Value <int>("object"); this.e(cv, struct2.Struct("game")); cv.v = true; this.u.a(cv); } if (this.t != null) { this.t(this, null); } }
private void d(cv A_0, MessageStruct A_1) { A_0.q = true; A_0.t.Clear(); byte num = A_1.Value <byte>("paletteCount"); if (num == 0xff) { A_0.r = true; A_0.s = A_1.Value <int>("palette"); } else { A_0.r = false; MessageStruct struct2 = A_1.Struct("palettes"); for (int i = 0; i < num; i++) { bo item = new bo { a = struct2.Struct(i).Value <int>("palette"), b = struct2.Struct(i).Value <byte>("offset"), c = struct2.Struct(i).Value <byte>("length") }; A_0.t.Add(item); } } }
private void b(cv A_0, MessageStruct A_1) { int num = A_1.Value <int>("landcell"); float num2 = A_1.Value <float>("x"); float num3 = A_1.Value <float>("y"); float num4 = A_1.Value <float>("z"); A_0.w = dz.a(num2, num3, num4 / 240f, num); }
private void f(NetworkMessageEventArgs A_0) { int num = A_0.get_Message().Value <int>("object"); cv n = new cv(); if ((num == this.o) && (this.n != null)) { n = this.n; this.n = null; } MessageStruct struct2 = A_0.get_Message().Struct("game"); MessageStruct struct3 = A_0.get_Message().Struct("model"); MessageStruct struct4 = A_0.get_Message().Struct("physics"); n.k = num; this.e(n, struct2); this.d(n, struct3); this.c(n, struct4); if ((struct2.Value <int>("behavior") & 0x1000) != 0) { n.l = (struct4.Value <int>("unknown") & 4) > 0; } this.e(n); this.c(n); if (this.b != null) { this.b(n); } }
private void c(cv A_0, MessageStruct A_1) { int num = A_1.Value <int>("flags"); A_0.a[0xd000027] = num; if ((num & 0x8000) > 0) { this.b(A_0, A_1.Struct("position")); } }
private bool a(MessageStruct A_0) { bool flag = false; int key = A_0.Value <int>("fellow"); if (!this.a.ContainsKey(key)) { this.a[key] = new ar.a(); flag = true; } ar.a a = this.a[key]; a.a = key; a.b = A_0.Value <string>("name"); a.c = A_0.Value <short>("level"); a.d = A_0.Value <int>("maxHealth"); a.e = A_0.Value <int>("maxStam"); a.f = A_0.Value <int>("maxMana"); a.g = A_0.Value <int>("curHealth"); a.h = A_0.Value <int>("curStam"); a.i = A_0.Value <int>("curMana"); a.j = A_0.Value <int>("shareLoot") != 0; return(flag); }
private void d(NetworkMessageEventArgs A_0) { cv n; this.o = A_0.get_Message().Value <int>("character"); foreach (KeyValuePair <int, cv> pair in this.i) { this.c(pair.Value); } if (this.i.ContainsKey(this.o)) { n = this.i[this.o]; } else { this.n = new cv(); n = this.n; n.k = this.o; } MessageStruct struct2 = A_0.get_Message().Struct("properties"); int num = struct2.Value <int>("flags"); if ((num & 1) > 0) { short num2 = struct2.Value <short>("dwordCount"); for (int i = 0; i < num2; i++) { int num4 = struct2.Struct("dwords").Struct(i).Value <int>("key"); int num5 = struct2.Struct("dwords").Struct(i).Value <int>("value"); n.a[num4] = num5; } } if ((num & 0x80) > 0) { short num6 = struct2.Value <short>("qwordCount"); for (int j = 0; j < num6; j++) { int num8 = struct2.Struct("qwords").Struct(j).Value <int>("key"); long num9 = struct2.Struct("qwords").Struct(j).Value <long>("value"); n.e[num8] = num9; } } if ((num & 2) > 0) { short num10 = struct2.Value <short>("booleanCount"); for (int k = 0; k < num10; k++) { int num12 = struct2.Struct("booleans").Struct(k).Value <int>("key"); bool flag = struct2.Struct("booleans").Struct(k).Value <int>("value") != 0; n.c[num12] = flag; } } if ((num & 4) > 0) { short num13 = struct2.Value <short>("doubleCount"); for (int m = 0; m < num13; m++) { int num15 = struct2.Struct("doubles").Struct(m).Value <int>("key"); double num16 = struct2.Struct("doubles").Struct(m).Value <double>("value"); n.d[num15] = num16; } } if ((num & 0x10) > 0) { short num17 = struct2.Value <short>("stringCount"); for (int num18 = 0; num18 < num17; num18++) { int num19 = struct2.Struct("strings").Struct(num18).Value <int>("key"); string str = struct2.Struct("strings").Struct(num18).Value <string>("value"); n.b[num19] = str; } } if ((num & 0x40) > 0) { short num20 = struct2.Value <short>("resourceCount"); for (int num21 = 0; num21 < num20; num21++) { int num22 = struct2.Struct("resources").Struct(num21).Value <int>("key"); int num23 = struct2.Struct("resources").Struct(num21).Value <int>("value"); switch (num22) { case 8: { n.a[0xd000001] = num23; } } n.g[num22] = num23; } } if (this.e != null) { this.e(n); } }
private void e(cv A_0, MessageStruct A_1) { A_0.a[0xd000018] = A_1.Value <int>("flags1"); A_0.b[1] = A_1.Value <string>("name"); A_0.a[0xd000000] = A_1.Value <int>("type"); A_0.a[0xd000001] = A_1.Value <int>("icon"); A_0.a[0xd00001a] = A_1.Value <int>("category"); A_0.a[0xd00001b] = A_1.Value <int>("behavior"); int num = 0; if ((A_1.Value <int>("behavior") & 0x4000000) > 0) { num = A_1.Value <int>("flags2"); A_0.a[0xd000019] = num; } if ((A_1.Value <int>("flags1") & 1) > 0) { A_0.b[0xb000000] = A_1.Value <string>("namePlural"); } if ((A_1.Value <int>("flags1") & 2) > 0) { A_0.a[0xd000004] = A_1.Value <byte>("itemSlots"); } if ((A_1.Value <int>("flags1") & 4) > 0) { A_0.a[0xd000005] = A_1.Value <byte>("packSlots"); } if ((A_1.Value <int>("flags1") & 0x100) > 0) { A_0.a[0xd000011] = A_1.Value <short>("ammunition"); } if ((A_1.Value <int>("flags1") & 8) > 0) { A_0.a[0x13] = A_1.Value <int>("value"); } if ((A_1.Value <int>("flags1") & 0x10) > 0) { A_0.a[0xd000023] = A_1.Value <int>("unknown10"); } if ((A_1.Value <int>("flags1") & 0x20) > 0) { A_0.d[0xa000008] = (double)A_1.Value <float>("approachDistance"); } if ((A_1.Value <int>("flags1") & 0x80000) > 0) { A_0.a[0xd000012] = A_1.Value <int>("usableOn"); } if ((A_1.Value <int>("flags1") & 0x80) > 0) { A_0.a[0xd000010] = A_1.Value <int>("iconHighlight"); } if ((A_1.Value <int>("flags1") & 0x200) > 0) { A_0.a[0xd00000f] = A_1.Value <byte>("wieldType"); } if ((A_1.Value <int>("flags1") & 0x400) > 0) { A_0.a[0x5c] = A_1.Value <short>("uses"); } if ((A_1.Value <int>("flags1") & 0x800) > 0) { A_0.a[0x5b] = A_1.Value <short>("usesLimit"); } if ((A_1.Value <int>("flags1") & 0x1000) > 0) { A_0.a[0xd000006] = A_1.Value <short>("stack"); } if ((A_1.Value <int>("flags1") & 0x2000) > 0) { A_0.a[0xd000007] = A_1.Value <short>("stackLimit"); } if ((A_1.Value <int>("flags1") & 0x4000) > 0) { A_0.a[0xd000002] = A_1.Value <int>("container"); } if ((A_1.Value <int>("flags1") & 0x8000) > 0) { A_0.a[0xd000002] = A_1.Value <int>("equipper"); A_0.a[0xd000009] = -1; } if ((A_1.Value <int>("flags1") & 0x10000) > 0) { A_0.a[0xd00000e] = A_1.Value <int>("equipPossible"); } if ((A_1.Value <int>("flags1") & 0x20000) > 0) { A_0.a[10] = A_1.Value <int>("equipActual"); } if ((A_1.Value <int>("flags1") & 0x40000) > 0) { A_0.a[0xd00000d] = A_1.Value <int>("coverage"); } if ((A_1.Value <int>("flags1") & 0x100000) > 0) { A_0.a[0x5f] = A_1.Value <byte>("unknown100000"); } if ((A_1.Value <int>("flags1") & 0x800000) > 0) { A_0.a[0x85] = A_1.Value <byte>("unknown800000"); } if ((A_1.Value <int>("flags1") & 0x8000000) > 0) { A_0.a[0xd000026] = A_1.Value <short>("unknown8000000"); } if ((A_1.Value <int>("flags1") & 0x1000000) > 0) { A_0.d[0xa000009] = (double)A_1.Value <float>("workmanship"); } if ((A_1.Value <int>("flags1") & 0x200000) > 0) { A_0.a[5] = A_1.Value <short>("burden"); } if ((A_1.Value <int>("flags1") & 0x400000) > 0) { A_0.i = (ushort)A_1.Value <short>("spell"); } if ((A_1.Value <int>("flags1") & 0x2000000) > 0) { A_0.a[0xd00002e] = A_1.Value <int>("owner"); } if ((A_1.Value <int>("flags1") & 0x40) > 0) { A_0.a[0xd00000c] = A_1.Value <int>("monarch"); } if ((A_1.Value <int>("flags1") & 0x10000000) > 0) { A_0.a[0xd000014] = A_1.Value <short>("hookableOn"); } if ((A_1.Value <int>("flags1") & 0x40000000) > 0) { A_0.a[0xd000029] = A_1.Value <int>("iconOverlay"); } if ((((long)A_1.Value <int>("flags1")) & 0x80000000L) > 0L) { A_0.a[0x83] = A_1.Value <int>("material"); } if ((A_1.Value <int>("flags2") & 1) > 0) { A_0.a[0xd00002a] = A_1.Value <int>("iconUnderlay"); } if ((A_1.Value <int>("flags2") & 2) > 0) { A_0.a[280] = A_1.Value <int>("cooldownId"); } }
internal void Update(MessageStruct FellowStruct) { _Id = FellowStruct.Value<int>("fellow"); _Name = FellowStruct.Value<string>("name"); _Level = FellowStruct.Value<int>("level"); _MaxHealth = FellowStruct.Value<int>("maxHealth"); _MaxStamina = FellowStruct.Value<int>("maxStam"); _MaxMana = FellowStruct.Value<int>("maxMana"); _CurrentHealth = FellowStruct.Value<int>("curHealth"); _CurrentStamina = FellowStruct.Value<int>("curStam"); _CurrentMana = FellowStruct.Value<int>("curMana"); if(FellowStruct.Value<int>("shareLoot") == 0x10){_ShareLoot = true;}else{_ShareLoot = false;} }
public static ActiveSpellInfo FromProtocolStruct(MessageStruct s) { return(new ActiveSpellInfo { a = s.Value <short>("spell"), b = s.Value <short>("layer"), c = s.Value <short>("family"), d = s.Value <int>("difficulty"), e = s.Value <double>("elapsedTime"), f = s.Value <double>("duration"), g = s.Value <int>("caster"), h = s.Value <double>("startTime"), i = s.Value <int>("flags"), j = s.Value <int>("key"), k = (double)s.Value <float>("value") }); }
private void a(object A_0, NetworkMessageEventArgs A_1) { if (A_1.get_Message().get_Type() == 0xf7b0) { int num23 = A_1.get_Message().Value <int>("event"); if (num23 != 0x13) { switch (num23) { case 0x2c2: this.a(A_1.get_Message().Struct("enchantment")); return; case 0x2c3: { int num9 = A_1.get_Message().Value <int>("spell"); int num10 = A_1.get_Message().Value <short>("layer"); this.a(num9, num10); return; } case 0x2c4: return; case 0x2c5: { int num11 = A_1.get_Message().Value <int>("count"); for (int i = 0; i < num11; i++) { int num13 = A_1.get_Message().Struct("enchantments").Struct(i).Value <int>("spell"); int num14 = A_1.get_Message().Struct("enchantments").Struct(i).Value <short>("layer"); this.a(num13, num14); } return; } case 710: { Dictionary <int, ActiveSpellInfo> a = this.a; this.a = new Dictionary <int, ActiveSpellInfo>(); foreach (KeyValuePair <int, ActiveSpellInfo> pair in a) { if (pair.Value.IsCoolDown) { this.a[pair.Key] = pair.Value; } else if (this.e != null) { this.e(pair.Value); } } return; } case 0x2c7: { int num15 = A_1.get_Message().Value <int>("spell"); int num16 = A_1.get_Message().Value <short>("layer"); this.a(num15, num16); return; } case 0x2c8: { int num17 = A_1.get_Message().Value <int>("count"); for (int j = 0; j < num17; j++) { int num19 = A_1.get_Message().Struct("enchantments").Struct(j).Value <int>("spell"); int num20 = A_1.get_Message().Struct("enchantments").Struct(j).Value <short>("layer"); this.a(num19, num20); } return; } case 0x1ac: { List <int> list = new List <int>(); foreach (KeyValuePair <int, ActiveSpellInfo> pair2 in this.a) { MySpell spell = PluginCore.cq.e.b(pair2.Key); if ((spell != null) && spell.isOffensive) { list.Add(pair2.Key); } } foreach (int num21 in list) { ActiveSpellInfo info = this.a[num21]; this.a.Remove(num21); if (this.e != null) { this.e(info); } } return; } } } else { MessageStruct struct2 = A_1.get_Message().Struct("vectors"); if ((struct2.Value <int>("flags") & 0x200) > 0) { int num2 = struct2.Value <int>("enchantmentMask"); if ((num2 & 1) > 0) { int num3 = struct2.Value <int>("lifeSpellCount"); for (int k = 0; k < num3; k++) { this.a(struct2.Struct("lifeSpells").Struct(k).Struct(0)); } } if ((num2 & 2) > 0) { int num5 = struct2.Value <int>("creatureSpellCount"); for (int m = 0; m < num5; m++) { this.a(struct2.Struct("creatureSpells").Struct(m).Struct(0)); } } if ((num2 & 8) > 0) { int num7 = struct2.Value <int>("cooldownCount"); for (int n = 0; n < num7; n++) { this.a(struct2.Struct("cooldowns").Struct(n).Struct(0)); } } } } } }