diff --git a/aclogview/CM_Allegiance.cs b/aclogview/CM_Allegiance.cs index 61ada20..c89c771 100644 --- a/aclogview/CM_Allegiance.cs +++ b/aclogview/CM_Allegiance.cs @@ -272,7 +272,8 @@ public void contributeToTreeNode(TreeNode node) { } } - public class AllegianceNode { + public class AllegianceNode + { public AllegianceNode _patron; public AllegianceNode _peer; public AllegianceNode _vassal; @@ -281,7 +282,8 @@ public class AllegianceNode { // TODO: Read in all the stuff } - public class AllegianceHierarchy { + public class AllegianceHierarchy + { public AllegianceVersion m_oldVersion; public uint m_total; public PackableHashTable m_AllegianceOfficers; @@ -298,28 +300,48 @@ public class AllegianceHierarchy { public int m_NameLastSetTime; public uint m_isLocked; public uint m_ApprovedVassal; - public AllegianceNode m_pMonarch; + public AllegianceNode m_pMonarch; + + // TODO: Read in all the stuff + + public static AllegianceHierarchy read(BinaryReader binaryReader) + { + AllegianceHierarchy newObj = new AllegianceHierarchy(); + newObj.m_oldVersion = (AllegianceVersion)binaryReader.ReadByte(); + newObj.m_total = binaryReader.ReadUInt32(); + // TODO: Read in profile + return newObj; + } - // TODO: Read in all the stuff + public void contributeToTreeNode(TreeNode node) + { + node.Nodes.Add("m_oldVersion = " + m_oldVersion); + node.Nodes.Add("m_total = " + m_total); + // TODO: Read in profile + } } - public class AllegianceProfile { + public class AllegianceProfile + { public uint _total_members; public uint _total_vassals; public AllegianceHierarchy _allegiance; - public static AllegianceProfile read(BinaryReader binaryReader) { + public static AllegianceProfile read(BinaryReader binaryReader) + { AllegianceProfile newObj = new AllegianceProfile(); newObj._total_members = binaryReader.ReadUInt32(); newObj._total_vassals = binaryReader.ReadUInt32(); - // TODO: Read in profile + newObj._allegiance = AllegianceHierarchy.read(binaryReader); return newObj; } - public void contributeToTreeNode(TreeNode node) { + public void contributeToTreeNode(TreeNode node) + { node.Nodes.Add("_total_members = " + _total_members); node.Nodes.Add("_total_vassals = " + _total_vassals); - // TODO: Read in profile + TreeNode profileNode = node.Nodes.Add("allegianceProfile = "); + _allegiance.contributeToTreeNode(profileNode); } } diff --git a/aclogview/CM_Communication.cs b/aclogview/CM_Communication.cs index 8af8ecd..ac50586 100644 --- a/aclogview/CM_Communication.cs +++ b/aclogview/CM_Communication.cs @@ -155,11 +155,11 @@ public class Recv_ChatRoomTracker : Message public uint RoleplayChannel; public uint Olthoi; public uint Society; - public uint Unknown_3; - public uint Unknown_4; - public uint Unknown_5; - - public static Recv_ChatRoomTracker read(BinaryReader binaryReader) + public uint SocietyCelHan; + public uint SocietyEldWeb; + public uint SocietyRadBlo; + + public static Recv_ChatRoomTracker read(BinaryReader binaryReader) { var newObj = new Recv_ChatRoomTracker(); newObj.AllegianceChannel = binaryReader.ReadUInt32(); @@ -169,9 +169,9 @@ public static Recv_ChatRoomTracker read(BinaryReader binaryReader) newObj.RoleplayChannel = binaryReader.ReadUInt32(); newObj.Olthoi = binaryReader.ReadUInt32(); newObj.Society = binaryReader.ReadUInt32(); - newObj.Unknown_3 = binaryReader.ReadUInt32(); - newObj.Unknown_4 = binaryReader.ReadUInt32(); - newObj.Unknown_5 = binaryReader.ReadUInt32(); + newObj.SocietyCelHan = binaryReader.ReadUInt32(); + newObj.SocietyEldWeb = binaryReader.ReadUInt32(); + newObj.SocietyRadBlo = binaryReader.ReadUInt32(); return newObj; } @@ -186,9 +186,9 @@ public override void contributeToTreeView(TreeView treeView) rootNode.Nodes.Add("RoleplayChannel = " + RoleplayChannel); rootNode.Nodes.Add("Olthoi = " + Olthoi); rootNode.Nodes.Add("Society = " + Society); - rootNode.Nodes.Add("Unknown_3 = " + Unknown_3); - rootNode.Nodes.Add("Unknown_4 = " + Unknown_4); - rootNode.Nodes.Add("Unknown_5 = " + Unknown_5); + rootNode.Nodes.Add("SocietyCelHan = " + SocietyCelHan); + rootNode.Nodes.Add("SocietyEldWeb = " + SocietyEldWeb); + rootNode.Nodes.Add("SocietyRadBlo = " + SocietyRadBlo); treeView.Nodes.Add(rootNode); } } diff --git a/aclogview/Form1.Designer.cs b/aclogview/Form1.Designer.cs index fc81679..69e5388 100644 --- a/aclogview/Form1.Designer.cs +++ b/aclogview/Form1.Designer.cs @@ -54,6 +54,7 @@ private void InitializeComponent() { this.statusStrip = new System.Windows.Forms.StatusStrip(); this.checkBox_HideHeaderOnly = new System.Windows.Forms.CheckBox(); this.checkBox_useHighlighting = new System.Windows.Forms.CheckBox(); + this.mnuItem_EditPreviousHighlightedRow = new System.Windows.Forms.MenuItem(); ((System.ComponentModel.ISupportInitialize)(this.splitContainer_Main)).BeginInit(); this.splitContainer_Main.Panel1.SuspendLayout(); this.splitContainer_Main.Panel2.SuspendLayout(); @@ -99,6 +100,7 @@ private void InitializeComponent() { this.columnHeader6}); this.listView_Packets.Dock = System.Windows.Forms.DockStyle.Fill; this.listView_Packets.FullRowSelect = true; + this.listView_Packets.HideSelection = false; this.listView_Packets.Location = new System.Drawing.Point(0, 0); this.listView_Packets.MultiSelect = false; this.listView_Packets.Name = "listView_Packets"; @@ -207,12 +209,13 @@ private void InitializeComponent() { // this.menuItem_Edit.Index = 1; this.menuItem_Edit.MenuItems.AddRange(new System.Windows.Forms.MenuItem[] { + this.mnuItem_EditPreviousHighlightedRow, this.mnuItem_EditNextHighlightedRow}); this.menuItem_Edit.Text = "Edit"; // // mnuItem_EditNextHighlightedRow // - this.mnuItem_EditNextHighlightedRow.Index = 0; + this.mnuItem_EditNextHighlightedRow.Index = 1; this.mnuItem_EditNextHighlightedRow.Shortcut = System.Windows.Forms.Shortcut.F3; this.mnuItem_EditNextHighlightedRow.Text = "Next Highlighted Row"; this.mnuItem_EditNextHighlightedRow.Click += new System.EventHandler(this.mnuItem_EditNextHighlightedRow_Click); @@ -320,6 +323,13 @@ private void InitializeComponent() { this.checkBox_useHighlighting.UseVisualStyleBackColor = true; this.checkBox_useHighlighting.CheckedChanged += new System.EventHandler(this.checkBox_useHighlighting_CheckedChanged); // + // mnuItem_EditPreviousHighlightedRow + // + this.mnuItem_EditPreviousHighlightedRow.Index = 0; + this.mnuItem_EditPreviousHighlightedRow.Shortcut = System.Windows.Forms.Shortcut.ShiftF3; + this.mnuItem_EditPreviousHighlightedRow.Text = "Previous Highlighted Row"; + this.mnuItem_EditPreviousHighlightedRow.Click += new System.EventHandler(this.mnuItem_EditPreviousHighlightedRow_Click); + // // Form1 // this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F); @@ -383,6 +393,7 @@ private void InitializeComponent() { private System.Windows.Forms.MenuItem menuItem_ToolHeatmap; private System.Windows.Forms.MenuItem mnuItem_ToolFindOpcodeInFiles; private System.Windows.Forms.MenuItem mnuItem_EditNextHighlightedRow; + private System.Windows.Forms.MenuItem mnuItem_EditPreviousHighlightedRow; } } diff --git a/aclogview/Form1.cs b/aclogview/Form1.cs index 74400cf..027ad16 100644 --- a/aclogview/Form1.cs +++ b/aclogview/Form1.cs @@ -787,9 +787,28 @@ private void menuItem_Open_Click(object sender, EventArgs e) loadPcap(openFile.FileName); } + private void mnuItem_EditPreviousHighlightedRow_Click(object sender, EventArgs e) + { + if (listView_Packets.TopItem == null) + return; + + for (int i = listView_Packets.TopItem.Index - 1; i >= 0; i--) + { + if (listView_Packets.Items[i].BackColor != SystemColors.Window) + { + listView_Packets.TopItem = listView_Packets.Items[i]; + listView_Packets.TopItem.Selected = true; + listView_Packets.TopItem.Focused = true; + break; + } + } + } private void mnuItem_EditNextHighlightedRow_Click(object sender, EventArgs e) { + if (listView_Packets.TopItem == null) + return; + for (int i = listView_Packets.TopItem.Index + 1; i < listView_Packets.Items.Count; i++) { if (listView_Packets.Items[i].BackColor != SystemColors.Window)