public Property(int ID, GumpLayout g) { this.m_ID = ID; this.m_Data = g; this.m_Length = 0x18; this.m_Type = PropertyType.GumpLayout; }
public void Write(BinaryWriter Output) { Output.Write(this.m_ID); Output.Write(this.m_Length); switch (this.m_Type) { case PropertyType.Numeric: Output.Write((int)this.m_Data); break; case PropertyType.Numeric2: Output.Write(((int[])this.m_Data)[0]); Output.Write(((int[])this.m_Data)[1]); break; case PropertyType.Byte: Output.Write((byte)this.m_Data); break; case PropertyType.String: Output.Write((byte[])this.m_Data); break; case PropertyType.GumpLayout: { GumpLayout data = (GumpLayout)this.m_Data; Output.Write(data.Type); Output.Write(data.Extra); Output.Write(data.X); Output.Write(data.Y); Output.Write(data.Width); Output.Write(data.Height); break; } case PropertyType.Boolean: Output.Write((bool)this.m_Data); break; } }