mirror of
https://github.com/kwsch/NHSE.git
synced 2026-09-14 14:15:35 -05:00
Merge flag2 back in to count
ok sciresm u happy now
This commit is contained in:
@@ -19,8 +19,7 @@ public class Item
|
||||
public ushort ItemId;
|
||||
public byte Flags0;
|
||||
public byte Flags1;
|
||||
public byte Count;
|
||||
public byte Flags2;
|
||||
public ushort Count;
|
||||
public ushort UseCount;
|
||||
|
||||
public ItemType Type => (ItemType) (Flags1 & 3);
|
||||
@@ -28,12 +27,11 @@ public class Item
|
||||
|
||||
public Item() { } // marshalling
|
||||
|
||||
public Item(ushort itemId = NONE, byte flags0 = 0, byte flags1 = 0, byte count = 0, byte flags2 = 0, ushort useCount = 0)
|
||||
public Item(ushort itemId = NONE, byte flags0 = 0, byte flags1 = 0, byte count = 0, ushort useCount = 0)
|
||||
{
|
||||
ItemId = itemId;
|
||||
Flags0 = flags0;
|
||||
Flags1 = flags1;
|
||||
Flags2 = flags2;
|
||||
Count = count;
|
||||
UseCount = useCount;
|
||||
}
|
||||
@@ -41,8 +39,8 @@ public Item(ushort itemId = NONE, byte flags0 = 0, byte flags1 = 0, byte count =
|
||||
public void Delete()
|
||||
{
|
||||
ItemId = NONE;
|
||||
Flags0 = Flags1 = Flags2 = Count = 0;
|
||||
UseCount = 0;
|
||||
Flags0 = Flags1 = 0;
|
||||
Count = UseCount = 0;
|
||||
}
|
||||
|
||||
public void CopyFrom(Item item)
|
||||
@@ -50,7 +48,6 @@ public void CopyFrom(Item item)
|
||||
ItemId = item.ItemId;
|
||||
Flags0 = item.Flags0;
|
||||
Flags1 = item.Flags1;
|
||||
Flags2 = item.Flags2;
|
||||
Count = item.Count;
|
||||
UseCount = item.UseCount;
|
||||
}
|
||||
|
||||
@@ -65,8 +65,6 @@ private static void DrawInfo(Graphics gfx, Font font, Item item, int x1, int y1,
|
||||
gfx.DrawString(item.Flags0.ToString(), font, brush, x1 + 20, y1 + 0);
|
||||
if (item.Flags1 != 0)
|
||||
gfx.DrawString(item.Flags1.ToString(), font, brush, x1 + 0, y1 + 20);
|
||||
if (item.Flags2 != 0)
|
||||
gfx.DrawString(item.Flags2.ToString(), font, brush, x1 + 20, y1 + 20);
|
||||
}
|
||||
|
||||
private static Color GetItemColor(Item item)
|
||||
|
||||
34
NHSE.WinForms/Controls/ItemEditor.Designer.cs
generated
34
NHSE.WinForms/Controls/ItemEditor.Designer.cs
generated
@@ -38,8 +38,6 @@ private void InitializeComponent()
|
||||
this.NUD_Flag0 = new System.Windows.Forms.NumericUpDown();
|
||||
this.L_Flag1 = new System.Windows.Forms.Label();
|
||||
this.NUD_Flag1 = new System.Windows.Forms.NumericUpDown();
|
||||
this.L_Flag2 = new System.Windows.Forms.Label();
|
||||
this.NUD_Flag2 = new System.Windows.Forms.NumericUpDown();
|
||||
this.CM_Hand = new System.Windows.Forms.ContextMenuStrip(this.components);
|
||||
this.Menu_View = new System.Windows.Forms.ToolStripMenuItem();
|
||||
this.Menu_Set = new System.Windows.Forms.ToolStripMenuItem();
|
||||
@@ -48,7 +46,6 @@ private void InitializeComponent()
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Uses)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Flag0)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Flag1)).BeginInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Flag2)).BeginInit();
|
||||
this.CM_Hand.SuspendLayout();
|
||||
this.SuspendLayout();
|
||||
//
|
||||
@@ -67,7 +64,7 @@ private void InitializeComponent()
|
||||
//
|
||||
this.NUD_Count.Location = new System.Drawing.Point(88, 28);
|
||||
this.NUD_Count.Maximum = new decimal(new int[] {
|
||||
255,
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
@@ -97,7 +94,7 @@ private void InitializeComponent()
|
||||
//
|
||||
this.NUD_Uses.Location = new System.Drawing.Point(88, 51);
|
||||
this.NUD_Uses.Maximum = new decimal(new int[] {
|
||||
255,
|
||||
65535,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
@@ -149,28 +146,6 @@ private void InitializeComponent()
|
||||
this.NUD_Flag1.Size = new System.Drawing.Size(56, 20);
|
||||
this.NUD_Flag1.TabIndex = 12;
|
||||
//
|
||||
// L_Flag2
|
||||
//
|
||||
this.L_Flag2.Location = new System.Drawing.Point(3, 119);
|
||||
this.L_Flag2.Name = "L_Flag2";
|
||||
this.L_Flag2.Size = new System.Drawing.Size(79, 20);
|
||||
this.L_Flag2.TabIndex = 15;
|
||||
this.L_Flag2.Text = "Flag2:";
|
||||
this.L_Flag2.TextAlign = System.Drawing.ContentAlignment.MiddleRight;
|
||||
//
|
||||
// NUD_Flag2
|
||||
//
|
||||
this.NUD_Flag2.Hexadecimal = true;
|
||||
this.NUD_Flag2.Location = new System.Drawing.Point(88, 120);
|
||||
this.NUD_Flag2.Maximum = new decimal(new int[] {
|
||||
255,
|
||||
0,
|
||||
0,
|
||||
0});
|
||||
this.NUD_Flag2.Name = "NUD_Flag2";
|
||||
this.NUD_Flag2.Size = new System.Drawing.Size(56, 20);
|
||||
this.NUD_Flag2.TabIndex = 14;
|
||||
//
|
||||
// CM_Hand
|
||||
//
|
||||
this.CM_Hand.Items.AddRange(new System.Windows.Forms.ToolStripItem[] {
|
||||
@@ -202,8 +177,6 @@ private void InitializeComponent()
|
||||
//
|
||||
this.AutoScaleDimensions = new System.Drawing.SizeF(6F, 13F);
|
||||
this.AutoScaleMode = System.Windows.Forms.AutoScaleMode.Font;
|
||||
this.Controls.Add(this.L_Flag2);
|
||||
this.Controls.Add(this.NUD_Flag2);
|
||||
this.Controls.Add(this.L_Flag1);
|
||||
this.Controls.Add(this.NUD_Flag1);
|
||||
this.Controls.Add(this.L_Flag0);
|
||||
@@ -219,7 +192,6 @@ private void InitializeComponent()
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Uses)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Flag0)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Flag1)).EndInit();
|
||||
((System.ComponentModel.ISupportInitialize)(this.NUD_Flag2)).EndInit();
|
||||
this.CM_Hand.ResumeLayout(false);
|
||||
this.ResumeLayout(false);
|
||||
|
||||
@@ -235,8 +207,6 @@ private void InitializeComponent()
|
||||
private System.Windows.Forms.NumericUpDown NUD_Flag0;
|
||||
private System.Windows.Forms.Label L_Flag1;
|
||||
private System.Windows.Forms.NumericUpDown NUD_Flag1;
|
||||
private System.Windows.Forms.Label L_Flag2;
|
||||
private System.Windows.Forms.NumericUpDown NUD_Flag2;
|
||||
private System.Windows.Forms.ContextMenuStrip CM_Hand;
|
||||
private System.Windows.Forms.ToolStripMenuItem Menu_View;
|
||||
private System.Windows.Forms.ToolStripMenuItem Menu_Set;
|
||||
|
||||
@@ -27,7 +27,6 @@ public Item LoadItem(Item item)
|
||||
NUD_Uses.Value = item.UseCount;
|
||||
NUD_Flag0.Value = item.Flags0;
|
||||
NUD_Flag1.Value = item.Flags1;
|
||||
NUD_Flag2.Value = item.Flags2;
|
||||
return item;
|
||||
}
|
||||
|
||||
@@ -39,7 +38,6 @@ public Item SetItem(Item item)
|
||||
item.UseCount = (ushort) NUD_Uses.Value;
|
||||
item.Flags0 = (byte) NUD_Flag0.Value;
|
||||
item.Flags1 = (byte) NUD_Flag1.Value;
|
||||
item.Flags2 = (byte) NUD_Flag2.Value;
|
||||
return item;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user