private void SetValueText(HeroAnyValue value, int indent, ListViewItem item) { string text = ""; item.Tag = value; switch (value.Type.Type) { case HeroTypes.Id: { text = (value as HeroID).ValueText; HeroID oid = value as HeroID; if (GOM.Instance.Definitions.ContainsKey(oid.Id)) { object obj2 = text; text = string.Concat(new object[] { obj2, " (", GOM.Instance.Definitions[oid.Id], ")" }); } break; } case HeroTypes.Integer: { text = (value as HeroInt).ValueText; HeroInt num = value as HeroInt; if (GOM.Instance.Definitions.ContainsKey((ulong)num.Value)) { object obj3 = text; text = string.Concat(new object[] { obj3, " (", GOM.Instance.Definitions[(ulong)num.Value], ")" }); } break; } case HeroTypes.List: { HeroList list = value as HeroList; this.AddList(list, indent + 1); break; } case HeroTypes.LookupList: { HeroLookupList list2 = value as HeroLookupList; this.AddLookupList(list2, indent + 1); break; } case HeroTypes.Class: { HeroClass class2 = value as HeroClass; this.AddVariables(class2.Variables, indent + 1); break; } default: text = value.ValueText; break; } item.SubItems.Add(text); }
private void AddLookupList(HeroLookupList list, int indent) { int num = 1; foreach (KeyValuePair <HeroVarId, HeroAnyValue> pair in list.Data) { string str2; string text = ""; switch (pair.Key.Value.Type.Type) { case HeroTypes.Id: { text = (pair.Key.Value as HeroID).ValueText; HeroID oid = pair.Key.Value as HeroID; if (GOM.Instance.Definitions.ContainsKey(oid.Id)) { object obj2 = text; text = string.Concat(new object[] { obj2, " (", GOM.Instance.Definitions[oid.Id], ")" }); } break; } case HeroTypes.Integer: { text = (pair.Key.Value as HeroInt).ValueText; HeroInt num2 = pair.Key.Value as HeroInt; if (GOM.Instance.Definitions.ContainsKey((ulong)num2.Value)) { object obj3 = text; text = string.Concat(new object[] { obj3, " (", GOM.Instance.Definitions[(ulong)num2.Value], ")" }); } break; } case HeroTypes.Enum: text = (pair.Key.Value as HeroEnum).ValueText; break; case HeroTypes.String: text = (pair.Key.Value as HeroString).ValueText; break; } ListViewItem item = this.listViewVariables.Items.Add(text); item.IndentCount = indent; num++; if (list.Type.Values != null) { str2 = list.Type.Values.ToString(); } else { str2 = ""; } item.SubItems.Add(str2); this.SetValueText(pair.Value, indent, item); } }