public int WriteReplyList(MemoryStream m, ReplyListStruct rp) { int size = 0; size += WriteIntArrayProperty(m, "EntryList", rp.EntryList); size += WriteIntProperty(m, "nListenerIndex", rp.ListenerIndex); size += WriteBoolProperty(m, "bUnskippable", rp.Unskippable); size += WriteBoolProperty(m, "bIsDefaultAction", rp.IsDefaultAction); size += WriteBoolProperty(m, "bIsMajorDecision", rp.IsMajorDecision); size += WriteByteProperty(m, "ReplyType", rp.ReplyTypeType, rp.ReplyTypeValue); size += WriteStrProperty(m, "sText", rp.Text); size += WriteIntProperty(m, "srText", rp.refText, "StringRefProperty"); size += WriteIntProperty(m, "nConditionalFunc", rp.ConditionalFunc); size += WriteIntProperty(m, "nConditionalParam", rp.ConditionalParam); size += WriteIntProperty(m, "nStateTransition", rp.StateTransition); size += WriteIntProperty(m, "nStateTransitionParam", rp.StateTransitionParam); size += WriteIntProperty(m, "nExportID", rp.ExportID); size += WriteIntProperty(m, "nScriptIndex", rp.ScriptIndex); size += WriteIntProperty(m, "nCameraIntimacy", rp.CameraIntimacy); size += WriteBoolProperty(m, "bFireConditional", rp.FireConditional); size += WriteBoolProperty(m, "bAmbient", rp.Ambient); size += WriteBoolProperty(m, "bNonTextLine", rp.NonTextLine); size += WriteBoolProperty(m, "bIgnoreBodyGestures", rp.IgnoreBodyGestures); size += WriteBoolProperty(m, "bAlwaysHideSubtitle", rp.AlwaysHideSubtitle); size += WriteByteProperty(m, "eGUIStyle", rp.GUIStyleType, rp.GUIStyleValue); size += WriteNone(m); return(size); }
public int WriteReplyList(MemoryStream m, ReplyListStruct rp) { int size = 0; size += WriteIntArrayProperty(m, "EntryList", rp.EntryList); size += WriteByteProperty(m, "ReplyType", rp.ReplyTypeValue); size += WriteIntProperty(m, "nListenerIndex", rp.ListenerIndex); size += WriteBoolProperty(m, "bUnskippable", rp.Unskippable); size += WriteIntProperty(m, "srText", rp.refText, "StringRefProperty"); size += WriteStrProperty(m, "sText", rp.Text); size += WriteBoolProperty(m, "bFireConditional", rp.FireConditional); size += WriteIntProperty(m, "nConditionalFunc", rp.ConditionalFunc); size += WriteIntProperty(m, "nConditionalParam", rp.ConditionalParam); size += WriteIntProperty(m, "nStateTransition", rp.StateTransition); size += WriteIntProperty(m, "nStateTransitionParam", rp.StateTransitionParam); size += WriteIntProperty(m, "nExportID", rp.ExportID); size += WriteIntProperty(m, "nScriptIndex", rp.ScriptIndex); size += WriteBoolProperty(m, "bAmbient", rp.Ambient); size += WriteBoolProperty(m, "bNonTextLine", rp.NonTextLine); size += WriteByteProperty(m, "eGUIStyle", rp.GUIStyleValue); size += WriteIntProperty(m, "nCameraIntimacy", rp.CameraIntimacy); size += WriteBoolProperty(m, "bIgnoreBodyGestures", rp.IgnoreBodyGestures); size += WriteNone(m); return size; }
private void ReadReplyList() { ReplyList = new List <ReplyListStruct>(); int f = FindPropByName("m_ReplyList"); if (f == -1) { return; } byte[] buff = Props[f].raw; int count = BitConverter.ToInt32(buff, 0x18); int pos = 0x1C; for (int i = 0; i < count; i++) { List <PropertyReader.Property> p = PropertyReader.ReadProp(pcc, buff, pos); ReplyListStruct e = new ReplyListStruct(); foreach (PropertyReader.Property pp in p) { string name = pcc.getNameEntry(pp.Name); switch (name) { case "EntryList": byte[] buff2 = pp.raw; int count2 = BitConverter.ToInt32(buff2, 0x18); int pos2 = 0x1C; e.EntryList = new List <int>(); for (int j = 0; j < count2; j++) { e.EntryList.Add(BitConverter.ToInt32(buff2, pos2)); pos2 += 4; } break; case "nListenerIndex": e.ListenerIndex = pp.Value.IntValue; break; case "bUnskippable": e.Unskippable = (pp.raw[pp.raw.Length - 1] == 1); break; case "bIsDefaultAction": e.IsDefaultAction = (pp.raw[pp.raw.Length - 1] == 1); break; case "bIsMajorDecision": e.IsMajorDecision = (pp.raw[pp.raw.Length - 1] == 1); break; case "ReplyType": e.ReplyTypeType = BitConverter.ToInt32(pp.raw, 24); e.ReplyTypeValue = BitConverter.ToInt32(pp.raw, 32); break; case "sText": e.Text = pp.Value.StringValue; break; case "srText": e.refText = pp.Value.IntValue; break; case "nConditionalFunc": e.ConditionalFunc = pp.Value.IntValue; break; case "nConditionalParam": e.ConditionalParam = pp.Value.IntValue; break; case "nStateTransition": e.StateTransition = pp.Value.IntValue; break; case "nStateTransitionParam": e.StateTransitionParam = pp.Value.IntValue; break; case "nExportID": e.ExportID = pp.Value.IntValue; break; case "nScriptIndex": e.ScriptIndex = pp.Value.IntValue; break; case "nCameraIntimacy": e.CameraIntimacy = pp.Value.IntValue; break; case "bFireConditional": e.FireConditional = (pp.raw[pp.raw.Length - 1] == 1); break; case "bAmbient": e.Ambient = (pp.raw[pp.raw.Length - 1] == 1); break; case "bNonTextLine": e.NonTextLine = (pp.raw[pp.raw.Length - 1] == 1); break; case "bIgnoreBodyGestures": e.IgnoreBodyGestures = (pp.raw[pp.raw.Length - 1] == 1); break; case "bAlwaysHideSubtitle": e.AlwaysHideSubtitle = (pp.raw[pp.raw.Length - 1] == 1); break; case "eGUIStyle": e.GUIStyleType = BitConverter.ToInt32(pp.raw, 24); e.GUIStyleValue = BitConverter.ToInt32(pp.raw, 32); break; } } ReplyList.Add(e); pos = p[p.Count - 1].offend; } }
private void ReadReplyList() { ReplyList = new List<ReplyListStruct>(); int f = FindPropByName("m_ReplyList"); if (f == -1) return; byte[] buff = Props[f].raw; int count = BitConverter.ToInt32(buff, 0x18); int pos = 0x1C; for (int i = 0; i < count; i++) { List<PropertyReader.Property> p = PropertyReader.ReadProp(pcc, buff, pos); ReplyListStruct e = new ReplyListStruct(); foreach (PropertyReader.Property pp in p) { switch (pcc.getNameEntry(pp.Name)) { case "EntryList": byte[] buff2 = pp.raw; int count2 = BitConverter.ToInt32(buff2, 0x18); int pos2 = 0x1C; e.EntryList = new List<int>(); for (int j = 0; j < count2; j++) { e.EntryList.Add(BitConverter.ToInt32(buff2, pos2)); pos2 += 4; } break; case "nListenerIndex": e.ListenerIndex = pp.Value.IntValue; break; case "bUnskippable": e.Unskippable = (pp.Value.IntValue == 1); break; case "ReplyType": e.ReplyTypeValue = BitConverter.ToInt32(pp.raw, 24); break; case "sText": e.Text = pp.Value.StringValue; break; case "srText": e.refText = pp.Value.IntValue; break; case "nConditionalFunc": e.ConditionalFunc = pp.Value.IntValue; break; case "nConditionalParam": e.ConditionalParam = pp.Value.IntValue; break; case "nStateTransition": e.StateTransition = pp.Value.IntValue; break; case "nStateTransitionParam": e.StateTransitionParam = pp.Value.IntValue; break; case "nExportID": e.ExportID = pp.Value.IntValue; break; case "nScriptIndex": e.ScriptIndex = pp.Value.IntValue; break; case "nCameraIntimacy": e.CameraIntimacy = pp.Value.IntValue; break; case "bFireConditional": e.FireConditional = (pp.Value.IntValue == 1); break; case "bAmbient": e.Ambient = (pp.Value.IntValue == 1); break; case "bNonTextLine": e.NonTextLine = (pp.Value.IntValue == 1); break; case "bIgnoreBodyGestures": e.IgnoreBodyGestures = (pp.Value.IntValue == 1); break; case "eGUIStyle": e.GUIStyleValue = BitConverter.ToInt32(pp.raw, 24); break; case "None": break; } } ReplyList.Add(e); pos = p[p.Count - 1].offend; } }