From e7448807d7b6a90afaceaf222290c6743a328bd2 Mon Sep 17 00:00:00 2001 From: zhengxianxin <542436707@qq.com> Date: Fri, 29 May 2026 20:28:08 +0800 Subject: [PATCH] =?UTF-8?q?=E9=85=8D=E7=BD=AE=E8=A1=A8=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- ConfigData/AllConfigs.bytes | Bin 1871358 -> 1874283 bytes Scripts/DR_Generated/DRPLevelData.cs | 129 ++++++ Scripts/DR_Generated/DRPLevelData.cs.meta | 11 + .../Byway/Thrift/Data/AllConfigs.cs | 60 ++- .../Thrift/Data/PLevelData.Extensions.cs | 65 ++++ .../Thrift/Data/PLevelData.Extensions.cs.meta | 11 + .../Byway/Thrift/Data/PLevelData.cs | 214 ++++++++++ .../Byway/Thrift/Data/PLevelData.cs.meta | 11 + .../Byway/Thrift/Data/PLevelDataItem.cs | 366 ++++++++++++++++++ .../Byway/Thrift/Data/PLevelDataItem.cs.meta | 11 + 10 files changed, 877 insertions(+), 1 deletion(-) create mode 100644 Scripts/DR_Generated/DRPLevelData.cs create mode 100644 Scripts/DR_Generated/DRPLevelData.cs.meta create mode 100644 Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelData.Extensions.cs create mode 100644 Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelData.Extensions.cs.meta create mode 100644 Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelData.cs create mode 100644 Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelData.cs.meta create mode 100644 Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelDataItem.cs create mode 100644 Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelDataItem.cs.meta diff --git a/ConfigData/AllConfigs.bytes b/ConfigData/AllConfigs.bytes index c49858e2df83ab36c0888a6b59fd96bf213b8dca..33832e48b991abf58332187d96017715d99fc758 100644 GIT binary patch delta 3183 zcmai0d2AHd8Q(F!ZH((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*-GP}YGmDd_toT414 zuGy_4l~&jA-G4a7rWdm&@@pb2)S4ai{RQks#!VV}F5+WR#k$C^i!hPO5?We?Q`jgy zAn^kdxbCuc7^}sZkTk%VX!&LQ-4GQ7B|a#@+#s6)V-lW>vLg~dBEiIv#ZIjXEIJp{ImqV4D6umUc9gsIxq3_ z5cl!LIdcE0YW2pTvjzh@|GwkJuz2X0h)Zg7khHcM&c zm2*n_X+@N6tll^`JM-d`q0sYS=uU5V2{>fUGw4mA3|V#9bfnQTBv^{kBU*h>NF1cA zUj%OgGC@^Hs9=rds;sCyL*IskX|z4w{vll59${@sD59%%u1BkerwkqdWE4$zk}NMQ&}cwr7)5Mkv`!df@DSatI7LLqpCneC4O9IgAj&S`@T|hixt^+s^;b=u6X<0`7^n;LImr2`>rng-}%s+as B0&D;P diff --git a/Scripts/DR_Generated/DRPLevelData.cs b/Scripts/DR_Generated/DRPLevelData.cs new file mode 100644 index 0000000..433c13b --- /dev/null +++ b/Scripts/DR_Generated/DRPLevelData.cs @@ -0,0 +1,129 @@ +// 此文件由 ThriftIntegratedPipeline 自动生成,请勿手动修改 +// 配置类: PLevelData +// 数据类: PLevelDataItem + +using UnityEngine; +using Byway.Config; +using Byway.Thrift.Data; +using UnityGameFramework.Runtime; + +namespace CrazyMaple +{ + /// + /// PLevelData 数据行 + /// + public class DRPLevelData : DataRowBase + { + private PLevelDataItem _configData; + + /// + /// 唯一标识 + /// + public override int Id + { + get + { + return _configData?.Id ?? 0; + } + } + + /// + /// Lv + /// + public int Lv + { + get + { + return _configData?.Lv ?? 0; + } + } + + /// + /// PExp + /// + public int PExp + { + get + { + return _configData?.PExp ?? 0; + } + } + + /// + /// Item + /// + public string Item + { + get + { + return _configData?.Item ?? ""; + } + } + + /// + /// 从配置加载数据(优先使用传入的配置实例) + /// + public void LoadFromConfig(int id, PLevelData config = null) + { + if (config == null) + { + config = ConfigManager.Instance.GetConfig(); + } + + if (config?.Pleveldatas != null) + { + config.Pleveldatas.TryGetValue(id, out _configData); + } + } + + /// + /// 直接设置配置数据(性能优化:跳过字典查询) + /// + public void SetConfigData(PLevelDataItem configData) + { + _configData = configData; + } + + /// + /// 解析数据行(优化:使用 userData 传入的配置实例,避免重复调用 GetConfig) + /// + public override bool ParseDataRow(string dataRowString, object userData) + { + int id = 0; + if (!int.TryParse(dataRowString, out id)) + { + return false; + } + + // 性能优化:尝试从 userData 获取配置字典,直接获取 Item + if (userData is System.Collections.Generic.Dictionary userDataDict) + { + // 优先尝试从缓存的字典直接获取 Item(最快) + if (userDataDict.TryGetValue("ConfigDict", out object dictObj)) + { + var dict = dictObj as System.Collections.Generic.Dictionary; + if (dict != null && dict.TryGetValue(id, out var item)) + { + _configData = item; + return true; + } + } + + // 备选方案:从配置实例获取 + if (userDataDict.TryGetValue("ConfigInstance", out object configObj)) + { + var config = configObj as PLevelData; + if (config != null) + { + LoadFromConfig(id, config); + return _configData != null; + } + } + } + + // 兜底方案:直接查询(最慢) + LoadFromConfig(id); + return _configData != null; + } + } +} diff --git a/Scripts/DR_Generated/DRPLevelData.cs.meta b/Scripts/DR_Generated/DRPLevelData.cs.meta new file mode 100644 index 0000000..7ea99c5 --- /dev/null +++ b/Scripts/DR_Generated/DRPLevelData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 95dd8f373fe77484087e04558ce6f7fd +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/thrift/gen-netstd/Byway/Thrift/Data/AllConfigs.cs b/Scripts/thrift/gen-netstd/Byway/Thrift/Data/AllConfigs.cs index 7bebbfa..be1a13e 100644 --- a/Scripts/thrift/gen-netstd/Byway/Thrift/Data/AllConfigs.cs +++ b/Scripts/thrift/gen-netstd/Byway/Thrift/Data/AllConfigs.cs @@ -138,6 +138,7 @@ namespace Byway.Thrift.Data private global::Byway.Thrift.Data.FriendInviteRewardData _FriendInviteRewardData; private global::Byway.Thrift.Data.LimitedTimeEventConst _LimitedTimeEventConst; private global::Byway.Thrift.Data.BuildingFeverDecorateOff _BuildingFeverDecorateOff; + private global::Byway.Thrift.Data.PLevelData _PLevelData; [DataMember(Order = 0)] public global::Byway.Thrift.Data.AdGiftData AdGiftData @@ -1511,6 +1512,20 @@ namespace Byway.Thrift.Data } } + [DataMember(Order = 0)] + public global::Byway.Thrift.Data.PLevelData PLevelData + { + get + { + return _PLevelData; + } + set + { + __isset.PLevelData = true; + this._PLevelData = value; + } + } + [DataMember(Order = 1)] public Isset __isset; @@ -1713,6 +1728,8 @@ namespace Byway.Thrift.Data public bool LimitedTimeEventConst; [DataMember] public bool BuildingFeverDecorateOff; + [DataMember] + public bool PLevelData; } #region XmlSerializer support @@ -2207,6 +2224,11 @@ namespace Byway.Thrift.Data return __isset.BuildingFeverDecorateOff; } + public bool ShouldSerializePLevelData() + { + return __isset.PLevelData; + } + #endregion XmlSerializer support public AllConfigs() @@ -2706,6 +2728,11 @@ namespace Byway.Thrift.Data tmp0.BuildingFeverDecorateOff = (global::Byway.Thrift.Data.BuildingFeverDecorateOff)this.BuildingFeverDecorateOff.DeepCopy(); } tmp0.__isset.BuildingFeverDecorateOff = this.__isset.BuildingFeverDecorateOff; + if((PLevelData != null) && __isset.PLevelData) + { + tmp0.PLevelData = (global::Byway.Thrift.Data.PLevelData)this.PLevelData.DeepCopy(); + } + tmp0.__isset.PLevelData = this.__isset.PLevelData; return tmp0; } @@ -3804,6 +3831,17 @@ namespace Byway.Thrift.Data await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); } break; + case 99: + if (field.Type == TType.Struct) + { + PLevelData = new global::Byway.Thrift.Data.PLevelData(); + await PLevelData.ReadAsync(iprot, cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; default: await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); break; @@ -4710,6 +4748,15 @@ namespace Byway.Thrift.Data await BuildingFeverDecorateOff.WriteAsync(oprot, cancellationToken); await oprot.WriteFieldEndAsync(cancellationToken); } + if((PLevelData != null) && __isset.PLevelData) + { + tmp2.Name = "PLevelData"; + tmp2.Type = TType.Struct; + tmp2.ID = 99; + await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); + await PLevelData.WriteAsync(oprot, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } await oprot.WriteFieldStopAsync(cancellationToken); await oprot.WriteStructEndAsync(cancellationToken); } @@ -4820,7 +4867,8 @@ namespace Byway.Thrift.Data && ((__isset.LimitedTimeEventData == other.__isset.LimitedTimeEventData) && ((!__isset.LimitedTimeEventData) || (global::System.Object.Equals(LimitedTimeEventData, other.LimitedTimeEventData)))) && ((__isset.FriendInviteRewardData == other.__isset.FriendInviteRewardData) && ((!__isset.FriendInviteRewardData) || (global::System.Object.Equals(FriendInviteRewardData, other.FriendInviteRewardData)))) && ((__isset.LimitedTimeEventConst == other.__isset.LimitedTimeEventConst) && ((!__isset.LimitedTimeEventConst) || (global::System.Object.Equals(LimitedTimeEventConst, other.LimitedTimeEventConst)))) - && ((__isset.BuildingFeverDecorateOff == other.__isset.BuildingFeverDecorateOff) && ((!__isset.BuildingFeverDecorateOff) || (global::System.Object.Equals(BuildingFeverDecorateOff, other.BuildingFeverDecorateOff)))); + && ((__isset.BuildingFeverDecorateOff == other.__isset.BuildingFeverDecorateOff) && ((!__isset.BuildingFeverDecorateOff) || (global::System.Object.Equals(BuildingFeverDecorateOff, other.BuildingFeverDecorateOff)))) + && ((__isset.PLevelData == other.__isset.PLevelData) && ((!__isset.PLevelData) || (global::System.Object.Equals(PLevelData, other.PLevelData)))); } public override int GetHashCode() { @@ -5218,6 +5266,10 @@ namespace Byway.Thrift.Data { hashcode = (hashcode * 397) + BuildingFeverDecorateOff.GetHashCode(); } + if((PLevelData != null) && __isset.PLevelData) + { + hashcode = (hashcode * 397) + PLevelData.GetHashCode(); + } } return hashcode; } @@ -5814,6 +5866,12 @@ namespace Byway.Thrift.Data tmp3.Append("BuildingFeverDecorateOff: "); BuildingFeverDecorateOff.ToString(tmp3); } + if((PLevelData != null) && __isset.PLevelData) + { + if(0 < tmp4++) { tmp3.Append(", "); } + tmp3.Append("PLevelData: "); + PLevelData.ToString(tmp3); + } tmp3.Append(')'); return tmp3.ToString(); } diff --git a/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelData.Extensions.cs b/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelData.Extensions.cs new file mode 100644 index 0000000..c5876ad --- /dev/null +++ b/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelData.Extensions.cs @@ -0,0 +1,65 @@ +/** + * + * Autogenerated by Thrift Compiler (0.22.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Thrift; +using Thrift.Collections; +using System.Runtime.Serialization; +using Thrift.Protocol; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE0305 // collection init can be simplified +#pragma warning disable IDE0034 // simplify default expression +#pragma warning disable IDE0066 // use switch expression +#pragma warning disable IDE0090 // simplify new expression +#pragma warning disable IDE0290 // use primary CTOR +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + +namespace Byway.Thrift.Data +{ + public static class PLevelDataExtensions + { + public static bool Equals(this Dictionary instance, object that) + { + if (!(that is Dictionary other)) return false; + if (ReferenceEquals(instance, other)) return true; + + return TCollections.Equals(instance, other); + } + + + public static int GetHashCode(this Dictionary instance) + { + return TCollections.GetHashCode(instance); + } + + + public static Dictionary DeepCopy(this Dictionary source) + { + if (source == null) + return null; + + var tmp15 = new Dictionary(source.Count); + foreach (var pair in source) + tmp15.Add(pair.Key, (pair.Value != null) ? pair.Value.DeepCopy() : null); + return tmp15; + } + + + } +} diff --git a/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelData.Extensions.cs.meta b/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelData.Extensions.cs.meta new file mode 100644 index 0000000..c211cca --- /dev/null +++ b/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelData.Extensions.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 6b1a4ee3014816040acab168a881c096 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelData.cs b/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelData.cs new file mode 100644 index 0000000..a44203b --- /dev/null +++ b/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelData.cs @@ -0,0 +1,214 @@ +/** + * + * Autogenerated by Thrift Compiler (0.22.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Thrift; +using Thrift.Collections; +using System.Runtime.Serialization; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE0305 // collection init can be simplified +#pragma warning disable IDE0034 // simplify default expression +#pragma warning disable IDE0066 // use switch expression +#pragma warning disable IDE0090 // simplify new expression +#pragma warning disable IDE0290 // use primary CTOR +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + +namespace Byway.Thrift.Data +{ + + [DataContract(Namespace="")] + public partial class PLevelData : TBase + { + private Dictionary _pleveldatas; + + [DataMember(Order = 0)] + public Dictionary Pleveldatas + { + get + { + return _pleveldatas; + } + set + { + __isset.@pleveldatas = true; + this._pleveldatas = value; + } + } + + + [DataMember(Order = 1)] + public Isset __isset; + [DataContract] + public struct Isset + { + [DataMember] + public bool @pleveldatas; + } + + #region XmlSerializer support + + public bool ShouldSerializePleveldatas() + { + return __isset.@pleveldatas; + } + + #endregion XmlSerializer support + + public PLevelData() + { + } + + public PLevelData DeepCopy() + { + var tmp5 = new PLevelData(); + if((Pleveldatas != null) && __isset.@pleveldatas) + { + tmp5.Pleveldatas = this.Pleveldatas.DeepCopy(); + } + tmp5.__isset.@pleveldatas = this.__isset.@pleveldatas; + return tmp5; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.Map) + { + { + var _map6 = await iprot.ReadMapBeginAsync(cancellationToken); + Pleveldatas = new Dictionary(_map6.Count); + for(int _i7 = 0; _i7 < _map6.Count; ++_i7) + { + int _key8; + global::Byway.Thrift.Data.PLevelDataItem _val9; + _key8 = await iprot.ReadI32Async(cancellationToken); + _val9 = new global::Byway.Thrift.Data.PLevelDataItem(); + await _val9.ReadAsync(iprot, cancellationToken); + Pleveldatas[_key8] = _val9; + } + await iprot.ReadMapEndAsync(cancellationToken); + } + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp10 = new TStruct("PLevelData"); + await oprot.WriteStructBeginAsync(tmp10, cancellationToken); + var tmp11 = new TField(); + if((Pleveldatas != null) && __isset.@pleveldatas) + { + tmp11.Name = "pleveldatas"; + tmp11.Type = TType.Map; + tmp11.ID = 1; + await oprot.WriteFieldBeginAsync(tmp11, cancellationToken); + await oprot.WriteMapBeginAsync(new TMap(TType.I32, TType.Struct, Pleveldatas.Count), cancellationToken); + foreach (int _iter12 in Pleveldatas.Keys) + { + await oprot.WriteI32Async(_iter12, cancellationToken); + await Pleveldatas[_iter12].WriteAsync(oprot, cancellationToken); + } + await oprot.WriteMapEndAsync(cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is PLevelData other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.@pleveldatas == other.__isset.@pleveldatas) && ((!__isset.@pleveldatas) || (TCollections.Equals(Pleveldatas, other.Pleveldatas)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if((Pleveldatas != null) && __isset.@pleveldatas) + { + hashcode = (hashcode * 397) + TCollections.GetHashCode(Pleveldatas); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp13 = new StringBuilder("PLevelData("); + int tmp14 = 0; + if((Pleveldatas != null) && __isset.@pleveldatas) + { + if(0 < tmp14++) { tmp13.Append(", "); } + tmp13.Append("Pleveldatas: "); + Pleveldatas.ToString(tmp13); + } + tmp13.Append(')'); + return tmp13.ToString(); + } + } + +} diff --git a/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelData.cs.meta b/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelData.cs.meta new file mode 100644 index 0000000..eab7984 --- /dev/null +++ b/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelData.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: ffe8d3096b9dfa048b11513b3101c802 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: diff --git a/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelDataItem.cs b/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelDataItem.cs new file mode 100644 index 0000000..2d2f087 --- /dev/null +++ b/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelDataItem.cs @@ -0,0 +1,366 @@ +/** + * + * Autogenerated by Thrift Compiler (0.22.0) + * DO NOT EDIT UNLESS YOU ARE SURE THAT YOU KNOW WHAT YOU ARE DOING + * + */ +using System; +using System.Collections; +using System.Collections.Generic; +using System.Text; +using System.IO; +using System.Linq; +using System.Threading; +using System.Threading.Tasks; +using Thrift; +using Thrift.Collections; +using System.Runtime.Serialization; +using Thrift.Protocol; +using Thrift.Protocol.Entities; +using Thrift.Protocol.Utilities; +using Thrift.Transport; +using Thrift.Transport.Client; + + +#pragma warning disable IDE0079 // remove unnecessary pragmas +#pragma warning disable IDE0017 // object init can be simplified +#pragma warning disable IDE0028 // collection init can be simplified +#pragma warning disable IDE0305 // collection init can be simplified +#pragma warning disable IDE0034 // simplify default expression +#pragma warning disable IDE0066 // use switch expression +#pragma warning disable IDE0090 // simplify new expression +#pragma warning disable IDE0290 // use primary CTOR +#pragma warning disable IDE1006 // parts of the code use IDL spelling +#pragma warning disable CA1822 // empty DeepCopy() methods still non-static +#pragma warning disable IDE0083 // pattern matching "that is not SomeType" requires net5.0 but we still support earlier versions + +namespace Byway.Thrift.Data +{ + + [DataContract(Namespace="")] + public partial class PLevelDataItem : TBase + { + private int _Id; + private int _Lv; + private int _PExp; + private string _Item; + + [DataMember(Order = 0)] + public int Id + { + get + { + return _Id; + } + set + { + __isset.Id = true; + this._Id = value; + } + } + + [DataMember(Order = 0)] + public int Lv + { + get + { + return _Lv; + } + set + { + __isset.Lv = true; + this._Lv = value; + } + } + + [DataMember(Order = 0)] + public int PExp + { + get + { + return _PExp; + } + set + { + __isset.PExp = true; + this._PExp = value; + } + } + + [DataMember(Order = 0)] + public string Item + { + get + { + return _Item; + } + set + { + __isset.Item = true; + this._Item = value; + } + } + + + [DataMember(Order = 1)] + public Isset __isset; + [DataContract] + public struct Isset + { + [DataMember] + public bool Id; + [DataMember] + public bool Lv; + [DataMember] + public bool PExp; + [DataMember] + public bool Item; + } + + #region XmlSerializer support + + public bool ShouldSerializeId() + { + return __isset.Id; + } + + public bool ShouldSerializeLv() + { + return __isset.Lv; + } + + public bool ShouldSerializePExp() + { + return __isset.PExp; + } + + public bool ShouldSerializeItem() + { + return __isset.Item; + } + + #endregion XmlSerializer support + + public PLevelDataItem() + { + } + + public PLevelDataItem DeepCopy() + { + var tmp0 = new PLevelDataItem(); + if(__isset.Id) + { + tmp0.Id = this.Id; + } + tmp0.__isset.Id = this.__isset.Id; + if(__isset.Lv) + { + tmp0.Lv = this.Lv; + } + tmp0.__isset.Lv = this.__isset.Lv; + if(__isset.PExp) + { + tmp0.PExp = this.PExp; + } + tmp0.__isset.PExp = this.__isset.PExp; + if((Item != null) && __isset.Item) + { + tmp0.Item = this.Item; + } + tmp0.__isset.Item = this.__isset.Item; + return tmp0; + } + + public async global::System.Threading.Tasks.Task ReadAsync(TProtocol iprot, CancellationToken cancellationToken) + { + iprot.IncrementRecursionDepth(); + try + { + TField field; + await iprot.ReadStructBeginAsync(cancellationToken); + while (true) + { + field = await iprot.ReadFieldBeginAsync(cancellationToken); + if (field.Type == TType.Stop) + { + break; + } + + switch (field.ID) + { + case 1: + if (field.Type == TType.I32) + { + Id = await iprot.ReadI32Async(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 2: + if (field.Type == TType.I32) + { + Lv = await iprot.ReadI32Async(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 3: + if (field.Type == TType.I32) + { + PExp = await iprot.ReadI32Async(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + case 4: + if (field.Type == TType.String) + { + Item = await iprot.ReadStringAsync(cancellationToken); + } + else + { + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + } + break; + default: + await TProtocolUtil.SkipAsync(iprot, field.Type, cancellationToken); + break; + } + + await iprot.ReadFieldEndAsync(cancellationToken); + } + + await iprot.ReadStructEndAsync(cancellationToken); + } + finally + { + iprot.DecrementRecursionDepth(); + } + } + + public async global::System.Threading.Tasks.Task WriteAsync(TProtocol oprot, CancellationToken cancellationToken) + { + oprot.IncrementRecursionDepth(); + try + { + var tmp1 = new TStruct("PLevelDataItem"); + await oprot.WriteStructBeginAsync(tmp1, cancellationToken); + var tmp2 = new TField(); + if(__isset.Id) + { + tmp2.Name = "Id"; + tmp2.Type = TType.I32; + tmp2.ID = 1; + await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); + await oprot.WriteI32Async(Id, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if(__isset.Lv) + { + tmp2.Name = "Lv"; + tmp2.Type = TType.I32; + tmp2.ID = 2; + await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); + await oprot.WriteI32Async(Lv, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if(__isset.PExp) + { + tmp2.Name = "PExp"; + tmp2.Type = TType.I32; + tmp2.ID = 3; + await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); + await oprot.WriteI32Async(PExp, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + if((Item != null) && __isset.Item) + { + tmp2.Name = "Item"; + tmp2.Type = TType.String; + tmp2.ID = 4; + await oprot.WriteFieldBeginAsync(tmp2, cancellationToken); + await oprot.WriteStringAsync(Item, cancellationToken); + await oprot.WriteFieldEndAsync(cancellationToken); + } + await oprot.WriteFieldStopAsync(cancellationToken); + await oprot.WriteStructEndAsync(cancellationToken); + } + finally + { + oprot.DecrementRecursionDepth(); + } + } + + public override bool Equals(object that) + { + if (!(that is PLevelDataItem other)) return false; + if (ReferenceEquals(this, other)) return true; + return ((__isset.Id == other.__isset.Id) && ((!__isset.Id) || (global::System.Object.Equals(Id, other.Id)))) + && ((__isset.Lv == other.__isset.Lv) && ((!__isset.Lv) || (global::System.Object.Equals(Lv, other.Lv)))) + && ((__isset.PExp == other.__isset.PExp) && ((!__isset.PExp) || (global::System.Object.Equals(PExp, other.PExp)))) + && ((__isset.Item == other.__isset.Item) && ((!__isset.Item) || (global::System.Object.Equals(Item, other.Item)))); + } + + public override int GetHashCode() { + int hashcode = 157; + unchecked { + if(__isset.Id) + { + hashcode = (hashcode * 397) + Id.GetHashCode(); + } + if(__isset.Lv) + { + hashcode = (hashcode * 397) + Lv.GetHashCode(); + } + if(__isset.PExp) + { + hashcode = (hashcode * 397) + PExp.GetHashCode(); + } + if((Item != null) && __isset.Item) + { + hashcode = (hashcode * 397) + Item.GetHashCode(); + } + } + return hashcode; + } + + public override string ToString() + { + var tmp3 = new StringBuilder("PLevelDataItem("); + int tmp4 = 0; + if(__isset.Id) + { + if(0 < tmp4++) { tmp3.Append(", "); } + tmp3.Append("Id: "); + Id.ToString(tmp3); + } + if(__isset.Lv) + { + if(0 < tmp4++) { tmp3.Append(", "); } + tmp3.Append("Lv: "); + Lv.ToString(tmp3); + } + if(__isset.PExp) + { + if(0 < tmp4++) { tmp3.Append(", "); } + tmp3.Append("PExp: "); + PExp.ToString(tmp3); + } + if((Item != null) && __isset.Item) + { + if(0 < tmp4++) { tmp3.Append(", "); } + tmp3.Append("Item: "); + Item.ToString(tmp3); + } + tmp3.Append(')'); + return tmp3.ToString(); + } + } + +} diff --git a/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelDataItem.cs.meta b/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelDataItem.cs.meta new file mode 100644 index 0000000..a67619b --- /dev/null +++ b/Scripts/thrift/gen-netstd/Byway/Thrift/Data/PLevelDataItem.cs.meta @@ -0,0 +1,11 @@ +fileFormatVersion: 2 +guid: 1c88d31bc47c45f4986787223c6c4d79 +MonoImporter: + externalObjects: {} + serializedVersion: 2 + defaultReferences: [] + executionOrder: 0 + icon: {instanceID: 0} + userData: + assetBundleName: + assetBundleVariant: