public override void Deserialize(PackedStream2 stream) { hasValue = true; Data = new Dictionary <HeroVarId, HeroAnyValue>(); var defaultIndexerType = new HeroType(HeroTypes.None); if (Type.Indexer != null) { defaultIndexerType = Type.Indexer; } var deserializeLookupList = new DeserializeLookupList(stream, 1, defaultIndexerType); if (Type.Indexer == null || Type.Indexer.Type == HeroTypes.None) { Type.Indexer = deserializeLookupList.indexerType; } else { deserializeLookupList.indexerType = Type.Indexer; } if (Type.Values == null) { Type.Values = deserializeLookupList.valueType; } else { deserializeLookupList.valueType = Type.Values; } for (ulong index = 0UL; index < (ulong)deserializeLookupList.Count; ++index) { HeroAnyValue key; int variableId; deserializeLookupList.GetKey(out key, out variableId); HeroAnyValue heroAnyValue = Create(Type.Values); heroAnyValue.Deserialize(stream); Data[new HeroVarId(variableId, key)] = heroAnyValue; if (variableId > nextId) { nextId = variableId; } } }
public override void Deserialize(PackedStream_2 stream) { base.hasValue = true; this.Data = new Dictionary <HeroVarId, HeroAnyValue>(); HeroType defaultIndexerType = new HeroType(HeroTypes.None); if (base.Type.Indexer != null) { defaultIndexerType = base.Type.Indexer; } DeserializeLookupList list = new DeserializeLookupList(stream, 1, defaultIndexerType); if ((base.Type.Indexer == null) || (base.Type.Indexer.Type == HeroTypes.None)) { base.Type.Indexer = list.indexerType; } else { list.indexerType = base.Type.Indexer; } if (base.Type.Values == null) { base.Type.Values = list.valueType; } else { list.valueType = base.Type.Values; } for (ulong i = 0L; i < list.Count; i += (ulong)1L) { int num2; HeroAnyValue value2; list.GetKey(out value2, out num2); HeroAnyValue value3 = HeroAnyValue.Create(base.Type.Values); value3.Deserialize(stream); this.Data[new HeroVarId(num2, value2)] = value3; if (num2 > this.nextId) { this.nextId = num2; } } }