From 06da72770c641fabf980816ed466a2280dac2be7 Mon Sep 17 00:00:00 2001 From: yyl <yyl> Date: 星期二, 05 八月 2025 19:25:14 +0800 Subject: [PATCH] Merge branch 'master' of http://192.168.1.20:10010/r/Project_SG_scripts --- Main/System/KnapSack/BackpackData.cs | 92 +++++++++++++++------------------------------- 1 files changed, 30 insertions(+), 62 deletions(-) diff --git a/Main/System/KnapSack/BackpackData.cs b/Main/System/KnapSack/BackpackData.cs index 20015b7..058bfab 100644 --- a/Main/System/KnapSack/BackpackData.cs +++ b/Main/System/KnapSack/BackpackData.cs @@ -6,69 +6,37 @@ using System.Collections; - public struct Item +public struct Item +{ + public int id; + public ulong countEx; + public int quality; + public int bind; //缁戝畾 鎴栬�� 鎷嶅崠 浜ゆ槗 + + public Item(int _id, ulong _count) { - public int id; - public int count; //鍏煎鏃т唬鐮佷繚鐣� - public ulong countEx; //鍏煎鏃т唬鐮乧ount锛屽綋鏁伴噺瓒呰繃浜�32浣嶆棤娉曡〃绀烘椂浣跨敤 - public int quality; - public int bind; + this.id = _id; + this.quality = 0; + this.bind = 0; + this.countEx = _count; + } + - public Item(int _id, ulong _count) - { - this.id = _id; - this.count = (int)_count; - this.quality = 0; - this.bind = 0; - this.countEx = _count; - } + public Item(int _id, ulong _count, int _quality) + { + this.id = _id; + this.quality = _quality; + this.bind = 0; + this.countEx = _count; + } - public Item(int _id, ulong _count, int _quality) - { - this.id = _id; - this.count = (int)_count; - this.quality = _quality; - this.bind = 0; - this.countEx = _count; - } + public Item(int _id, ulong _count, int _bind = 0, int _quality = 0) + { + this.id = _id; + this.quality = _quality; + this.bind = _bind; + this.countEx = _count; + } - public Item(int _id, ulong _count, int _bind = 0, int _quality = 0) - { - this.id = _id; - this.count = (int)_count; - this.quality = _quality; - this.bind = _bind; - this.countEx = _count; - } - - #region 鏃т唬鐮佸吋瀹� 鏄剧ず鏃犳硶瓒呰繃32浣� - - public Item(int _id, int _count) - { - this.id = _id; - this.count = _count; - this.quality = 0; - this.bind = 0; - this.countEx = (ulong)_count; - } - - public Item(int _id, int _count, int _quality) - { - this.id = _id; - this.count = _count; - this.quality = _quality; - this.bind = 0; - this.countEx = (ulong)_count; - } - - - public Item(int _id, int _count, int _bind = 0, int _quality = 0) - { - this.id = _id; - this.count = _count; - this.quality = _quality; - this.bind = _bind; - this.countEx = (ulong)_count; - } - #endregion - } \ No newline at end of file + +} \ No newline at end of file -- Gitblit v1.8.0