浏览代码

【增加】物品道具配置表

johnclot69 1 年之前
父节点
当前提交
ee2e4a26a6

二进制
Config/Excel/ItemConfig@s.xlsx


二进制
Config/GenFromExcel/s/ItemConfigCategory.bytes


+ 10 - 0
Config/GenJson/s/ItemConfig.txt

@@ -0,0 +1,10 @@
+{"list":[
+{"_t":"ItemConfig","_id":1,"Name":"经验","Type":"virtual","Desc":"角色升级","Tips":"(日常货币)","Ways":"获得途径:\\n1、无","Price":1,"SalePrice":-1,"LevelReq":1,"Qcolor":3,"UseCD":0,"Prop":"","Par":0,"Min":0,"Max":0,"Icon":"","GroupCount":1,"PurchaseCount":1,"DestID":0,"IsApply":0,"IsApplyNow":0,"ApplyTips":"","BindType":1,"ReserveType":0,"ReservePrice":0,"Disintegration":"","BranchAura":"","NoDestory":1,"NoSell":1,"NoTrade":1,"NoAuction":1,"NoDepotRole":0,"NoDepotAcc":1,"NoDepotGuild":1,"ShowId":"","WaysID":""},
+{"_t":"ItemConfig","_id":2,"Name":"金币","Type":"virtual","Desc":"修仙界使用的交易货币,含有精纯的灵气","Tips":"(日常货币)","Ways":"获得途径:\\n1、击杀妖兽\\n2、师门历练","Price":1,"SalePrice":-1,"LevelReq":1,"Qcolor":1,"UseCD":0,"Prop":"","Par":0,"Min":0,"Max":0,"Icon":"","GroupCount":1,"PurchaseCount":1,"DestID":0,"IsApply":0,"IsApplyNow":0,"ApplyTips":"","BindType":1,"ReserveType":0,"ReservePrice":0,"Disintegration":"","BranchAura":"","NoDestory":1,"NoSell":1,"NoTrade":1,"NoAuction":1,"NoDepotRole":0,"NoDepotAcc":1,"NoDepotGuild":1,"ShowId":"","WaysID":""},
+{"_t":"ItemConfig","_id":3,"Name":"100经验","Type":"misc","Desc":"","Tips":"","Ways":"","Price":0,"SalePrice":0,"LevelReq":0,"Qcolor":0,"UseCD":0,"Prop":"","Par":0,"Min":0,"Max":0,"Icon":"","GroupCount":0,"PurchaseCount":0,"DestID":0,"IsApply":0,"IsApplyNow":0,"ApplyTips":"","BindType":0,"ReserveType":0,"ReservePrice":0,"Disintegration":"","BranchAura":"","NoDestory":0,"NoSell":0,"NoTrade":0,"NoAuction":0,"NoDepotRole":0,"NoDepotAcc":0,"NoDepotGuild":0,"ShowId":"","WaysID":""},
+{"_t":"ItemConfig","_id":4,"Name":"5000经验","Type":"misc","Desc":"","Tips":"","Ways":"","Price":0,"SalePrice":0,"LevelReq":0,"Qcolor":0,"UseCD":0,"Prop":"","Par":0,"Min":0,"Max":0,"Icon":"","GroupCount":0,"PurchaseCount":0,"DestID":0,"IsApply":0,"IsApplyNow":0,"ApplyTips":"","BindType":0,"ReserveType":0,"ReservePrice":0,"Disintegration":"","BranchAura":"","NoDestory":0,"NoSell":0,"NoTrade":0,"NoAuction":0,"NoDepotRole":0,"NoDepotAcc":0,"NoDepotGuild":0,"ShowId":"","WaysID":""},
+{"_t":"ItemConfig","_id":5,"Name":"神秘宝箱","Type":"chest","Desc":"","Tips":"","Ways":"","Price":0,"SalePrice":0,"LevelReq":0,"Qcolor":0,"UseCD":0,"Prop":"","Par":0,"Min":0,"Max":0,"Icon":"","GroupCount":0,"PurchaseCount":0,"DestID":0,"IsApply":0,"IsApplyNow":0,"ApplyTips":"","BindType":0,"ReserveType":0,"ReservePrice":0,"Disintegration":"","BranchAura":"","NoDestory":0,"NoSell":0,"NoTrade":0,"NoAuction":0,"NoDepotRole":0,"NoDepotAcc":0,"NoDepotGuild":0,"ShowId":"","WaysID":""},
+{"_t":"ItemConfig","_id":6,"Name":"神秘宝箱","Type":"chest","Desc":"","Tips":"","Ways":"","Price":0,"SalePrice":0,"LevelReq":0,"Qcolor":0,"UseCD":0,"Prop":"","Par":0,"Min":0,"Max":0,"Icon":"","GroupCount":0,"PurchaseCount":0,"DestID":0,"IsApply":0,"IsApplyNow":0,"ApplyTips":"","BindType":0,"ReserveType":0,"ReservePrice":0,"Disintegration":"","BranchAura":"","NoDestory":0,"NoSell":0,"NoTrade":0,"NoAuction":0,"NoDepotRole":0,"NoDepotAcc":0,"NoDepotGuild":0,"ShowId":"","WaysID":""},
+{"_t":"ItemConfig","_id":7,"Name":"红宝石","Type":"gem","Desc":"","Tips":"","Ways":"","Price":0,"SalePrice":0,"LevelReq":0,"Qcolor":0,"UseCD":0,"Prop":"","Par":0,"Min":0,"Max":0,"Icon":"","GroupCount":0,"PurchaseCount":0,"DestID":0,"IsApply":0,"IsApplyNow":0,"ApplyTips":"","BindType":0,"ReserveType":0,"ReservePrice":0,"Disintegration":"","BranchAura":"","NoDestory":0,"NoSell":0,"NoTrade":0,"NoAuction":0,"NoDepotRole":0,"NoDepotAcc":0,"NoDepotGuild":0,"ShowId":"","WaysID":""},
+{"_t":"ItemConfig","_id":8,"Name":"绿宝石","Type":"gem","Desc":"","Tips":"","Ways":"","Price":0,"SalePrice":0,"LevelReq":0,"Qcolor":0,"UseCD":0,"Prop":"","Par":0,"Min":0,"Max":0,"Icon":"","GroupCount":0,"PurchaseCount":0,"DestID":0,"IsApply":0,"IsApplyNow":0,"ApplyTips":"","BindType":0,"ReserveType":0,"ReservePrice":0,"Disintegration":"","BranchAura":"","NoDestory":0,"NoSell":0,"NoTrade":0,"NoAuction":0,"NoDepotRole":0,"NoDepotAcc":0,"NoDepotGuild":0,"ShowId":"","WaysID":""},
+]}

+ 184 - 0
DotNet/Model/Generate/Config/ItemConfig.cs

@@ -0,0 +1,184 @@
+using System;
+using System.Collections.Generic;
+using MongoDB.Bson.Serialization.Attributes;
+using ProtoBuf;
+
+namespace ET
+{
+    [ProtoContract]
+    [Config]
+    public partial class ItemConfigCategory : ConfigSingleton<ItemConfigCategory>, IMerge
+    {
+        [ProtoIgnore]
+        [BsonIgnore]
+        private Dictionary<int, ItemConfig> dict = new Dictionary<int, ItemConfig>();
+		
+        [BsonElement]
+        [ProtoMember(1)]
+        private List<ItemConfig> list = new List<ItemConfig>();
+		
+        public void Merge(object o)
+        {
+            ItemConfigCategory s = o as ItemConfigCategory;
+            this.list.AddRange(s.list);
+        }
+		
+		[ProtoAfterDeserialization]        
+        public void ProtoEndInit()
+        {
+            foreach (ItemConfig config in list)
+            {
+                config.AfterEndInit();
+                this.dict.Add(config.Id, config);
+            }
+            this.list.Clear();
+            
+            this.AfterEndInit();
+        }
+		
+        public ItemConfig Get(int id)
+        {
+            this.dict.TryGetValue(id, out ItemConfig item);
+
+            if (item == null)
+            {
+                throw new Exception($"配置找不到,配置表名: {nameof (ItemConfig)},配置id: {id}");
+            }
+
+            return item;
+        }
+		
+        public bool Contain(int id)
+        {
+            return this.dict.ContainsKey(id);
+        }
+
+        public Dictionary<int, ItemConfig> GetAll()
+        {
+            return this.dict;
+        }
+
+        public ItemConfig GetOne()
+        {
+            if (this.dict == null || this.dict.Count <= 0)
+            {
+                return null;
+            }
+            return this.dict.Values.GetEnumerator().Current;
+        }
+    }
+
+    [ProtoContract]
+	public partial class ItemConfig: ProtoObject, IConfig
+	{
+		/// <summary>Id</summary>
+		[ProtoMember(1)]
+		public int Id { get; set; }
+		/// <summary>名称</summary>
+		[ProtoMember(2)]
+		public string Name { get; set; }
+		/// <summary>类型</summary>
+		[ProtoMember(3)]
+		public string Type { get; set; }
+		/// <summary>描述</summary>
+		[ProtoMember(4)]
+		public string Desc { get; set; }
+		/// <summary>帮助说明</summary>
+		[ProtoMember(5)]
+		public string Tips { get; set; }
+		/// <summary>获得说明</summary>
+		[ProtoMember(6)]
+		public string Ways { get; set; }
+		/// <summary>基础价格</summary>
+		[ProtoMember(7)]
+		public int Price { get; set; }
+		/// <summary>寄卖基础价格</summary>
+		[ProtoMember(8)]
+		public int SalePrice { get; set; }
+		/// <summary>等级需求</summary>
+		[ProtoMember(9)]
+		public int LevelReq { get; set; }
+		/// <summary>成色</summary>
+		[ProtoMember(10)]
+		public int Qcolor { get; set; }
+		/// <summary>使用间隔</summary>
+		[ProtoMember(11)]
+		public int UseCD { get; set; }
+		/// <summary>属性1</summary>
+		[ProtoMember(12)]
+		public string Prop { get; set; }
+		/// <summary>参数1</summary>
+		[ProtoMember(13)]
+		public int Par { get; set; }
+		/// <summary>最小值1</summary>
+		[ProtoMember(14)]
+		public int Min { get; set; }
+		/// <summary>最大值1</summary>
+		[ProtoMember(15)]
+		public int Max { get; set; }
+		/// <summary>图标文件</summary>
+		[ProtoMember(17)]
+		public string Icon { get; set; }
+		/// <summary>重叠数量</summary>
+		[ProtoMember(18)]
+		public int GroupCount { get; set; }
+		/// <summary>购买上限</summary>
+		[ProtoMember(19)]
+		public int PurchaseCount { get; set; }
+		/// <summary>合成公式</summary>
+		[ProtoMember(20)]
+		public int DestID { get; set; }
+		/// <summary>可使用</summary>
+		[ProtoMember(21)]
+		public int IsApply { get; set; }
+		/// <summary>可立即使用</summary>
+		[ProtoMember(22)]
+		public int IsApplyNow { get; set; }
+		/// <summary>使用说明</summary>
+		[ProtoMember(23)]
+		public string ApplyTips { get; set; }
+		/// <summary>绑定规则</summary>
+		[ProtoMember(24)]
+		public int BindType { get; set; }
+		/// <summary>组队分配</summary>
+		[ProtoMember(25)]
+		public int ReserveType { get; set; }
+		/// <summary>竞价底价</summary>
+		[ProtoMember(26)]
+		public int ReservePrice { get; set; }
+		/// <summary>分解道具</summary>
+		[ProtoMember(27)]
+		public string Disintegration { get; set; }
+		/// <summary>分解获得具体</summary>
+		[ProtoMember(28)]
+		public string BranchAura { get; set; }
+		/// <summary>不可分解</summary>
+		[ProtoMember(29)]
+		public int NoDestory { get; set; }
+		/// <summary>不可出售</summary>
+		[ProtoMember(30)]
+		public int NoSell { get; set; }
+		/// <summary>不可交易</summary>
+		[ProtoMember(31)]
+		public int NoTrade { get; set; }
+		/// <summary>不可寄卖</summary>
+		[ProtoMember(32)]
+		public int NoAuction { get; set; }
+		/// <summary>不可存入个人仓库</summary>
+		[ProtoMember(33)]
+		public int NoDepotRole { get; set; }
+		/// <summary>不可存入账号仓库</summary>
+		[ProtoMember(34)]
+		public int NoDepotAcc { get; set; }
+		/// <summary>不可存入公会仓库</summary>
+		[ProtoMember(35)]
+		public int NoDepotGuild { get; set; }
+		/// <summary>模型ID</summary>
+		[ProtoMember(36)]
+		public string ShowId { get; set; }
+		/// <summary>途径功能ID</summary>
+		[ProtoMember(37)]
+		public string WaysID { get; set; }
+
+	}
+}

二进制
GameServer/Config/Excel/ItemConfig@s.xlsx


二进制
GameServer/Config/GenFromExcel/s/ItemConfigCategory.bytes


+ 10 - 0
GameServer/Config/GenJson/s/ItemConfig.txt

@@ -0,0 +1,10 @@
+{"list":[
+{"_t":"ItemConfig","_id":1,"Name":"经验","Type":"virtual","Desc":"角色升级","Tips":"(日常货币)","Ways":"获得途径:\\n1、无","Price":1,"SalePrice":-1,"LevelReq":1,"Qcolor":3,"UseCD":0,"Prop":"","Par":0,"Min":0,"Max":0,"Icon":"","GroupCount":1,"PurchaseCount":1,"DestID":0,"IsApply":0,"IsApplyNow":0,"ApplyTips":"","BindType":1,"ReserveType":0,"ReservePrice":0,"Disintegration":"","BranchAura":"","NoDestory":1,"NoSell":1,"NoTrade":1,"NoAuction":1,"NoDepotRole":0,"NoDepotAcc":1,"NoDepotGuild":1,"ShowId":"","WaysID":""},
+{"_t":"ItemConfig","_id":2,"Name":"金币","Type":"virtual","Desc":"修仙界使用的交易货币,含有精纯的灵气","Tips":"(日常货币)","Ways":"获得途径:\\n1、击杀妖兽\\n2、师门历练","Price":1,"SalePrice":-1,"LevelReq":1,"Qcolor":1,"UseCD":0,"Prop":"","Par":0,"Min":0,"Max":0,"Icon":"","GroupCount":1,"PurchaseCount":1,"DestID":0,"IsApply":0,"IsApplyNow":0,"ApplyTips":"","BindType":1,"ReserveType":0,"ReservePrice":0,"Disintegration":"","BranchAura":"","NoDestory":1,"NoSell":1,"NoTrade":1,"NoAuction":1,"NoDepotRole":0,"NoDepotAcc":1,"NoDepotGuild":1,"ShowId":"","WaysID":""},
+{"_t":"ItemConfig","_id":3,"Name":"100经验","Type":"misc","Desc":"","Tips":"","Ways":"","Price":0,"SalePrice":0,"LevelReq":0,"Qcolor":0,"UseCD":0,"Prop":"","Par":0,"Min":0,"Max":0,"Icon":"","GroupCount":0,"PurchaseCount":0,"DestID":0,"IsApply":0,"IsApplyNow":0,"ApplyTips":"","BindType":0,"ReserveType":0,"ReservePrice":0,"Disintegration":"","BranchAura":"","NoDestory":0,"NoSell":0,"NoTrade":0,"NoAuction":0,"NoDepotRole":0,"NoDepotAcc":0,"NoDepotGuild":0,"ShowId":"","WaysID":""},
+{"_t":"ItemConfig","_id":4,"Name":"5000经验","Type":"misc","Desc":"","Tips":"","Ways":"","Price":0,"SalePrice":0,"LevelReq":0,"Qcolor":0,"UseCD":0,"Prop":"","Par":0,"Min":0,"Max":0,"Icon":"","GroupCount":0,"PurchaseCount":0,"DestID":0,"IsApply":0,"IsApplyNow":0,"ApplyTips":"","BindType":0,"ReserveType":0,"ReservePrice":0,"Disintegration":"","BranchAura":"","NoDestory":0,"NoSell":0,"NoTrade":0,"NoAuction":0,"NoDepotRole":0,"NoDepotAcc":0,"NoDepotGuild":0,"ShowId":"","WaysID":""},
+{"_t":"ItemConfig","_id":5,"Name":"神秘宝箱","Type":"chest","Desc":"","Tips":"","Ways":"","Price":0,"SalePrice":0,"LevelReq":0,"Qcolor":0,"UseCD":0,"Prop":"","Par":0,"Min":0,"Max":0,"Icon":"","GroupCount":0,"PurchaseCount":0,"DestID":0,"IsApply":0,"IsApplyNow":0,"ApplyTips":"","BindType":0,"ReserveType":0,"ReservePrice":0,"Disintegration":"","BranchAura":"","NoDestory":0,"NoSell":0,"NoTrade":0,"NoAuction":0,"NoDepotRole":0,"NoDepotAcc":0,"NoDepotGuild":0,"ShowId":"","WaysID":""},
+{"_t":"ItemConfig","_id":6,"Name":"神秘宝箱","Type":"chest","Desc":"","Tips":"","Ways":"","Price":0,"SalePrice":0,"LevelReq":0,"Qcolor":0,"UseCD":0,"Prop":"","Par":0,"Min":0,"Max":0,"Icon":"","GroupCount":0,"PurchaseCount":0,"DestID":0,"IsApply":0,"IsApplyNow":0,"ApplyTips":"","BindType":0,"ReserveType":0,"ReservePrice":0,"Disintegration":"","BranchAura":"","NoDestory":0,"NoSell":0,"NoTrade":0,"NoAuction":0,"NoDepotRole":0,"NoDepotAcc":0,"NoDepotGuild":0,"ShowId":"","WaysID":""},
+{"_t":"ItemConfig","_id":7,"Name":"红宝石","Type":"gem","Desc":"","Tips":"","Ways":"","Price":0,"SalePrice":0,"LevelReq":0,"Qcolor":0,"UseCD":0,"Prop":"","Par":0,"Min":0,"Max":0,"Icon":"","GroupCount":0,"PurchaseCount":0,"DestID":0,"IsApply":0,"IsApplyNow":0,"ApplyTips":"","BindType":0,"ReserveType":0,"ReservePrice":0,"Disintegration":"","BranchAura":"","NoDestory":0,"NoSell":0,"NoTrade":0,"NoAuction":0,"NoDepotRole":0,"NoDepotAcc":0,"NoDepotGuild":0,"ShowId":"","WaysID":""},
+{"_t":"ItemConfig","_id":8,"Name":"绿宝石","Type":"gem","Desc":"","Tips":"","Ways":"","Price":0,"SalePrice":0,"LevelReq":0,"Qcolor":0,"UseCD":0,"Prop":"","Par":0,"Min":0,"Max":0,"Icon":"","GroupCount":0,"PurchaseCount":0,"DestID":0,"IsApply":0,"IsApplyNow":0,"ApplyTips":"","BindType":0,"ReserveType":0,"ReservePrice":0,"Disintegration":"","BranchAura":"","NoDestory":0,"NoSell":0,"NoTrade":0,"NoAuction":0,"NoDepotRole":0,"NoDepotAcc":0,"NoDepotGuild":0,"ShowId":"","WaysID":""},
+]}