using System; using System.Collections.Generic; using System.ComponentModel; using System.Xml.Serialization; using ProtoBuf; namespace KKSG { [ProtoContract(Name = "SpriteOperationRes")] [Serializable] public class SpriteOperationRes : IExtensible { [ProtoMember(1, IsRequired = false, Name = "ErrorCode", DataFormat = DataFormat.TwosComplement)] public ErrorCode ErrorCode { get { return this._ErrorCode ?? ErrorCode.ERR_SUCCESS; } set { this._ErrorCode = new ErrorCode?(value); } } [XmlIgnore] [Browsable(false)] public bool ErrorCodeSpecified { get { return this._ErrorCode != null; } set { bool flag = value == (this._ErrorCode == null); if (flag) { this._ErrorCode = (value ? new ErrorCode?(this.ErrorCode) : null); } } } [ProtoMember(2, IsRequired = false, Name = "Exp", DataFormat = DataFormat.TwosComplement)] public uint Exp { get { return this._Exp ?? 0u; } set { this._Exp = new uint?(value); } } [XmlIgnore] [Browsable(false)] public bool ExpSpecified { get { return this._Exp != null; } set { bool flag = value == (this._Exp == null); if (flag) { this._Exp = (value ? new uint?(this.Exp) : null); } } } [ProtoMember(3, IsRequired = false, Name = "AwakeSpriteBefore", DataFormat = DataFormat.Default)] [DefaultValue(null)] public SpriteInfo AwakeSpriteBefore { get { return this._AwakeSpriteBefore; } set { this._AwakeSpriteBefore = value; } } [ProtoMember(4, IsRequired = false, Name = "AwakeSprite", DataFormat = DataFormat.Default)] [DefaultValue(null)] public SpriteInfo AwakeSprite { get { return this._AwakeSprite; } set { this._AwakeSprite = value; } } [ProtoMember(5, Name = "InFight", DataFormat = DataFormat.TwosComplement)] public List InFight { get { return this._InFight; } } [ProtoMember(6, Name = "LastTrainAttrID", DataFormat = DataFormat.TwosComplement)] public List LastTrainAttrID { get { return this._LastTrainAttrID; } } [ProtoMember(7, Name = "LastTrainAttrValue", DataFormat = DataFormat.TwosComplement)] public List LastTrainAttrValue { get { return this._LastTrainAttrValue; } } private ErrorCode? _ErrorCode; private uint? _Exp; private SpriteInfo _AwakeSpriteBefore = null; private SpriteInfo _AwakeSprite = null; private readonly List _InFight = new List(); private readonly List _LastTrainAttrID = new List(); private readonly List _LastTrainAttrValue = new List(); private IExtension extensionObject; private bool ShouldSerializeErrorCode() { return this.ErrorCodeSpecified; } private void ResetErrorCode() { this.ErrorCodeSpecified = false; } private bool ShouldSerializeExp() { return this.ExpSpecified; } private void ResetExp() { this.ExpSpecified = false; } IExtension IExtensible.GetExtensionObject(bool createIfMissing) { return Extensible.GetExtensionObject(ref this.extensionObject, createIfMissing); } } }