Remove duplicate struct
This commit is contained in:
@@ -491,62 +491,6 @@ namespace BrewMonster.Scripts.Task
|
||||
}
|
||||
}
|
||||
|
||||
[ StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct TaskFinishCountEntry
|
||||
{
|
||||
public ushort TaskId;
|
||||
public uint FinishCount;
|
||||
public uint FinishTime;
|
||||
public uint Unused2;
|
||||
}
|
||||
|
||||
[ StructLayout(LayoutKind.Sequential, Pack = 1)]
|
||||
public struct TaskFinishCountList
|
||||
{
|
||||
public ushort m_uCount;
|
||||
|
||||
[MarshalAs(UnmanagedType.ByValArray, SizeConst = TaskInterfaceConstants.TASK_FINISH_COUNT_MAX_LEN)]
|
||||
public TaskFinishCountEntry[] m_aList;
|
||||
|
||||
public TaskFinishCountList(byte[] data)
|
||||
{
|
||||
int offset = 0;
|
||||
m_uCount = BitConverter.ToUInt16(data, offset);
|
||||
offset += 2;
|
||||
|
||||
m_aList = new TaskFinishCountEntry[TaskInterfaceConstants.TASK_FINISH_COUNT_MAX_LEN];
|
||||
int entrySize = Marshal.SizeOf<TaskFinishCountEntry>();
|
||||
for (int i=0; i < m_uCount; i++)
|
||||
{
|
||||
m_aList[i] = GPDataTypeHelper.FromBytes<TaskFinishCountEntry>(data[offset..]);
|
||||
offset += entrySize;
|
||||
}
|
||||
}
|
||||
|
||||
public uint Search(uint ulID, uint ulTime)
|
||||
{
|
||||
// TODO: Implement logic to search
|
||||
return 0;
|
||||
}
|
||||
|
||||
public void ResetAt(uint ulID)
|
||||
{
|
||||
// TODO: Implement logic to reset at
|
||||
}
|
||||
|
||||
public void AddOrUpdate(uint ulID, uint ulFinishTime)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void RemoveAll()
|
||||
{
|
||||
m_uCount = 0;
|
||||
m_aList = Array.Empty<TaskFinishCountEntry>();
|
||||
}
|
||||
|
||||
public bool IsValid() { return m_uCount <= TaskInterfaceConstants.TASK_FINISH_COUNT_MAX_LEN; }
|
||||
};
|
||||
|
||||
public struct FnshedTaskEntryOld
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user