public void Read(TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 10: if (field.Type == TType.I32) { ID = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 20: if (field.Type == TType.String) { MapName = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 30: if (field.Type == TType.String) { MapSceneName = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 40: if (field.Type == TType.String) { MapResName = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 50: if (field.Type == TType.List) { { TriggerDataList = new List <TerrainTriggerData>(); TList _list0 = iprot.ReadListBegin(); for (int _i1 = 0; _i1 < _list0.Count; ++_i1) { TerrainTriggerData _elem2 = new TerrainTriggerData(); _elem2 = new TerrainTriggerData(); _elem2.Read(iprot); TriggerDataList.Add(_elem2); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 60: if (field.Type == TType.List) { { NpcDataList = new List <TerrainNpcData>(); TList _list3 = iprot.ReadListBegin(); for (int _i4 = 0; _i4 < _list3.Count; ++_i4) { TerrainNpcData _elem5 = new TerrainNpcData(); _elem5 = new TerrainNpcData(); _elem5.Read(iprot); NpcDataList.Add(_elem5); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 70: if (field.Type == TType.Struct) { PlayerInitPos = new PlayerInitPosData(); PlayerInitPos.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }
public void Read (TProtocol iprot) { TField field; iprot.ReadStructBegin(); while (true) { field = iprot.ReadFieldBegin(); if (field.Type == TType.Stop) { break; } switch (field.ID) { case 10: if (field.Type == TType.I32) { ID = iprot.ReadI32(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 20: if (field.Type == TType.String) { MapName = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 30: if (field.Type == TType.String) { MapSceneName = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 40: if (field.Type == TType.String) { MapResName = iprot.ReadString(); } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 50: if (field.Type == TType.List) { { TriggerDataList = new List<TerrainTriggerData>(); TList _list0 = iprot.ReadListBegin(); for( int _i1 = 0; _i1 < _list0.Count; ++_i1) { TerrainTriggerData _elem2 = new TerrainTriggerData(); _elem2 = new TerrainTriggerData(); _elem2.Read(iprot); TriggerDataList.Add(_elem2); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 60: if (field.Type == TType.List) { { NpcDataList = new List<TerrainNpcData>(); TList _list3 = iprot.ReadListBegin(); for( int _i4 = 0; _i4 < _list3.Count; ++_i4) { TerrainNpcData _elem5 = new TerrainNpcData(); _elem5 = new TerrainNpcData(); _elem5.Read(iprot); NpcDataList.Add(_elem5); } iprot.ReadListEnd(); } } else { TProtocolUtil.Skip(iprot, field.Type); } break; case 70: if (field.Type == TType.Struct) { PlayerInitPos = new PlayerInitPosData(); PlayerInitPos.Read(iprot); } else { TProtocolUtil.Skip(iprot, field.Type); } break; default: TProtocolUtil.Skip(iprot, field.Type); break; } iprot.ReadFieldEnd(); } iprot.ReadStructEnd(); }