C2026-008 - Re-Architect RO.FST to include RO Modification date/time and use those when updating ROs from the RO.FST

This commit is contained in:
2026-04-28 09:13:17 -04:00
parent a544a5cd4f
commit 7f0d39b684
14 changed files with 712 additions and 495 deletions
@@ -116,12 +116,12 @@ namespace ROEditor
public uint thisoff;
public string title;
public FstTmpSTRC(ushort type, uint offset, string tl)
public FstTmpSTRC(ushort type, uint offset, string tl)
{
thistype = type;
thisoff = offset;
title = tl;
}
}
void WriteString(BinaryWriter bw, string str)
{
@@ -150,7 +150,7 @@ namespace ROEditor
bw.Write(thisoff);
bw.Write(thistype);
WriteString(bw,title);
}
}
}
// The Sorted Array was not sorting via the ASCII value of each character in a given string.
@@ -565,8 +565,8 @@ namespace ROEditor
string RecIdStr = elem.GetAttribute("RecID");
curRecID = System.Convert.ToUInt32(RecIdStr,16);
// Get the current node's parent id
string ParIdStr = elem.GetAttribute("ParentID");
// Get the current node's parent id
string ParIdStr = elem.GetAttribute("ParentID");
elemParentID = Convert.ToUInt32(ParIdStr,16);
string HasKids = elem.GetAttribute("HasChild");
@@ -771,8 +771,8 @@ namespace ROEditor
private ushort SaveROToFST(XmlNode RONode,ArrayList InUseList,string RtnValTmplate, string AccPageIDTplate)
{
ushort RtnVal;
uint startFST = (uint)fhFST.BaseStream.Position;
uint RORecID;
uint startFST = (uint)fhFST.BaseStream.Position;
uint RORecID;
uint ParID;
byte nullbyte=0;
@@ -844,8 +844,12 @@ namespace ROEditor
AccPageID = " ";
WriteString(AccPageID);
// Save the ID and offset entry for the current ID
IdsAndOffsets.Add(RORecID,startFST);
//C2026-008 Re-Architect RO.FST to include RO Modification date/time
string moddt = ROdatabase.RODB_GetModDateTime(elem.GetAttribute("RecID"), elem.GetAttribute("Table"));
if (!string.IsNullOrEmpty(moddt)) WriteString(moddt);
// Save the ID and offset entry for the current ID
IdsAndOffsets.Add(RORecID, startFST);
// Save the RecID and Accessory Page id
IdsAndAccPgIds[AccPageID] = RORecID;