using System; using System.Collections.Generic; using System.IO; public class SavedAttachData { public void Reset() { this.bEnable = false; this.nMyRID = 0UL; this.eMySlotID = TBody.SlotID.body; this.nTargetRID = 0UL; this.eTargetSlotID = TBody.SlotID.body; this.nTargetSlotNo = 0; this.strTargetAttachPointName = null; this.nTargetVtxCount = 0; this.nTargetVidx = 0; this.newAttachVidx = null; this.prs2 = new PosRotScale(); this.prs3 = new PosRotScale(); if (this.boneAttachedHie != null) { this.boneAttachedHie.Clear(); } this.boneAttachEdited = false; } public void Deserialize(BinaryReader br) { this.nTargetSlotNo = 0; int num = 2000; br.ReadNaS(out this.partName); if (string.IsNullOrEmpty(this.partName)) { num = br.ReadInt32(); br.ReadNaS(out this.partName); } br.Read(out this.bEnable); br.Read(out this.nMyRID); br.ReadParse(out this.eMySlotID); br.Read(out this.nTargetRID); br.ReadParse(out this.eTargetSlotID); if (2001 <= num) { this.nTargetSlotNo = br.ReadInt32(); } br.ReadNaS(out this.strTargetAttachPointName); br.Read(out this.nTargetVtxCount); br.Read(out this.nTargetVidx); br.Read(out this.newAttachVidx); this.prs2 = new PosRotScale(); if (br.ReadBoolean()) { this.prs2.Deserialize(br); } this.prs3 = new PosRotScale(); if (br.ReadBoolean()) { this.prs3.Deserialize(br); } this.boneAttachedHie = null; if (br.ReadBoolean()) { this.boneAttachedHie = new Dictionary(); int num2 = br.ReadInt32(); for (int i = 0; i < num2; i++) { PosRotScale posRotScale = new PosRotScale(); string key = br.ReadString(); posRotScale.Deserialize(br); this.boneAttachedHie.Add(key, posRotScale); } } br.Read(out this.boneAttachEdited); } public string partName; public bool bEnable; public ulong nMyRID; public TBody.SlotID eMySlotID; public ulong nTargetRID; public TBody.SlotID eTargetSlotID; public int nTargetSlotNo; public string strTargetAttachPointName; public int nTargetVtxCount; public int nTargetVidx; public int[] newAttachVidx; public PosRotScale prs2 = new PosRotScale(); public PosRotScale prs3 = new PosRotScale(); public Dictionary boneAttachedHie; public bool boneAttachEdited; }