Merge remote-tracking branch 'origin/master' into Equip
| | |
| | | Register(typeof(HAA0D_tagMCActLoginAwardPlayerInfo), typeof(DTCAA0D_tagMCActLoginAwardPlayerInfo));
|
| | | Register(typeof(HAA20_tagMCFeastWeekPartyInfo), typeof(DTCAA20_tagMCFeastWeekPartyInfo));
|
| | | Register(typeof(HAA21_tagMCFeastWeekPartyPlayerInfo), typeof(DTCAA21_tagMCFeastWeekPartyPlayerInfo));
|
| | | #region 拍卖行
|
| | | Register(typeof(HB501_tagGCAuctionItemInfo), typeof(DTCB501_tagGCAuctionItemInfo));
|
| | | Register(typeof(HB502_tagGCPlayerAuctionItemInfo), typeof(DTCB502_tagGCPlayerAuctionItemInfo));
|
| | | Register(typeof(HB503_tagGCPlayerAuctionRecordInfo), typeof(DTCB503_tagGCPlayerAuctionRecordInfo));
|
| | | Register(typeof(HB504_tagGCAddAuctionItemInfo), typeof(DTCB504_tagGCAddAuctionItemInfo));
|
| | | Register(typeof(HB505_tagGCFamilyAuctionItemInfo), typeof(DTCB505_tagGCFamilyAuctionItemInfo));
|
| | | Register(typeof(HB506_tagGCAttentionAuctionItemInfo), typeof(DTCB506_tagGCAttentionAuctionItemInfo));
|
| | | Register(typeof(HB507_tagGCAttentionAuctionItemID), typeof(DTCB507_tagGCAttentionAuctionItemID));
|
| | | Register(typeof(HB508_tagGCRefreshAuctionItemInfo), typeof(DTCB508_tagGCRefreshAuctionItemInfo));
|
| | | Register(typeof(HB509_tagGCClearAuctionItemInfo), typeof(DTCB509_tagGCClearAuctionItemInfo));
|
| | | Register(typeof(HB510_tagGCBiddingItemInfo), typeof(DTCB510_tagGCBiddingItemInfo));
|
| | | #endregion
|
| | |
|
| | | }
|
| | |
|
| | | private static void Register(Type _pack, Type _business)
|
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Wednesday, March 06, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | |
| | | [XLua.LuaCallCSharp] |
| | | public partial class AuctionConfig |
| | | { |
| | | |
| | | public readonly int Id;
|
| | | public readonly int TypeId;
|
| | | public readonly int[] ChooseItem1;
|
| | | public readonly int[] ChooseItem2;
|
| | | public readonly string TypeName;
|
| | | public readonly string[] ChooseItemName1;
|
| | | public readonly string[] ChooseItemName2; |
| | | |
| | | public AuctionConfig() |
| | | { |
| | | } |
| | | |
| | | public AuctionConfig(string input) |
| | | { |
| | | try |
| | | { |
| | | var tables = input.Split('\t'); |
| | | |
| | | int.TryParse(tables[0],out Id); |
| | |
|
| | | int.TryParse(tables[1],out TypeId); |
| | |
|
| | | string[] ChooseItem1StringArray = tables[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | ChooseItem1 = new int[ChooseItem1StringArray.Length]; |
| | | for (int i=0;i<ChooseItem1StringArray.Length;i++) |
| | | { |
| | | int.TryParse(ChooseItem1StringArray[i],out ChooseItem1[i]); |
| | | }
|
| | |
|
| | | string[] ChooseItem2StringArray = tables[3].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | ChooseItem2 = new int[ChooseItem2StringArray.Length]; |
| | | for (int i=0;i<ChooseItem2StringArray.Length;i++) |
| | | { |
| | | int.TryParse(ChooseItem2StringArray[i],out ChooseItem2[i]); |
| | | }
|
| | |
|
| | | TypeName = tables[4];
|
| | |
|
| | | ChooseItemName1 = tables[5].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries);
|
| | |
|
| | | ChooseItemName2 = tables[6].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | static Dictionary<string, AuctionConfig> configs = new Dictionary<string, AuctionConfig>(); |
| | | public static AuctionConfig Get(string id) |
| | | { |
| | | if (!inited) |
| | | { |
| | | Debug.Log("AuctionConfig 还未完成初始化。"); |
| | | return null; |
| | | } |
| | | |
| | | if (configs.ContainsKey(id)) |
| | | { |
| | | return configs[id]; |
| | | } |
| | | |
| | | AuctionConfig config = null; |
| | | if (rawDatas.ContainsKey(id)) |
| | | { |
| | | config = configs[id] = new AuctionConfig(rawDatas[id]); |
| | | rawDatas.Remove(id); |
| | | } |
| | | |
| | | return config; |
| | | } |
| | | |
| | | public static AuctionConfig Get(int id) |
| | | { |
| | | return Get(id.ToString()); |
| | | } |
| | | |
| | | public static List<string> GetKeys() |
| | | { |
| | | var keys = new List<string>(); |
| | | keys.AddRange(configs.Keys); |
| | | keys.AddRange(rawDatas.Keys); |
| | | return keys; |
| | | } |
| | | |
| | | public static List<AuctionConfig> GetValues() |
| | | { |
| | | var values = new List<AuctionConfig>(); |
| | | values.AddRange(configs.Values); |
| | | |
| | | var keys = new List<string>(rawDatas.Keys); |
| | | foreach (var key in keys) |
| | | { |
| | | values.Add(Get(key)); |
| | | } |
| | | |
| | | return values; |
| | | } |
| | | |
| | | public static bool Has(string id) |
| | | { |
| | | return configs.ContainsKey(id) || rawDatas.ContainsKey(id); |
| | | } |
| | | |
| | | public static bool Has(int id) |
| | | { |
| | | return Has(id.ToString()); |
| | | } |
| | | |
| | | public static bool inited { get; private set; } |
| | | protected static Dictionary<string, string> rawDatas = new Dictionary<string, string>(); |
| | | public static void Init(bool sync=false) |
| | | { |
| | | inited = false; |
| | | var path = string.Empty; |
| | | if (AssetSource.refdataFromEditor) |
| | | { |
| | | path = ResourcesPath.CONFIG_FODLER +"/Auction.txt"; |
| | | } |
| | | else |
| | | { |
| | | path = AssetVersionUtility.GetAssetFilePath("config/Auction.txt"); |
| | | } |
| | | |
| | | var tempConfig = new AuctionConfig(); |
| | | var preParse = tempConfig is IConfigPostProcess; |
| | | |
| | | if (sync) |
| | | { |
| | | var lines = File.ReadAllLines(path); |
| | | if (!preParse) |
| | | { |
| | | rawDatas = new Dictionary<string, string>(lines.Length - 3); |
| | | } |
| | | for (int i = 3; i < lines.Length; i++) |
| | | { |
| | | try |
| | | { |
| | | var line = lines[i]; |
| | | var index = line.IndexOf("\t"); |
| | | if (index == -1) |
| | | { |
| | | continue; |
| | | } |
| | | var id = line.Substring(0, index); |
| | | |
| | | if (preParse) |
| | | { |
| | | var config = new AuctionConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | inited = true; |
| | | } |
| | | else |
| | | { |
| | | ThreadPool.QueueUserWorkItem((object _object) => |
| | | { |
| | | var lines = File.ReadAllLines(path); |
| | | if (!preParse) |
| | | { |
| | | rawDatas = new Dictionary<string, string>(lines.Length - 3); |
| | | } |
| | | for (int i = 3; i < lines.Length; i++) |
| | | { |
| | | try |
| | | { |
| | | var line = lines[i]; |
| | | var index = line.IndexOf("\t"); |
| | | if (index == -1) |
| | | { |
| | | continue; |
| | | } |
| | | var id = line.Substring(0, index); |
| | | |
| | | if (preParse) |
| | | { |
| | | var config = new AuctionConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | |
| | | inited = true; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e6f06d336e3a99c4b9fc6562cabf0cea |
| | | timeCreated: 1551842328 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Wednesday, March 06, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | |
| | | [XLua.LuaCallCSharp] |
| | | public partial class AuctionIndexConfig |
| | | { |
| | | |
| | | public readonly int Id;
|
| | | public readonly int Job;
|
| | | public readonly int[] ItemType;
|
| | | public readonly int Order;
|
| | | public readonly int[] SpecItemID; |
| | | |
| | | public AuctionIndexConfig() |
| | | { |
| | | } |
| | | |
| | | public AuctionIndexConfig(string input) |
| | | { |
| | | try |
| | | { |
| | | var tables = input.Split('\t'); |
| | | |
| | | int.TryParse(tables[0],out Id); |
| | |
|
| | | int.TryParse(tables[1],out Job); |
| | |
|
| | | string[] ItemTypeStringArray = tables[2].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | ItemType = new int[ItemTypeStringArray.Length]; |
| | | for (int i=0;i<ItemTypeStringArray.Length;i++) |
| | | { |
| | | int.TryParse(ItemTypeStringArray[i],out ItemType[i]); |
| | | }
|
| | |
|
| | | int.TryParse(tables[3],out Order); |
| | |
|
| | | string[] SpecItemIDStringArray = tables[4].Trim().Split(StringUtility.splitSeparator,StringSplitOptions.RemoveEmptyEntries); |
| | | SpecItemID = new int[SpecItemIDStringArray.Length]; |
| | | for (int i=0;i<SpecItemIDStringArray.Length;i++) |
| | | { |
| | | int.TryParse(SpecItemIDStringArray[i],out SpecItemID[i]); |
| | | } |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | static Dictionary<string, AuctionIndexConfig> configs = new Dictionary<string, AuctionIndexConfig>(); |
| | | public static AuctionIndexConfig Get(string id) |
| | | { |
| | | if (!inited) |
| | | { |
| | | Debug.Log("AuctionIndexConfig 还未完成初始化。"); |
| | | return null; |
| | | } |
| | | |
| | | if (configs.ContainsKey(id)) |
| | | { |
| | | return configs[id]; |
| | | } |
| | | |
| | | AuctionIndexConfig config = null; |
| | | if (rawDatas.ContainsKey(id)) |
| | | { |
| | | config = configs[id] = new AuctionIndexConfig(rawDatas[id]); |
| | | rawDatas.Remove(id); |
| | | } |
| | | |
| | | return config; |
| | | } |
| | | |
| | | public static AuctionIndexConfig Get(int id) |
| | | { |
| | | return Get(id.ToString()); |
| | | } |
| | | |
| | | public static List<string> GetKeys() |
| | | { |
| | | var keys = new List<string>(); |
| | | keys.AddRange(configs.Keys); |
| | | keys.AddRange(rawDatas.Keys); |
| | | return keys; |
| | | } |
| | | |
| | | public static List<AuctionIndexConfig> GetValues() |
| | | { |
| | | var values = new List<AuctionIndexConfig>(); |
| | | values.AddRange(configs.Values); |
| | | |
| | | var keys = new List<string>(rawDatas.Keys); |
| | | foreach (var key in keys) |
| | | { |
| | | values.Add(Get(key)); |
| | | } |
| | | |
| | | return values; |
| | | } |
| | | |
| | | public static bool Has(string id) |
| | | { |
| | | return configs.ContainsKey(id) || rawDatas.ContainsKey(id); |
| | | } |
| | | |
| | | public static bool Has(int id) |
| | | { |
| | | return Has(id.ToString()); |
| | | } |
| | | |
| | | public static bool inited { get; private set; } |
| | | protected static Dictionary<string, string> rawDatas = new Dictionary<string, string>(); |
| | | public static void Init(bool sync=false) |
| | | { |
| | | inited = false; |
| | | var path = string.Empty; |
| | | if (AssetSource.refdataFromEditor) |
| | | { |
| | | path = ResourcesPath.CONFIG_FODLER +"/AuctionIndex.txt"; |
| | | } |
| | | else |
| | | { |
| | | path = AssetVersionUtility.GetAssetFilePath("config/AuctionIndex.txt"); |
| | | } |
| | | |
| | | var tempConfig = new AuctionIndexConfig(); |
| | | var preParse = tempConfig is IConfigPostProcess; |
| | | |
| | | if (sync) |
| | | { |
| | | var lines = File.ReadAllLines(path); |
| | | if (!preParse) |
| | | { |
| | | rawDatas = new Dictionary<string, string>(lines.Length - 3); |
| | | } |
| | | for (int i = 3; i < lines.Length; i++) |
| | | { |
| | | try |
| | | { |
| | | var line = lines[i]; |
| | | var index = line.IndexOf("\t"); |
| | | if (index == -1) |
| | | { |
| | | continue; |
| | | } |
| | | var id = line.Substring(0, index); |
| | | |
| | | if (preParse) |
| | | { |
| | | var config = new AuctionIndexConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | inited = true; |
| | | } |
| | | else |
| | | { |
| | | ThreadPool.QueueUserWorkItem((object _object) => |
| | | { |
| | | var lines = File.ReadAllLines(path); |
| | | if (!preParse) |
| | | { |
| | | rawDatas = new Dictionary<string, string>(lines.Length - 3); |
| | | } |
| | | for (int i = 3; i < lines.Length; i++) |
| | | { |
| | | try |
| | | { |
| | | var line = lines[i]; |
| | | var index = line.IndexOf("\t"); |
| | | if (index == -1) |
| | | { |
| | | continue; |
| | | } |
| | | var id = line.Substring(0, index); |
| | | |
| | | if (preParse) |
| | | { |
| | | var config = new AuctionIndexConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | |
| | | inited = true; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a877df4bcbf8671419e77fc1d2852714 |
| | | timeCreated: 1551856862 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: Fish |
| | | // [ Date ]: Saturday, March 02, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System.Collections.Generic; |
| | | using System.IO; |
| | | using System.Threading; |
| | | using System; |
| | | using UnityEngine; |
| | | |
| | | [XLua.LuaCallCSharp] |
| | | public partial class AuctionItemConfig |
| | | { |
| | | |
| | | public readonly int ItemID;
|
| | | public readonly int NoticeSaleMinutes;
|
| | | public readonly int FamilySaleMinutes;
|
| | | public readonly int WorldSaleMinutes;
|
| | | public readonly int BasePrice;
|
| | | public readonly int BuyoutPrice;
|
| | | public readonly int BiddingAdd;
|
| | | public readonly int Sortpriority;
|
| | | public readonly int ItemType; |
| | | |
| | | public AuctionItemConfig() |
| | | { |
| | | } |
| | | |
| | | public AuctionItemConfig(string input) |
| | | { |
| | | try |
| | | { |
| | | var tables = input.Split('\t'); |
| | | |
| | | int.TryParse(tables[0],out ItemID); |
| | |
|
| | | int.TryParse(tables[1],out NoticeSaleMinutes); |
| | |
|
| | | int.TryParse(tables[2],out FamilySaleMinutes); |
| | |
|
| | | int.TryParse(tables[3],out WorldSaleMinutes); |
| | |
|
| | | int.TryParse(tables[4],out BasePrice); |
| | |
|
| | | int.TryParse(tables[5],out BuyoutPrice); |
| | |
|
| | | int.TryParse(tables[6],out BiddingAdd); |
| | |
|
| | | int.TryParse(tables[7],out Sortpriority); |
| | |
|
| | | int.TryParse(tables[8],out ItemType); |
| | | } |
| | | catch (Exception ex) |
| | | { |
| | | DebugEx.Log(ex); |
| | | } |
| | | } |
| | | |
| | | static Dictionary<string, AuctionItemConfig> configs = new Dictionary<string, AuctionItemConfig>(); |
| | | public static AuctionItemConfig Get(string id) |
| | | { |
| | | if (!inited) |
| | | { |
| | | Debug.Log("AuctionItemConfig 还未完成初始化。"); |
| | | return null; |
| | | } |
| | | |
| | | if (configs.ContainsKey(id)) |
| | | { |
| | | return configs[id]; |
| | | } |
| | | |
| | | AuctionItemConfig config = null; |
| | | if (rawDatas.ContainsKey(id)) |
| | | { |
| | | config = configs[id] = new AuctionItemConfig(rawDatas[id]); |
| | | rawDatas.Remove(id); |
| | | } |
| | | |
| | | return config; |
| | | } |
| | | |
| | | public static AuctionItemConfig Get(int id) |
| | | { |
| | | return Get(id.ToString()); |
| | | } |
| | | |
| | | public static List<string> GetKeys() |
| | | { |
| | | var keys = new List<string>(); |
| | | keys.AddRange(configs.Keys); |
| | | keys.AddRange(rawDatas.Keys); |
| | | return keys; |
| | | } |
| | | |
| | | public static List<AuctionItemConfig> GetValues() |
| | | { |
| | | var values = new List<AuctionItemConfig>(); |
| | | values.AddRange(configs.Values); |
| | | |
| | | var keys = new List<string>(rawDatas.Keys); |
| | | foreach (var key in keys) |
| | | { |
| | | values.Add(Get(key)); |
| | | } |
| | | |
| | | return values; |
| | | } |
| | | |
| | | public static bool Has(string id) |
| | | { |
| | | return configs.ContainsKey(id) || rawDatas.ContainsKey(id); |
| | | } |
| | | |
| | | public static bool Has(int id) |
| | | { |
| | | return Has(id.ToString()); |
| | | } |
| | | |
| | | public static bool inited { get; private set; } |
| | | protected static Dictionary<string, string> rawDatas = new Dictionary<string, string>(); |
| | | public static void Init(bool sync=false) |
| | | { |
| | | inited = false; |
| | | var path = string.Empty; |
| | | if (AssetSource.refdataFromEditor) |
| | | { |
| | | path = ResourcesPath.CONFIG_FODLER +"/AuctionItem.txt"; |
| | | } |
| | | else |
| | | { |
| | | path = AssetVersionUtility.GetAssetFilePath("config/AuctionItem.txt"); |
| | | } |
| | | |
| | | var tempConfig = new AuctionItemConfig(); |
| | | var preParse = tempConfig is IConfigPostProcess; |
| | | |
| | | if (sync) |
| | | { |
| | | var lines = File.ReadAllLines(path); |
| | | if (!preParse) |
| | | { |
| | | rawDatas = new Dictionary<string, string>(lines.Length - 3); |
| | | } |
| | | for (int i = 3; i < lines.Length; i++) |
| | | { |
| | | try |
| | | { |
| | | var line = lines[i]; |
| | | var index = line.IndexOf("\t"); |
| | | if (index == -1) |
| | | { |
| | | continue; |
| | | } |
| | | var id = line.Substring(0, index); |
| | | |
| | | if (preParse) |
| | | { |
| | | var config = new AuctionItemConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | inited = true; |
| | | } |
| | | else |
| | | { |
| | | ThreadPool.QueueUserWorkItem((object _object) => |
| | | { |
| | | var lines = File.ReadAllLines(path); |
| | | if (!preParse) |
| | | { |
| | | rawDatas = new Dictionary<string, string>(lines.Length - 3); |
| | | } |
| | | for (int i = 3; i < lines.Length; i++) |
| | | { |
| | | try |
| | | { |
| | | var line = lines[i]; |
| | | var index = line.IndexOf("\t"); |
| | | if (index == -1) |
| | | { |
| | | continue; |
| | | } |
| | | var id = line.Substring(0, index); |
| | | |
| | | if (preParse) |
| | | { |
| | | var config = new AuctionItemConfig(line); |
| | | configs[id] = config; |
| | | (config as IConfigPostProcess).OnConfigParseCompleted(); |
| | | } |
| | | else |
| | | { |
| | | rawDatas[id] = line; |
| | | } |
| | | } |
| | | catch (System.Exception ex) |
| | | { |
| | | Debug.LogError(ex); |
| | | } |
| | | } |
| | | |
| | | inited = true; |
| | | }); |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: eb02e3e58079b38439099e7242feb55e |
| | | timeCreated: 1551518938 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | private void CreateTrigger() |
| | | { |
| | | var _mapData = target as Bhv_MapData; |
| | | var _trigger = CreateNewGO(Bhv_MapData.NodeName_Trigger + RequestTriggerID()); |
| | | var _id = RequestTriggerID(); |
| | | var _trigger = CreateNewGO(Bhv_MapData.NodeName_Trigger + _id); |
| | | var _triggerBhv = _trigger.AddComponent<Bhv_MapTrigger>(); |
| | | _triggerBhv.id = _id; |
| | | _triggerBhv.boxCollider = _trigger.AddComponent<BoxCollider>(); |
| | | _trigger.transform.SetParent(_mapData.transform.Find(Bhv_MapData.NodeName_TriggerList)); |
| | | _mapData.triggerList.Add(_triggerBhv); |
| | |
| | | |
| | | if (type == Evt.E_EventType.Enemy) |
| | | { |
| | | var _event = CreateNewGO(Bhv_MapData.NodeName_Event + "RefreshEvemy_" + RequestEventID()); |
| | | int _id = RequestEventID(); |
| | | var _event = CreateNewGO(Bhv_MapData.NodeName_Event + "RefreshEvemy_" + _id); |
| | | var _eventBhv = _event.AddComponent<Bhv_Evt_RefreshMonster>(); |
| | | _eventBhv.id = _id; |
| | | _eventBhv.type = type; |
| | | _event.transform.SetParent(_mapData.transform.Find(Bhv_MapData.NodeName_EventList)); |
| | | _mapData.eventList.Add(_eventBhv); |
| | |
| | | } |
| | | else if (type == Evt.E_EventType.SceneObject) |
| | | { |
| | | var _event = CreateNewGO(Bhv_MapData.NodeName_Event + "RefreshSceneObject_" + RequestEventID()); |
| | | int _id = RequestEventID(); |
| | | var _event = CreateNewGO(Bhv_MapData.NodeName_Event + "RefreshSceneObject_" + _id); |
| | | var _eventBhv = _event.AddComponent<Bhv_Evt_RefreshSceneObject>(); |
| | | _eventBhv.id = _id; |
| | | _eventBhv.type = type; |
| | | _event.transform.SetParent(_mapData.transform.Find(Bhv_MapData.NodeName_EventList)); |
| | | _mapData.eventList.Add(_eventBhv); |
| | |
| | | { |
| | | _mapData.Load(_binaryReader); |
| | | EditorPrefs.SetString(LS_KEY_SAVEPATH, Directory.GetParent(_path).FullName); |
| | | |
| | | foreach (var _event in _mapData.eventList) |
| | | { |
| | | if (_event.id >= m_EventSeed) |
| | | { |
| | | m_EventSeed = _event.id + 1; |
| | | } |
| | | } |
| | | |
| | | foreach (var _trigger in _mapData.triggerList) |
| | | { |
| | | if (_trigger.id >= m_TriggerSeed) |
| | | { |
| | | m_TriggerSeed = _trigger.id + 1; |
| | | } |
| | | } |
| | | } |
| | | } |
| | | } |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 10 拍卖行查询拍卖中的物品 #tagCGQueryAuctionItem
|
| | |
|
| | | public class CB510_tagCGQueryAuctionItem : GameNetPackBasic {
|
| | | public byte Job; //过滤职业,0为不限制
|
| | | public byte ItemTypeCount;
|
| | | public uint[] ItemTypeList; //指定的物品类型
|
| | | public byte ClassLV; //过滤阶数,0为不限制
|
| | | public byte SpecItemIDCount; //指定物品ID个数
|
| | | public uint[] SpecItemIDList; //指定物品ID
|
| | | public string FromItemGUID; //从哪个物品开始查询
|
| | | public byte QueryDir; //查询方向,1-往后查,2-往前查
|
| | | public byte QueryCount; //查询个数,0为全部
|
| | |
|
| | | public CB510_tagCGQueryAuctionItem () {
|
| | | combineCmd = (ushort)0x1801;
|
| | | _cmd = (ushort)0xB510;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | WriteBytes (Job, NetDataType.BYTE);
|
| | | WriteBytes (ItemTypeCount, NetDataType.BYTE);
|
| | | WriteBytes (ItemTypeList, NetDataType.DWORD, ItemTypeCount);
|
| | | WriteBytes (ClassLV, NetDataType.BYTE);
|
| | | WriteBytes (SpecItemIDCount, NetDataType.BYTE);
|
| | | WriteBytes (SpecItemIDList, NetDataType.DWORD, SpecItemIDCount);
|
| | | WriteBytes (FromItemGUID, NetDataType.Chars, 40);
|
| | | WriteBytes (QueryDir, NetDataType.BYTE);
|
| | | WriteBytes (QueryCount, NetDataType.BYTE);
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 54ef01dd5eb57b344a47effb9c2f035a |
| | | timeCreated: 1551065289 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 11 拍卖行查询个人拍卖中的物品 #tagCGQueryPlayerAuctionItem
|
| | |
|
| | | public class CB511_tagCGQueryPlayerAuctionItem : GameNetPackBasic {
|
| | |
|
| | | public CB511_tagCGQueryPlayerAuctionItem () {
|
| | | combineCmd = (ushort)0x1801;
|
| | | _cmd = (ushort)0xB511;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 3fbfdc33191b39140a1556be198da16e |
| | | timeCreated: 1551065289 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 12 拍卖行查询拍卖记录 #tagCGQueryAuctionRecord
|
| | |
|
| | | public class CB512_tagCGQueryAuctionRecord : GameNetPackBasic {
|
| | |
|
| | | public CB512_tagCGQueryAuctionRecord () {
|
| | | combineCmd = (ushort)0x1801;
|
| | | _cmd = (ushort)0xB512;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 9b4b70d64e64f8f42bb13ea600e13687 |
| | | timeCreated: 1551065289 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 15 拍卖行查询仙盟拍卖中的拍品 #tagCGQueryFamilyAuctionItem
|
| | |
|
| | | public class CB515_tagCGQueryFamilyAuctionItem : GameNetPackBasic {
|
| | |
|
| | | public CB515_tagCGQueryFamilyAuctionItem () {
|
| | | combineCmd = (ushort)0x1801;
|
| | | _cmd = (ushort)0xB515;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 0678de4b1269ac64d9dc17ea44d5639e |
| | | timeCreated: 1551065288 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 16 拍卖行查询关注中的拍品 #tagCGQueryAttentionAuctionItem
|
| | |
|
| | | public class CB516_tagCGQueryAttentionAuctionItem : GameNetPackBasic {
|
| | |
|
| | | public CB516_tagCGQueryAttentionAuctionItem () {
|
| | | combineCmd = (ushort)0x1801;
|
| | | _cmd = (ushort)0xB516;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: b6842c28457cd074482c1979476b8eba |
| | | timeCreated: 1551065289 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 17 拍卖行查询定位目标拍品 #tagCGQueryTagAuctionItem
|
| | |
|
| | | public class CB517_tagCGQueryTagAuctionItem : GameNetPackBasic {
|
| | | public string ItemGUID;
|
| | | public uint ItemID;
|
| | |
|
| | | public CB517_tagCGQueryTagAuctionItem () {
|
| | | combineCmd = (ushort)0x1801;
|
| | | _cmd = (ushort)0xB517;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | WriteBytes (ItemGUID, NetDataType.Chars, 40);
|
| | | WriteBytes (ItemID, NetDataType.DWORD);
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: dc3e357471c3e6946ba2cf27b5c80001 |
| | | timeCreated: 1551065289 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 18 拍卖行修改关注物品 #tagCGAttentionAuctionItemChange
|
| | |
|
| | | public class CB518_tagCGAttentionAuctionItemChange : GameNetPackBasic {
|
| | | public uint ItemID;
|
| | | public byte IsAttention; //是否关注,取消关注发0
|
| | |
|
| | | public CB518_tagCGAttentionAuctionItemChange () {
|
| | | combineCmd = (ushort)0x1801;
|
| | | _cmd = (ushort)0xB518;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | WriteBytes (ItemID, NetDataType.DWORD);
|
| | | WriteBytes (IsAttention, NetDataType.BYTE);
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 0ae054c2522471043a71cd3fedc7b77b |
| | | timeCreated: 1551683744 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 13 拍卖行上架拍品 #tagCMSellAuctionItem
|
| | |
|
| | | public class CB513_tagCMSellAuctionItem : GameNetPackBasic {
|
| | | public byte ItemIndex; //物品在背包中索引
|
| | |
|
| | | public CB513_tagCMSellAuctionItem () {
|
| | | combineCmd = (ushort)0x03FE;
|
| | | _cmd = (ushort)0xB513;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | WriteBytes (ItemIndex, NetDataType.BYTE);
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 91c68ee866abd6345886fe92920f71f1 |
| | | timeCreated: 1551074174 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 14 拍卖行竞价物品 #tagCMBiddingAuctionItem
|
| | |
|
| | | public class CB514_tagCMBiddingAuctionItem : GameNetPackBasic {
|
| | | public string ItemGUID;
|
| | | public ushort BiddingPrice; //竞价价格
|
| | |
|
| | | public CB514_tagCMBiddingAuctionItem () {
|
| | | combineCmd = (ushort)0x03FE;
|
| | | _cmd = (ushort)0xB514;
|
| | | }
|
| | |
|
| | | public override void WriteToBytes () {
|
| | | WriteBytes (ItemGUID, NetDataType.Chars, 40);
|
| | | WriteBytes (BiddingPrice, NetDataType.WORD);
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 0aab70f201c4dc141a477de237183b23 |
| | | timeCreated: 1551074174 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: b219540db33d1ae44bda7c98ab9e55a7 |
| | | folderAsset: yes |
| | | timeCreated: 1551063933 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: eda9144d4aff79c4792c7176165a25f8 |
| | | folderAsset: yes |
| | | timeCreated: 1551063933 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 15e0db333ceafcb42854b0735c36aa66 |
| | | folderAsset: yes |
| | | timeCreated: 1551074967 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using Snxxz.UI;
|
| | |
|
| | | // B5 01 拍卖行拍卖中的物品信息 #tagGCAuctionItemInfo
|
| | |
|
| | |
|
| | |
|
| | | public class DTCB501_tagGCAuctionItemInfo : DtcBasic {
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | HB501_tagGCAuctionItemInfo vNetData = vNetPack as HB501_tagGCAuctionItemInfo;
model.AuctionItemInfo(vNetData);
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 448649a645f284c408160a8cdc8ff5cc |
| | | timeCreated: 1551074968 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using Snxxz.UI;
|
| | |
|
| | | // B5 02 拍卖行玩家拍卖中的物品信息 #tagGCPlayerAuctionItemInfo
|
| | |
|
| | |
|
| | |
|
| | | public class DTCB502_tagGCPlayerAuctionItemInfo : DtcBasic {
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | HB502_tagGCPlayerAuctionItemInfo vNetData = vNetPack as HB502_tagGCPlayerAuctionItemInfo;
model.PlayerAuctionItemInfo(vNetData);
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a5590095d159b7f44970a0ad8ecf76c0 |
| | | timeCreated: 1551074968 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using Snxxz.UI;
|
| | |
|
| | | // B5 03 拍卖行玩家拍卖记录 #tagGCPlayerAuctionRecordInfo
|
| | |
|
| | |
|
| | |
|
| | | public class DTCB503_tagGCPlayerAuctionRecordInfo : DtcBasic {
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | HB503_tagGCPlayerAuctionRecordInfo vNetData = vNetPack as HB503_tagGCPlayerAuctionRecordInfo;
model.PlayerAuctionRecord(vNetData);
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 5c8df011ad129c84d8c52e6238f41e07 |
| | | timeCreated: 1551081719 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using Snxxz.UI;
|
| | |
|
| | | // B5 04 拍卖行新上架拍品 #tagGCAddAuctionItemInfo
|
| | |
|
| | |
|
| | |
|
| | | public class DTCB504_tagGCAddAuctionItemInfo : DtcBasic {
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | HB504_tagGCAddAuctionItemInfo vNetData = vNetPack as HB504_tagGCAddAuctionItemInfo;
model.AddAuctionItemInfo(vNetData);
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: cf5fcdafd24473649ae416e4293be7ad |
| | | timeCreated: 1551074969 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using Snxxz.UI;
|
| | |
|
| | | // B5 05 拍卖行仙盟拍卖中的物品信息 #tagGCFamilyAuctionItemInfo
|
| | |
|
| | |
|
| | |
|
| | | public class DTCB505_tagGCFamilyAuctionItemInfo : DtcBasic {
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | HB505_tagGCFamilyAuctionItemInfo vNetData = vNetPack as HB505_tagGCFamilyAuctionItemInfo;
model.FamilyAuctionItemInfo(vNetData);
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e71e90fab7c70774ab0d6cf72dbc579b |
| | | timeCreated: 1551074969 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using Snxxz.UI;
|
| | |
|
| | | // B5 06 拍卖行关注中的拍品信息 #tagGCAttentionAuctionItemInfo
|
| | |
|
| | |
|
| | |
|
| | | public class DTCB506_tagGCAttentionAuctionItemInfo : DtcBasic
|
| | | {
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | public override void Done(GameNetPackBasic vNetPack)
|
| | | {
|
| | | base.Done(vNetPack);
|
| | | HB506_tagGCAttentionAuctionItemInfo vNetData = vNetPack as HB506_tagGCAttentionAuctionItemInfo;
model.AttentionAuctionItemInfo(vNetData);
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a4fbb616afae4ca47b4d72cf27434b5f |
| | | timeCreated: 1551074968 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using Snxxz.UI;
|
| | |
|
| | | // B5 07 拍卖行关注的物品ID #tagGCAttentionAuctionItemID
|
| | |
|
| | |
|
| | |
|
| | | public class DTCB507_tagGCAttentionAuctionItemID : DtcBasic {
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | HB507_tagGCAttentionAuctionItemID vNetData = vNetPack as HB507_tagGCAttentionAuctionItemID;
|
| | | model.AttentionAuctionItemID(vNetData);
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 2835e2ab1ca94004682126c391b13aec |
| | | timeCreated: 1551074968 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using Snxxz.UI;
|
| | |
|
| | | // B5 08 拍卖行刷新拍品 #tagGCRefreshAuctionItemInfo
|
| | |
|
| | |
|
| | |
|
| | | public class DTCB508_tagGCRefreshAuctionItemInfo : DtcBasic {
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | HB508_tagGCRefreshAuctionItemInfo vNetData = vNetPack as HB508_tagGCRefreshAuctionItemInfo;
model.RefreshAuctionItem(vNetData);
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: c57378387034c0149b75545f38ad72b3 |
| | | timeCreated: 1551247313 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using Snxxz.UI;
|
| | |
|
| | | // B5 09 拍卖行清除拍品 #tagGCClearAuctionItemInfo
|
| | |
|
| | |
|
| | |
|
| | | public class DTCB509_tagGCClearAuctionItemInfo : DtcBasic {
AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | public override void Done(GameNetPackBasic vNetPack) {
|
| | | base.Done(vNetPack);
|
| | | HB509_tagGCClearAuctionItemInfo vNetData = vNetPack as HB509_tagGCClearAuctionItemInfo;
model.ClearAuctionItem(vNetData);
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 5a87558b1342e0645b75ef3ae98544e6 |
| | | timeCreated: 1551074968 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | | using Snxxz.UI;
|
| | |
|
| | | // B5 10 拍卖行玩家竞价中的物品信息 #tagGCBiddingItemInfo
|
| | |
|
| | |
|
| | |
|
| | | public class DTCB510_tagGCBiddingItemInfo : DtcBasic
|
| | | {
AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | public override void Done(GameNetPackBasic vNetPack)
|
| | | {
|
| | | base.Done(vNetPack);
|
| | | HB510_tagGCBiddingItemInfo vNetData = vNetPack as HB510_tagGCBiddingItemInfo;
model.BiddingItemInfo(vNetData);
|
| | | }
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: bfc4808c4e1d70d42bcc838e93bbf26a |
| | | timeCreated: 1551074968 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d575b67f5de84854eb64bcc79d594d1d |
| | | folderAsset: yes |
| | | timeCreated: 1551074967 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 01 拍卖行拍卖中的物品信息 #tagGCAuctionItemInfo
|
| | |
|
| | | public class HB501_tagGCAuctionItemInfo : GameNetPackBasic {
|
| | | public byte Job; //过滤职业,0为不限制
|
| | | public byte ItemTypeCount;
|
| | | public uint[] ItemTypeList; //指定的物品类型
|
| | | public byte ClassLV; //过滤阶数,0为不限制
|
| | | public byte SpecItemIDCount; //指定物品ID个数
|
| | | public uint[] SpecItemIDList; //指定物品ID
|
| | | public string FromItemGUID; //从哪个物品开始查询
|
| | | public byte QueryDir; //查询方向,1-往后查,2-往前查,3-定位查询
|
| | | public byte QueryCount; //查询个数,0为全部
|
| | | public ushort QueryRemainlCount; //查询条件对应查询方向剩余个数
|
| | | public byte AuctionItemCount; //返回拍品数量
|
| | | public tagGCAuctionItem[] AuctionItemList; //返回拍品列表
|
| | |
|
| | | public HB501_tagGCAuctionItemInfo () {
|
| | | _cmd = (ushort)0xB501;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out Job, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ItemTypeCount, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out ItemTypeList, vBytes, NetDataType.DWORD, ItemTypeCount);
|
| | | TransBytes (out ClassLV, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out SpecItemIDCount, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out SpecItemIDList, vBytes, NetDataType.DWORD, SpecItemIDCount);
|
| | | TransBytes (out FromItemGUID, vBytes, NetDataType.Chars, 40);
|
| | | TransBytes (out QueryDir, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out QueryCount, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out QueryRemainlCount, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemCount, vBytes, NetDataType.BYTE);
|
| | | AuctionItemList = new tagGCAuctionItem[AuctionItemCount];
|
| | | for (int i = 0; i < AuctionItemCount; i ++) {
|
| | | AuctionItemList[i] = new tagGCAuctionItem();
|
| | | TransBytes (out AuctionItemList[i].ItemGUID, vBytes, NetDataType.Chars, 40);
|
| | | TransBytes (out AuctionItemList[i].FamilyID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out AuctionItemList[i].ItemID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out AuctionItemList[i].ItemCount, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemList[i].AddTime, vBytes, NetDataType.Chars, 19);
|
| | | TransBytes (out AuctionItemList[i].BidderPrice, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemList[i].UserDataLen, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemList[i].UserData, vBytes, NetDataType.Chars, AuctionItemList[i].UserDataLen);
|
| | | }
|
| | | }
|
| | |
|
| | | public struct tagGCAuctionItem {
|
| | | public string ItemGUID;
|
| | | public uint FamilyID; //有值时为仙盟拍品
|
| | | public uint ItemID;
|
| | | public ushort ItemCount;
|
| | | public string AddTime; //上架时间 yyyy-MM-dd hh:mm:ss
|
| | | public ushort BidderPrice; //竞拍玩家出价
|
| | | public ushort UserDataLen;
|
| | | public string UserData; //自定义数据
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 4a15ff3c31e066c4e9b7d1f01259e149 |
| | | timeCreated: 1551074968 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 02 拍卖行玩家拍卖中的物品信息 #tagGCPlayerAuctionItemInfo
|
| | |
|
| | | public class HB502_tagGCPlayerAuctionItemInfo : GameNetPackBasic {
|
| | | public byte AuctionItemCount; //拍品数量
|
| | | public tagGCPlayerAuctionItem[] AuctionItemList; //拍品列表
|
| | |
|
| | | public HB502_tagGCPlayerAuctionItemInfo () {
|
| | | _cmd = (ushort)0xB502;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out AuctionItemCount, vBytes, NetDataType.BYTE);
|
| | | AuctionItemList = new tagGCPlayerAuctionItem[AuctionItemCount];
|
| | | for (int i = 0; i < AuctionItemCount; i ++) {
|
| | | AuctionItemList[i] = new tagGCPlayerAuctionItem();
|
| | | TransBytes (out AuctionItemList[i].ItemGUID, vBytes, NetDataType.Chars, 40);
|
| | | TransBytes (out AuctionItemList[i].FamilyID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out AuctionItemList[i].ItemID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out AuctionItemList[i].ItemCount, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemList[i].AddTime, vBytes, NetDataType.Chars, 19);
|
| | | TransBytes (out AuctionItemList[i].BidderPrice, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemList[i].UserDataLen, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemList[i].UserData, vBytes, NetDataType.Chars, AuctionItemList[i].UserDataLen);
|
| | | }
|
| | | }
|
| | |
|
| | | public struct tagGCPlayerAuctionItem {
|
| | | public string ItemGUID;
|
| | | public uint FamilyID; //有值时为仙盟拍品
|
| | | public uint ItemID;
|
| | | public ushort ItemCount;
|
| | | public string AddTime; //上架时间 yyyy-MM-dd hh:mm:ss
|
| | | public ushort BidderPrice; //竞拍玩家出价
|
| | | public ushort UserDataLen;
|
| | | public string UserData; //自定义数据
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 154b66de4712cfb43a1a965d4d4aa72f |
| | | timeCreated: 1551074968 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 03 拍卖行玩家拍卖记录 #tagGCPlayerAuctionRecordInfo
|
| | |
|
| | | public class HB503_tagGCPlayerAuctionRecordInfo : GameNetPackBasic {
|
| | | public byte Count;
|
| | | public tagGCPlayerAuctionRecord[] AuctionRecordList;
|
| | |
|
| | | public HB503_tagGCPlayerAuctionRecordInfo () {
|
| | | _cmd = (ushort)0xB503;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out Count, vBytes, NetDataType.BYTE);
|
| | | AuctionRecordList = new tagGCPlayerAuctionRecord[Count];
|
| | | for (int i = 0; i < Count; i ++) {
|
| | | AuctionRecordList[i] = new tagGCPlayerAuctionRecord();
|
| | | TransBytes (out AuctionRecordList[i].ItemGUID, vBytes, NetDataType.Chars, 40);
|
| | | TransBytes (out AuctionRecordList[i].FamilyID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out AuctionRecordList[i].RecordType, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out AuctionRecordList[i].RecordResult, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out AuctionRecordList[i].RecordTime, vBytes, NetDataType.Chars, 19);
|
| | | TransBytes (out AuctionRecordList[i].BidderPrice, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out AuctionRecordList[i].BidderName, vBytes, NetDataType.Chars, 33);
|
| | | TransBytes (out AuctionRecordList[i].ItemID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out AuctionRecordList[i].ItemCount, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionRecordList[i].UserDataLen, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionRecordList[i].UserData, vBytes, NetDataType.Chars, AuctionRecordList[i].UserDataLen);
|
| | | }
|
| | | }
|
| | |
|
| | | public struct tagGCPlayerAuctionRecord {
|
| | | public string ItemGUID;
|
| | | public uint FamilyID; //有值时为仙盟拍品
|
| | | public byte RecordType; //记录类型 0-我的拍品记录 1-仙盟拍品记录 2-我的竞拍记录
|
| | | public byte RecordResult; //记录结果 0-流拍 1-拍卖成交 2-回收 3-竞价成功 4-竞价失败
|
| | | public string RecordTime; //记录时间 yyyy-MM-dd hh:mm:ss
|
| | | public uint BidderPrice; //成交价格
|
| | | public string BidderName; //成交玩家名
|
| | | public uint ItemID;
|
| | | public ushort ItemCount;
|
| | | public ushort UserDataLen;
|
| | | public string UserData; //自定义数据
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: cbd6421f74d65f04a9de894bf9b4eee8 |
| | | timeCreated: 1551081719 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 04 拍卖行新上架拍品 #tagGCAddAuctionItemInfo
|
| | |
|
| | | public class HB504_tagGCAddAuctionItemInfo : GameNetPackBasic {
|
| | | public byte AddCount;
|
| | | public tagGCAddAuctionItem[] AddAuctionItemList;
|
| | |
|
| | | public HB504_tagGCAddAuctionItemInfo () {
|
| | | _cmd = (ushort)0xB504;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out AddCount, vBytes, NetDataType.BYTE);
|
| | | AddAuctionItemList = new tagGCAddAuctionItem[AddCount];
|
| | | for (int i = 0; i < AddCount; i ++) {
|
| | | AddAuctionItemList[i] = new tagGCAddAuctionItem();
|
| | | TransBytes (out AddAuctionItemList[i].ItemGUID, vBytes, NetDataType.Chars, 40);
|
| | | TransBytes (out AddAuctionItemList[i].ItemID, vBytes, NetDataType.DWORD);
|
| | | }
|
| | | }
|
| | |
|
| | | public struct tagGCAddAuctionItem {
|
| | | public string ItemGUID;
|
| | | public uint ItemID;
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d03e9f560c9da8c4dad9c68bfffaeb8c |
| | | timeCreated: 1551074969 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 05 拍卖行仙盟拍卖中的物品信息 #tagGCFamilyAuctionItemInfo
|
| | |
|
| | | public class HB505_tagGCFamilyAuctionItemInfo : GameNetPackBasic {
|
| | | public byte AuctionItemCount; //拍品数量
|
| | | public tagGCFamilyAuctionItem[] AuctionItemList; //拍品列表
|
| | |
|
| | | public HB505_tagGCFamilyAuctionItemInfo () {
|
| | | _cmd = (ushort)0xB505;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out AuctionItemCount, vBytes, NetDataType.BYTE);
|
| | | AuctionItemList = new tagGCFamilyAuctionItem[AuctionItemCount];
|
| | | for (int i = 0; i < AuctionItemCount; i ++) {
|
| | | AuctionItemList[i] = new tagGCFamilyAuctionItem();
|
| | | TransBytes (out AuctionItemList[i].ItemGUID, vBytes, NetDataType.Chars, 40);
|
| | | TransBytes (out AuctionItemList[i].FamilyID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out AuctionItemList[i].ItemID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out AuctionItemList[i].ItemCount, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemList[i].AddTime, vBytes, NetDataType.Chars, 19);
|
| | | TransBytes (out AuctionItemList[i].BidderPrice, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemList[i].UserDataLen, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemList[i].UserData, vBytes, NetDataType.Chars, AuctionItemList[i].UserDataLen);
|
| | | TransBytes (out AuctionItemList[i].FamilyPlayerIDLen, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemList[i].FamilyPlayerIDInfo, vBytes, NetDataType.Chars, AuctionItemList[i].FamilyPlayerIDLen);
|
| | | TransBytes (out AuctionItemList[i].AuctionType, vBytes, NetDataType.BYTE);
|
| | | }
|
| | | }
|
| | |
|
| | | public struct tagGCFamilyAuctionItem {
|
| | | public string ItemGUID;
|
| | | public uint FamilyID; //有值时为仙盟拍品
|
| | | public uint ItemID;
|
| | | public ushort ItemCount;
|
| | | public string AddTime; //上架时间 yyyy-MM-dd hh:mm:ss
|
| | | public ushort BidderPrice; //竞拍玩家出价
|
| | | public ushort UserDataLen;
|
| | | public string UserData; //自定义数据
|
| | | public ushort FamilyPlayerIDLen;
|
| | | public string FamilyPlayerIDInfo; //可获得收益的仙盟玩家ID信息
|
| | | public byte AuctionType; //拍品类型,0-全服拍品,1-仙盟拍品
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ce12bedb01c8d53459f12141a66b5c6b |
| | | timeCreated: 1551074968 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 06 拍卖行关注中的拍品信息 #tagGCAttentionAuctionItemInfo
|
| | |
|
| | | public class HB506_tagGCAttentionAuctionItemInfo : GameNetPackBasic {
|
| | | public byte AuctionItemCount; //拍品数量
|
| | | public tagGCAttentionAuctionItem[] AuctionItemList; //拍品列表
|
| | |
|
| | | public HB506_tagGCAttentionAuctionItemInfo () {
|
| | | _cmd = (ushort)0xB506;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out AuctionItemCount, vBytes, NetDataType.BYTE);
|
| | | AuctionItemList = new tagGCAttentionAuctionItem[AuctionItemCount];
|
| | | for (int i = 0; i < AuctionItemCount; i ++) {
|
| | | AuctionItemList[i] = new tagGCAttentionAuctionItem();
|
| | | TransBytes (out AuctionItemList[i].ItemGUID, vBytes, NetDataType.Chars, 40);
|
| | | TransBytes (out AuctionItemList[i].FamilyID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out AuctionItemList[i].ItemID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out AuctionItemList[i].ItemCount, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemList[i].AddTime, vBytes, NetDataType.Chars, 19);
|
| | | TransBytes (out AuctionItemList[i].BidderPrice, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemList[i].UserDataLen, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemList[i].UserData, vBytes, NetDataType.Chars, AuctionItemList[i].UserDataLen);
|
| | | }
|
| | | }
|
| | |
|
| | | public struct tagGCAttentionAuctionItem {
|
| | | public string ItemGUID;
|
| | | public uint FamilyID; //有值时为仙盟拍品
|
| | | public uint ItemID;
|
| | | public ushort ItemCount;
|
| | | public string AddTime; //上架时间 yyyy-MM-dd hh:mm:ss
|
| | | public ushort BidderPrice; //竞拍玩家出价
|
| | | public ushort UserDataLen;
|
| | | public string UserData; //自定义数据
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: ee23f6f4a54aefc47ae89b1f2ab486d2 |
| | | timeCreated: 1551074969 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 07 拍卖行关注的物品ID #tagGCAttentionAuctionItemID
|
| | |
|
| | | public class HB507_tagGCAttentionAuctionItemID : GameNetPackBasic {
|
| | | public byte AttentionCount;
|
| | | public uint[] AttentionItemIDList; // 关注的物品ID列表
|
| | |
|
| | | public HB507_tagGCAttentionAuctionItemID () {
|
| | | _cmd = (ushort)0xB507;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out AttentionCount, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out AttentionItemIDList, vBytes, NetDataType.DWORD, AttentionCount);
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: b76477f7f6c16ca41828433c2863f17f |
| | | timeCreated: 1551074968 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 08 拍卖行刷新拍品 #tagGCRefreshAuctionItemInfo
|
| | |
|
| | | public class HB508_tagGCRefreshAuctionItemInfo : GameNetPackBasic {
|
| | | public byte RefreshCount;
|
| | | public tagGCRefreshAuctionItem[] RefreshAuctionItemList;
|
| | |
|
| | | public HB508_tagGCRefreshAuctionItemInfo () {
|
| | | _cmd = (ushort)0xB508;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out RefreshCount, vBytes, NetDataType.BYTE);
|
| | | RefreshAuctionItemList = new tagGCRefreshAuctionItem[RefreshCount];
|
| | | for (int i = 0; i < RefreshCount; i ++) {
|
| | | RefreshAuctionItemList[i] = new tagGCRefreshAuctionItem();
|
| | | TransBytes (out RefreshAuctionItemList[i].ItemGUID, vBytes, NetDataType.Chars, 40);
|
| | | TransBytes (out RefreshAuctionItemList[i].AuctionType, vBytes, NetDataType.BYTE);
|
| | | TransBytes (out RefreshAuctionItemList[i].AddTime, vBytes, NetDataType.Chars, 19);
|
| | | TransBytes (out RefreshAuctionItemList[i].BidderID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out RefreshAuctionItemList[i].BidderPrice, vBytes, NetDataType.DWORD);
|
| | | }
|
| | | }
|
| | |
|
| | | public struct tagGCRefreshAuctionItem {
|
| | | public string ItemGUID;
|
| | | public byte AuctionType; //拍品类型,0-全服拍品,1-仙盟拍品
|
| | | public string AddTime; //上架时间
|
| | | public uint BidderID; //最高竞拍玩家ID,也就是当前最高竞价玩家ID |
| | | public uint BidderPrice; //最高竞拍价格
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: d8cb8c38e9e969e49ba88e351f008751 |
| | | timeCreated: 1551247313 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 09 拍卖行清除拍品 #tagGCClearAuctionItemInfo
|
| | |
|
| | | public class HB509_tagGCClearAuctionItemInfo : GameNetPackBasic {
|
| | | public byte ClearCount;
|
| | | public tagGCClearAuctionItem[] ClearAuctionItemList;
|
| | |
|
| | | public HB509_tagGCClearAuctionItemInfo () {
|
| | | _cmd = (ushort)0xB509;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out ClearCount, vBytes, NetDataType.BYTE);
|
| | | ClearAuctionItemList = new tagGCClearAuctionItem[ClearCount];
|
| | | for (int i = 0; i < ClearCount; i ++) {
|
| | | ClearAuctionItemList[i] = new tagGCClearAuctionItem();
|
| | | TransBytes (out ClearAuctionItemList[i].ItemGUID, vBytes, NetDataType.Chars, 40);
|
| | | }
|
| | | }
|
| | |
|
| | | public struct tagGCClearAuctionItem {
|
| | | public string ItemGUID;
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 99aebcfc7a720d94a851a53b9d52e53d |
| | | timeCreated: 1551074968 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | using UnityEngine;
|
| | | using System.Collections;
|
| | |
|
| | | // B5 10 拍卖行玩家竞价中的物品信息 #tagGCBiddingItemInfo
|
| | |
|
| | | public class HB510_tagGCBiddingItemInfo : GameNetPackBasic {
|
| | | public byte AuctionItemCount; //拍品数量
|
| | | public tagGCBiddingItem[] AuctionItemList; //拍品列表
|
| | |
|
| | | public HB510_tagGCBiddingItemInfo () {
|
| | | _cmd = (ushort)0xB510;
|
| | | }
|
| | |
|
| | | public override void ReadFromBytes (byte[] vBytes) {
|
| | | TransBytes (out AuctionItemCount, vBytes, NetDataType.BYTE);
|
| | | AuctionItemList = new tagGCBiddingItem[AuctionItemCount];
|
| | | for (int i = 0; i < AuctionItemCount; i ++) {
|
| | | AuctionItemList[i] = new tagGCBiddingItem();
|
| | | TransBytes (out AuctionItemList[i].ItemGUID, vBytes, NetDataType.Chars, 40);
|
| | | TransBytes (out AuctionItemList[i].FamilyID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out AuctionItemList[i].ItemID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out AuctionItemList[i].ItemCount, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemList[i].AddTime, vBytes, NetDataType.Chars, 19);
|
| | | TransBytes (out AuctionItemList[i].BidderID, vBytes, NetDataType.DWORD);
|
| | | TransBytes (out AuctionItemList[i].BidderPrice, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemList[i].UserDataLen, vBytes, NetDataType.WORD);
|
| | | TransBytes (out AuctionItemList[i].UserData, vBytes, NetDataType.Chars, AuctionItemList[i].UserDataLen);
|
| | | }
|
| | | }
|
| | |
|
| | | public struct tagGCBiddingItem {
|
| | | public string ItemGUID;
|
| | | public uint FamilyID; //有值时为仙盟拍品
|
| | | public uint ItemID;
|
| | | public ushort ItemCount;
|
| | | public string AddTime; //上架时间 yyyy-MM-dd hh:mm:ss
|
| | | public uint BidderID; //竞拍玩家ID,也就是当前最高竞价玩家ID
|
| | | public ushort BidderPrice; //竞拍玩家出价
|
| | | public ushort UserDataLen;
|
| | | public string UserData; //自定义数据
|
| | | }
|
| | |
|
| | | }
|
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 2b6b26e62847550428c0fb5f86d65463 |
| | | timeCreated: 1551074968 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | _p = m_Data.transferPoints[targetPoint]; |
| | | _hero.destForward = _hero.Forward = MathUtility.ForwardXZ(_p.position, _hero.Pos); |
| | | m_InCreaseTime += .5f * Time.deltaTime; |
| | | _hero.Pos = Vector3.Lerp(m_StartPos, _p.position, m_InCreaseTime); |
| | | float _y = 0; |
| | | if (m_StartPos.y > _p.position.y) |
| | | { |
| | | _y = Constants.hurtAniCurve.animationCurve.Evaluate(m_InCreaseTime) * (m_StartPos.y - _p.position.y) + (1 - m_InCreaseTime) * (m_StartPos.y - _p.position.y); |
| | | } |
| | | else |
| | | { |
| | | _y = Constants.hurtAniCurve.animationCurve.Evaluate(m_InCreaseTime) * (_p.position.y - m_StartPos.y); |
| | | } |
| | | Vector3 _p1 = _p.position + new Vector3(0, _y, 0); |
| | | _hero.Pos = Vector3.Lerp(m_StartPos, _p1, m_InCreaseTime); |
| | | _distance = MathUtility.DistanceSqrtXZ(_hero.Pos, _p.position); |
| | | if (_distance < 0.05f) |
| | | { |
| | |
| | | Utils.RegisterFunc(L, Utils.METHOD_IDX, "GetPromoteDetailShow", _m_GetPromoteDetailShow); |
| | | |
| | | |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "allStoneLv", _g_get_allStoneLv); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "wingLv2GenerDict", _g_get_wingLv2GenerDict); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "roleStrongerDic", _g_get_roleStrongerDic); |
| | | Utils.RegisterFunc(L, Utils.GETTER_IDX, "fightPowerPercents", _g_get_fightPowerPercents); |
| | |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| | | static int _g_get_allStoneLv(RealStatePtr L) |
| | | { |
| | | try { |
| | | ObjectTranslator translator = ObjectTranslatorPool.Instance.Find(L); |
| | | |
| | | Snxxz.UI.RolePromoteModel gen_to_be_invoked = (Snxxz.UI.RolePromoteModel)translator.FastGetCSObj(L, 1); |
| | | LuaAPI.xlua_pushinteger(L, gen_to_be_invoked.allStoneLv); |
| | | } catch(System.Exception gen_e) { |
| | | return LuaAPI.luaL_error(L, "c# exception:" + gen_e); |
| | | } |
| | | return 1; |
| | | } |
| | | |
| | | [MonoPInvokeCallbackAttribute(typeof(LuaCSFunction))] |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 29e1b075affb53048adf5ec290de0c06 |
| | | folderAsset: yes |
| | | timeCreated: 1551063585 |
| | | licenseType: Pro |
| | | DefaultImporter: |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, March 01, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | //我的关注面板 |
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class AttentionWin : Window |
| | | {
|
| | | [SerializeField] ScrollerController m_ScrollerController;
|
| | | [SerializeField] Toggle m_MaterialToggle;//材料
|
| | | [SerializeField] Toggle m_MountAndPetToggle;//灵宠
|
| | | [SerializeField] Toggle m_EquipmentToggle;//装备
|
| | | [SerializeField] Button m_CloseButton;
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } } |
| | | List<AuctionItemConfig> auctionItemList; |
| | | int ItemType = 1; |
| | | #region Built-in |
| | | enum AttentionType
|
| | | {
|
| | | Material = 1,
|
| | | MountAndPet = 2,
|
| | | Equipment = 3,
|
| | | } |
| | | protected override void BindController() |
| | | {
|
| | |
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
|
| | | m_ScrollerController.lockType = EnhanceLockType.KeepVertical; |
| | | |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_MaterialToggle.onValueChanged.AddListener(OnClickToggleMaterial); |
| | | m_MountAndPetToggle.onValueChanged.AddListener(OnClickToggleMountAndPet); |
| | | m_EquipmentToggle.onValueChanged.AddListener(OnClickToggleEquipment); |
| | | m_CloseButton.AddListener(()=> { CloseImmediately(); }); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | ItemType = GetItemType(); |
| | | OnCreateGridLineCell(m_ScrollerController); |
| | | |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | {
|
| | | model.AttentionAuctionItemUpdate += AttentionAuctionItemUpdate; |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | {
|
| | | AuctionInquiry.Instance.SendQueryAttentionAuctionItem();//查询拍卖行的关注物品 |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | {
|
| | | model.AttentionAuctionItemUpdate -= AttentionAuctionItemUpdate; |
| | | }
|
| | |
|
| | |
|
| | | #endregion |
| | | private void AttentionAuctionItemUpdate()
|
| | | {
|
| | | OnCreateGridLineCell(m_ScrollerController);
|
| | | //m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
|
| | | } |
| | | private void OnCreateGridLineCell(ScrollerController gridCtrl)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | | auctionItemList = auctionHelpModel.GetAuctionItemList(ItemType);
|
| | | int LINE = Mathf.CeilToInt((float)auctionItemList.Count/4);
|
| | | for (int i = 0; i < LINE; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | | gridCtrl.Restart();
|
| | | } |
| | | private void OnRefreshGridCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | int gridlineIndex = cell.index;
|
| | | int childCode = 0;
|
| | | for (childCode = 0; childCode < cell.transform.childCount; childCode++)
|
| | | {
|
| | | GameObject obj = cell.transform.GetChild(childCode).gameObject;
|
| | | int cellCount = (cell.transform.childCount) * gridlineIndex + (childCode + 1);
|
| | | if (cellCount - 1 < auctionItemList.Count)
|
| | | {
|
| | | var auctionItem = auctionItemList[(cellCount - 1)];
|
| | | obj.SetActive(true);
|
| | | ItemCell itemCell = obj.transform.Find("ItemCell1").GetComponent<ItemCell>();
|
| | | Text textName = obj.transform.Find("NameText").GetComponent<Text>();
|
| | | Button attentionBtn = obj.transform.Find("AttentionBtn").GetComponent<Button>();
|
| | | Button unsubscribeBtn = obj.transform.Find("UnsubscribeBtn").GetComponent<Button>();
|
| | | GameObject attentionImage = obj.transform.Find("AttentionImage").gameObject;
|
| | | var itemConfig = ItemConfig.Get(auctionItem.ItemID);
|
| | | if (itemConfig == null)
|
| | | {
|
| | | DebugEx.LogError("物品表没有找到该物品,物品ID为" + auctionItem.ItemID);
|
| | | return;
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, true, (ulong)1, itemConfig.BindType);
|
| | | itemCell.Init(cellModel);
|
| | | textName.text = itemConfig.ItemName;
|
| | | if (model.AttentionAuctionItemIDdic.ContainsKey(auctionItem.ItemID))
|
| | | {
|
| | | attentionImage.SetActive(true);
|
| | | unsubscribeBtn.gameObject.SetActive(true);
|
| | | attentionBtn.gameObject.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | attentionImage.SetActive(false);
|
| | | unsubscribeBtn.gameObject.SetActive(false);
|
| | | attentionBtn.gameObject.SetActive(true);
|
| | | }
|
| | | attentionBtn.SetListener(()=> |
| | | {
|
| | | DebugEx.Log("关注物品ID"+ itemConfig.ID);
|
| | | AuctionInquiry.Instance.SendAttentionAuctionItemChange(itemConfig.ID,1);
|
| | | });
|
| | | unsubscribeBtn.SetListener(()=> |
| | | {
|
| | | DebugEx.Log("取消关注物品ID" + itemConfig.ID);
|
| | | AuctionInquiry.Instance.SendAttentionAuctionItemChange(itemConfig.ID, 0);
|
| | | });
|
| | | }
|
| | | else
|
| | | {
|
| | | obj.SetActive(false);
|
| | | }
|
| | | }
|
| | | }
|
| | | private void OnClickToggleMaterial(bool isOn)
|
| | | {
|
| | | if (isOn)
|
| | | {
|
| | | ItemType = GetItemType();
|
| | | OnCreateGridLineCell(m_ScrollerController);
|
| | | }
|
| | | } |
| | | |
| | | private void OnClickToggleMountAndPet(bool isOn)
|
| | | {
|
| | | if (isOn)
|
| | | {
|
| | | ItemType = GetItemType();
|
| | | OnCreateGridLineCell(m_ScrollerController);
|
| | | }
|
| | | } |
| | | |
| | | private void OnClickToggleEquipment(bool isOn)
|
| | | {
|
| | | if (isOn)
|
| | | {
|
| | | ItemType = GetItemType();
|
| | | OnCreateGridLineCell(m_ScrollerController);
|
| | | }
|
| | | } |
| | | |
| | | private int GetItemType()
|
| | | {
|
| | | int type = 1;
|
| | | if (m_MaterialToggle.isOn)
|
| | | {
|
| | | type = (int)AttentionType.Material;
|
| | | }
|
| | | else if (m_MountAndPetToggle.isOn)
|
| | | {
|
| | | type = (int)AttentionType.MountAndPet;
|
| | | }
|
| | | else if (m_EquipmentToggle.isOn)
|
| | | {
|
| | | type = (int)AttentionType.Equipment;
|
| | | }
|
| | | return type;
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 847ba8f398f23d24f8e8bcdb96fee29d |
| | | timeCreated: 1551431434 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, February 28, 2019 |
| | | //-------------------------------------------------------- |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using Snxxz.UI;
|
| | | using System.Linq; |
| | | |
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.LuaCallCSharp] |
| | | public class AuctionConfigClass
|
| | | {
|
| | | public int JobEntry;//选择职业条目
|
| | | public int TypeEntry;//类型条目
|
| | | public bool JobTipBool;//选择职业条目是否显示
|
| | | public bool TypeTipBool;//类型条目是否显示
|
| | | public AuctionConfig Config;
|
| | | } |
| | | public class AuctionHelpModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | public List<AuctionConfig> FullServiceAuctionList = new List<AuctionConfig>();//全服拍卖列表
|
| | | public Dictionary<int, AuctionConfigClass> FullServiceAuctionDic = new Dictionary<int, AuctionConfigClass>();//全服拍卖选择记录
|
| | | public List<AuctionItemConfig> AuctionItemList = new List<AuctionItemConfig>();//拍卖物品表
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | |
| | | public int AuctionTaxrate1 = 0;//全服拍品税率
|
| | | public int AuctionTaxrate2 = 0;//仙盟拍品税率
|
| | | public int AuctionTaxrate3 = 0;//仙盟拍品个人税率
|
| | | private int selectedGenreNow = 0;
|
| | | public int SelectedGenreNow//当前选择的页签
|
| | | {
|
| | | get { return selectedGenreNow; }
|
| | | set { selectedGenreNow = value; }
|
| | | }
|
| | | private ItemModel itemModel;//当前选择想要上架的物品
|
| | | public ItemModel ItemModel
|
| | | {
|
| | | get { return itemModel; }
|
| | | set { itemModel = value; }
|
| | | }
|
| | | private bool wait = true;
|
| | | public bool Wait
|
| | | {
|
| | | get { return wait; }
|
| | | set { wait = value; }
|
| | | }
|
| | | public override void Init()
|
| | | {
|
| | | var AuctionTaxrateConfig = FuncConfigConfig.Get("AuctionTaxrate");
|
| | | AuctionTaxrate1 = int.Parse(AuctionTaxrateConfig.Numerical1);
|
| | | AuctionTaxrate2 = int.Parse(AuctionTaxrateConfig.Numerical2);
|
| | | AuctionTaxrate3 = int.Parse(AuctionTaxrateConfig.Numerical3);
|
| | | GetAuctionList();
|
| | | AuctionItemList = AuctionItemConfig.GetValues();
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | | GlobalTimeEvent.Instance.secondEvent -= secondEvent;
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | | wait = true;
|
| | | GlobalTimeEvent.Instance.secondEvent += secondEvent;
|
| | | }
|
| | |
|
| | |
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | private void secondEvent()
|
| | | {
|
| | | if (!wait)
|
| | | {
|
| | | wait = true;
|
| | | }
|
| | | }
|
| | |
|
| | | private void GetAuctionList()//全服获取拍卖列表
|
| | | {
|
| | | FullServiceAuctionDic.Clear();
|
| | | var config = AuctionConfig.GetValues();
|
| | | foreach (var value in config)
|
| | | {
|
| | | FullServiceAuctionList.Add(value);
|
| | | if (!FullServiceAuctionDic.ContainsKey(value.Id))
|
| | | {
|
| | | AuctionConfigClass AuctionConfig = new AuctionConfigClass();
|
| | | AuctionConfig.JobEntry = 0;
|
| | | AuctionConfig.TypeEntry = 0;
|
| | | AuctionConfig.JobTipBool = value.ChooseItem1 != null && value.ChooseItem1.Length > 0;
|
| | | AuctionConfig.TypeTipBool = value.ChooseItem2 != null && value.ChooseItem2.Length > 0;
|
| | | AuctionConfig.Config = value;
|
| | | FullServiceAuctionDic.Add(value.Id, AuctionConfig);
|
| | | }
|
| | | }
|
| | |
|
| | | } |
| | |
|
| | | public List<AuctionItemConfig> GetAuctionItemList(int index)//获取关注列表
|
| | | {
|
| | | List<AuctionItemConfig> auctionItemList = new List<AuctionItemConfig>();
|
| | | for (int i = 0; i < AuctionItemList.Count; i++)
|
| | | {
|
| | | var auctionItem = AuctionItemList[i];
|
| | | if (auctionItem.ItemType == index)
|
| | | {
|
| | | auctionItemList.Add(auctionItem);
|
| | | }
|
| | | }
|
| | | auctionItemList.Sort(Compare);
|
| | | return auctionItemList;
|
| | | }
|
| | |
|
| | | int Compare(AuctionItemConfig x, AuctionItemConfig y)//数组排列
|
| | | {
|
| | | bool havex = IsConcernedAbout(x.ItemID);
|
| | | bool havey = IsConcernedAbout(y.ItemID);
|
| | | if (havex.CompareTo(havey) != 0)
|
| | | {
|
| | | return -havex.CompareTo(havey);
|
| | | }
|
| | | if (x.Sortpriority.CompareTo(y.Sortpriority) != 0)
|
| | | {
|
| | | return x.Sortpriority.CompareTo(y.Sortpriority);
|
| | | }
|
| | | return 1;
|
| | | }
|
| | |
|
| | | private bool IsConcernedAbout(int itemID)
|
| | | {
|
| | | bool isBool = false;
|
| | | if (model.AttentionAuctionItemIDdic.ContainsKey(itemID))
|
| | | {
|
| | | isBool = true;
|
| | | }
|
| | | return isBool;
|
| | | }
|
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 3619f1a0ce5a36c42bdf2a7d5c21976d |
| | | timeCreated: 1551334560 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Wednesday, February 27, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | |
| | | public class AuctionHouseWin : Window |
| | | { |
| | | |
| | | #region Built-in |
| | | [SerializeField] FunctionButtonGroup m_FuncBtnGroup;
|
| | | [SerializeField] Button m_CloseBtn;
|
| | | [SerializeField] Button m_LeftBtn;
|
| | | [SerializeField] Button m_RightBtn;
|
| | | [SerializeField] FunctionButton m_FullServiceAuctionWin;//全服拍卖 |
| | | [SerializeField] FunctionButton m_FamilyAuctionWin;//仙盟拍卖 |
| | | [SerializeField] FunctionButton m_MyAuction;//我的拍卖 |
| | | [SerializeField] FunctionButton m_MyFocus;//我的关注 |
| | | [SerializeField] Button m_AttentionButton;//我的关注商品 |
| | | [SerializeField] Button m_TransactionRecordButton;//成交记录 |
| | | [SerializeField] Text m_MoneyText; |
| | | protected override void BindController() |
| | | {
|
| | | AuctionInquiry.Instance.SendQueryAttentionAuctionItem();//查询拍卖行的关注物品 |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | {
|
| | | m_CloseBtn.AddListener(OnClickClose);
|
| | | m_LeftBtn.AddListener(OnClickLeftBtn);
|
| | | m_RightBtn.AddListener(OnClickRight); |
| | | m_FullServiceAuctionWin.AddListener(OnClickFullServiceAuction); |
| | | m_FamilyAuctionWin.AddListener(OnClickFamilyAuction);
|
| | | m_MyAuction.AddListener(OnClickMyAuction);
|
| | | m_MyFocus.AddListener(OnClickMyFocus); |
| | | |
| | | m_AttentionButton.AddListener(OnClickAttentionButton); |
| | | m_TransactionRecordButton.AddListener(OnClickTransactionRecordButton); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | m_MoneyText.text = UIHelper.GetMoneyCnt(1).ToString(); |
| | | }
|
| | | protected override void OnActived()
|
| | | {
|
| | | OnClickFullServiceAuction();
|
| | | m_FuncBtnGroup.TriggerByOrder(functionOrder);
|
| | | } |
| | | protected override void OnAfterOpen() |
| | | {
|
| | | PlayerDatas.Instance.playerDataRefreshEvent += Updatefighting; |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | CloseChild();
|
| | | if (!WindowCenter.Instance.IsOpen<MainInterfaceWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<MainInterfaceWin>();
|
| | | } |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | {
|
| | | PlayerDatas.Instance.playerDataRefreshEvent -= Updatefighting; |
| | | }
|
| | |
|
| | |
|
| | | #endregion |
| | | private void Updatefighting(PlayerDataType info)
|
| | | {
|
| | | if (info == PlayerDataType.Gold)
|
| | | {
|
| | | m_MoneyText.text = UIHelper.GetMoneyCnt(1).ToString();
|
| | | }
|
| | | } |
| | | private void OnClickClose()
|
| | | {
|
| | | CloseImmediately();
|
| | | } |
| | | private void OnClickLeftBtn()
|
| | | {
|
| | | m_FuncBtnGroup.TriggerLast();
|
| | | } |
| | | |
| | | private void OnClickRight()
|
| | | {
|
| | | m_FuncBtnGroup.TriggerNext();
|
| | | } |
| | | |
| | | private void OnClickFullServiceAuction()
|
| | | {
|
| | | CloseChild();
|
| | | WindowCenter.Instance.Open<FullServiceAuctionWin>(true);
|
| | | functionOrder = m_FullServiceAuctionWin.order;
|
| | | } |
| | | |
| | | private void OnClickFamilyAuction()
|
| | | {
|
| | | CloseChild();
|
| | | WindowCenter.Instance.Open<FamilyAuctionWin>(true);
|
| | | functionOrder = m_FamilyAuctionWin.order;
|
| | | }
|
| | |
|
| | | private void OnClickMyAuction()
|
| | | {
|
| | | CloseChild();
|
| | | WindowCenter.Instance.Open<MyAuctionWin>(true);
|
| | | functionOrder = m_MyAuction.order;
|
| | | }
|
| | | private void OnClickMyFocus()
|
| | | {
|
| | | CloseChild();
|
| | | WindowCenter.Instance.Open<MyFocusWin>(true);
|
| | | functionOrder = m_MyFocus.order;
|
| | | }
|
| | |
|
| | | private void OnClickAttentionButton()
|
| | | {
|
| | | WindowCenter.Instance.Open<AttentionWin>();
|
| | | }
|
| | |
|
| | | private void OnClickTransactionRecordButton()
|
| | | {
|
| | | WindowCenter.Instance.Open<TransactionRecordWin>();
|
| | | }
|
| | | |
| | | private void CloseChild()
|
| | | {
|
| | | var children = WindowConfig.Get().FindChildWindows("AuctionHouseWin");
|
| | | foreach (var window in children)
|
| | | {
|
| | | WindowCenter.Instance.Close(window);
|
| | | } |
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 04c36469a782f8547a14bccce2739164 |
| | | timeCreated: 1551254889 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, February 25, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using System.Collections.Generic;
|
| | | //拍卖查询
|
| | | namespace Snxxz.UI
|
| | | {
|
| | | [XLua.Hotfix] |
| | | public class QueryAuctionItem
|
| | | {
|
| | | public int Job;//职业,0为不限制
|
| | | public List<uint> ItemTypeList;//指定的物品类型
|
| | | public int ClassLV;//过滤阶数,0为不限制
|
| | | public List<uint> SpecItemIDList;//指定物品ID
|
| | | public string FromItemGUID;//从哪个物品开始查询
|
| | | public int QueryDir;//查询方向,1-往后查,2-往前查
|
| | | public int QueryCount;//查询个数,0为全部
|
| | |
|
| | | } |
| | | |
| | | public class AuctionInquiry : Singleton<AuctionInquiry>
|
| | | {
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } }
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } } |
| | | public int GetSendNumber()
|
| | | {
|
| | | var sendNumber = 0;
|
| | | var index = auctionHelpModel.SelectedGenreNow;
|
| | | if (!auctionHelpModel.FullServiceAuctionDic.ContainsKey(index))
|
| | | {
|
| | | DebugEx.LogError("---没有找到该索引下标的数据");
|
| | | return sendNumber;
|
| | | }
|
| | | var fullServiceAuction = auctionHelpModel.FullServiceAuctionDic[index];
|
| | | |
| | | sendNumber += fullServiceAuction.Config.TypeId;
|
| | | if (fullServiceAuction.JobTipBool)
|
| | | {
|
| | | sendNumber += fullServiceAuction.Config.ChooseItem1[fullServiceAuction.JobEntry];
|
| | | }
|
| | | if (fullServiceAuction.TypeTipBool)
|
| | | {
|
| | | sendNumber += fullServiceAuction.Config.ChooseItem2[fullServiceAuction.TypeEntry];
|
| | | }
|
| | | // DebugEx.Log(sendNumber + "查询类型");
|
| | | return sendNumber;
|
| | | } |
| | | public void SendQueryAuction(string itemGUID,int indexId,int queryDir, int queryCount=10)//拍卖行查询拍卖中的物品(物品GUID,查询方向,查询个数)
|
| | | {
|
| | | var auctionIndex = AuctionIndexConfig.Get(indexId);
|
| | | if (auctionIndex == null)
|
| | | {
|
| | | DebugEx.LogError("拍卖索引表没有查到对应的ID"+ indexId);
|
| | | return;
|
| | | }
|
| | | QueryAuctionItem queryAuctionItem = new QueryAuctionItem();
|
| | | queryAuctionItem.FromItemGUID = itemGUID;
|
| | | queryAuctionItem.Job = auctionIndex.Job;
|
| | | queryAuctionItem.ItemTypeList = new List<uint>();
|
| | | if (auctionIndex.ItemType != null && auctionIndex.ItemType.Length > 0)
|
| | | {
|
| | | for (int i = 0; i < auctionIndex.ItemType.Length; i++)
|
| | | {
|
| | | queryAuctionItem.ItemTypeList.Add((uint)auctionIndex.ItemType[i]);
|
| | | }
|
| | | }
|
| | | queryAuctionItem.ClassLV = auctionIndex.Order;
|
| | | queryAuctionItem.SpecItemIDList = new List<uint>();
|
| | | if (auctionIndex.SpecItemID != null && auctionIndex.SpecItemID.Length > 0)
|
| | | {
|
| | | for (int i = 0; i < auctionIndex.SpecItemID.Length; i++)
|
| | | {
|
| | | queryAuctionItem.SpecItemIDList.Add((uint)auctionIndex.SpecItemID[i]);
|
| | | }
|
| | | }
|
| | | queryAuctionItem.QueryDir = queryDir;
|
| | | queryAuctionItem.QueryCount = queryCount;
|
| | | SendQueryAuctionItem(queryAuctionItem);
|
| | | } |
| | | private void SendQueryAuctionItem(QueryAuctionItem queryAuctionItem)//拍卖行查询拍卖中的物品
|
| | | {
|
| | | CB510_tagCGQueryAuctionItem cb510 = new CB510_tagCGQueryAuctionItem();
|
| | | cb510.Job = (byte)queryAuctionItem.Job;
|
| | | cb510.ItemTypeCount = (byte)queryAuctionItem.ItemTypeList.Count;
|
| | | cb510.ItemTypeList = queryAuctionItem.ItemTypeList.ToArray();
|
| | | cb510.ClassLV = (byte)queryAuctionItem.ClassLV;
|
| | | cb510.SpecItemIDCount = (byte)queryAuctionItem.SpecItemIDList.Count;
|
| | | cb510.SpecItemIDList = queryAuctionItem.SpecItemIDList.ToArray();
|
| | | cb510.FromItemGUID = queryAuctionItem.FromItemGUID;
|
| | | cb510.QueryDir = (byte)queryAuctionItem.QueryDir;
|
| | | cb510.QueryCount = (byte)queryAuctionItem.QueryCount;
|
| | | GameNetSystem.Instance.SendInfo(cb510);
|
| | | } |
| | | |
| | | public void SendQueryPlayerAuctionItem()// 拍卖行查询个人拍卖中的物品
|
| | | {
|
| | | CB511_tagCGQueryPlayerAuctionItem cb511 = new CB511_tagCGQueryPlayerAuctionItem();
|
| | | GameNetSystem.Instance.SendInfo(cb511);
|
| | | } |
| | | |
| | | public void SendQueryAuctionRecord(int recordType)//拍卖行查询拍卖记录(0-我的拍品记录 1-仙盟拍品记录 2-我的竞拍记录)
|
| | | {
|
| | | CB512_tagCGQueryAuctionRecord cb512 = new CB512_tagCGQueryAuctionRecord();
|
| | | cb512.RecordType = (byte)recordType;
|
| | | GameNetSystem.Instance.SendInfo(cb512);
|
| | | }
|
| | | |
| | | public void SendQueryFamilyAuctionItem()//拍卖行查询仙盟拍卖中的拍品
|
| | | {
|
| | | CB515_tagCGQueryFamilyAuctionItem cb515 = new CB515_tagCGQueryFamilyAuctionItem();
|
| | | GameNetSystem.Instance.SendInfo(cb515);
|
| | | }
|
| | |
|
| | | public void SendQueryAttentionAuctionItem()//拍卖行查询关注中的拍品
|
| | | {
|
| | | CB516_tagCGQueryAttentionAuctionItem cb516 = new CB516_tagCGQueryAttentionAuctionItem();
|
| | | GameNetSystem.Instance.SendInfo(cb516);
|
| | | }
|
| | | public void SendQueryTagAuctionItem()//拍卖行查询定位目标拍品
|
| | | {
|
| | | CB517_tagCGQueryTagAuctionItem cb517 = new CB517_tagCGQueryTagAuctionItem();
|
| | | GameNetSystem.Instance.SendInfo(cb517);
|
| | | } |
| | | |
| | | public void SendSellAuctionItem(int itemIndex)//拍卖行上架拍品
|
| | | {
|
| | | CB513_tagCMSellAuctionItem cb513 = new CB513_tagCMSellAuctionItem();
|
| | | cb513.ItemIndex = (byte)itemIndex;
|
| | | GameNetSystem.Instance.SendInfo(cb513);
|
| | | } |
| | | |
| | | public void SendSellAuctionItem(string itemGUID, int biddingPrice)//拍卖行竞价物品
|
| | | {
|
| | | CB514_tagCMBiddingAuctionItem cb514 = new CB514_tagCMBiddingAuctionItem();
|
| | | cb514.ItemGUID = itemGUID;
|
| | | cb514.BiddingPrice = (ushort)biddingPrice;
|
| | | GameNetSystem.Instance.SendInfo(cb514);
|
| | | } |
| | | |
| | | public void SendAttentionAuctionItemChange(int itemID,int isAttention)//拍卖行修改关注物品(取消关注发0)
|
| | | {
|
| | | CB518_tagCGAttentionAuctionItemChange cb518 = new CB518_tagCGAttentionAuctionItemChange();
|
| | | cb518.ItemID = (uint)itemID;
|
| | | cb518.IsAttention = (byte)isAttention;
|
| | | GameNetSystem.Instance.SendInfo(cb518);
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 0259f061e496f3c4e9c36cf7777eb81c |
| | | timeCreated: 1551065337 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, February 25, 2019 |
| | | //-------------------------------------------------------- |
| | | using System;
|
| | | using System.Collections.Generic;
|
| | | using Snxxz.UI;
|
| | | using System.Linq; |
| | | |
| | | |
| | | namespace Snxxz.UI
|
| | | { |
| | | [XLua.LuaCallCSharp] |
| | | public class AuctionItemClass
|
| | | {
|
| | | public string ItemGUID;//物品GUID
|
| | | public int FamilyID; //有值时为仙盟拍品
|
| | | public int ItemID;//物品ID
|
| | | public int ItemCount;
|
| | | public string TimeStr;//上架时间 yyyy-MM-dd hh:mm:ss
|
| | | public DateTime Time;
|
| | | public int BidderPrice;//竞拍玩家出价
|
| | | public string UserData;//自定义数据
|
| | | public string FamilyPlayerIDInfo;//可获得收益的仙盟玩家ID信息
|
| | | public List<int> FamilyPlayerIDList;//可获得收益的仙盟玩家ID信息存储
|
| | | public int AuctionType;//拍品类型,0-全服拍品,1-仙盟拍品
|
| | |
|
| | | public int RecordType;//记录类型 0-我的拍品记录 1-仙盟拍品记录 2-我的竞拍记录
|
| | | public int RecordResult;//记录结果 0-流拍 1-拍卖成交 2-回收 3-竞价成功 4-竞价失败
|
| | | public string BidderName;//成交玩家名
|
| | |
|
| | | public int BidderID;//竞拍玩家ID,也就是当前最高竞价玩家ID
|
| | | } |
| | | |
| | | public class AddAuctionItemInfoClass
|
| | | {
|
| | | public string ItemGUID;//物品GUID
|
| | | public int ItemID;//物品ID
|
| | | public bool Bool;
|
| | | } |
| | | public class QueryRemainingClass
|
| | | {
|
| | | public bool UpBool;
|
| | | public bool DownBool;
|
| | | } |
| | | public class AuctionInquiryModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
|
| | | {
|
| | | public Dictionary<string, AuctionItemClass> PlayerAuctionItemInfoDic = new Dictionary<string, AuctionItemClass>();//自身玩家上架的拍品
|
| | | public event Action PlayerAuctionItem;
|
| | |
|
| | | public List<AuctionItemClass> FullServiceAuctionList = new List<AuctionItemClass>();//全服拍品列表
|
| | | public event Action FullServiceAuctionUpdate;//全服拍品数据请求
|
| | |
|
| | | public Dictionary<string, AuctionItemClass> FamilyAuctionItemDic = new Dictionary<string, AuctionItemClass>();// 拍卖行仙盟拍卖中的物品信息
|
| | |
|
| | |
|
| | | public Dictionary<string, AuctionItemClass> PlayerAuctionRecordDic = new Dictionary<string, AuctionItemClass>();//拍卖行玩家拍卖记录
|
| | |
|
| | |
|
| | | public Dictionary<int, AddAuctionItemInfoClass> AddAuctionItemInfoDic = new Dictionary<int, AddAuctionItemInfoClass>();//关注的拍品的上架提醒(弹框显示)
|
| | | public event Action AddAuctionItemInfoUpdate;
|
| | |
|
| | | public Dictionary<string, AuctionItemClass> BiddingItemInfoDic = new Dictionary<string, AuctionItemClass>();//拍卖行玩家竞价中的物品信息 |
| | |
|
| | | public Dictionary<string, AuctionItemClass> AttentionAuctionItemDic = new Dictionary<string, AuctionItemClass>();//拍卖行关注中的拍品详情
|
| | |
|
| | | public Dictionary<int, int> AttentionAuctionItemIDdic = new Dictionary<int, int>();//关注的物品ID
|
| | |
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } }
|
| | | public QueryRemainingClass QueryRemaining = new QueryRemainingClass();
|
| | | public override void Init()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | public void OnBeforePlayerDataInitialize()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | public void OnPlayerLoginOk()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | public override void UnInit()
|
| | | {
|
| | |
|
| | | }
|
| | |
|
| | | public void AuctionItemInfo(HB501_tagGCAuctionItemInfo info)// 拍卖行拍卖中的物品信息
|
| | | {
|
| | | List<AuctionItemClass> fullServiceAuctionList = new List<AuctionItemClass>();
|
| | | for (int i = 0; i < info.AuctionItemCount; i++)
|
| | | {
|
| | | var PlayerAuctionItem = info.AuctionItemList[i];
|
| | | AuctionItemClass playerAuctionItemClass = new AuctionItemClass();
|
| | | playerAuctionItemClass.ItemGUID = PlayerAuctionItem.ItemGUID;
|
| | | playerAuctionItemClass.FamilyID = (int)PlayerAuctionItem.FamilyID;
|
| | | playerAuctionItemClass.ItemID = (int)PlayerAuctionItem.ItemID;
|
| | | playerAuctionItemClass.ItemCount = (int)PlayerAuctionItem.ItemCount;
|
| | | playerAuctionItemClass.TimeStr = PlayerAuctionItem.AddTime;
|
| | | playerAuctionItemClass.Time = DateTime.Parse(PlayerAuctionItem.AddTime);
|
| | | playerAuctionItemClass.BidderPrice = PlayerAuctionItem.BidderPrice;
|
| | | playerAuctionItemClass.UserData = PlayerAuctionItem.UserData;
|
| | | var index = FullServiceAuctionList.FindIndex((x) => { return x.ItemGUID == PlayerAuctionItem.ItemGUID; });
|
| | | if (index == -1)
|
| | | {
|
| | | fullServiceAuctionList.Add(playerAuctionItemClass);
|
| | | }
|
| | | }
|
| | |
|
| | | if (info.QueryDir == 1)//往后查询
|
| | | {
|
| | | QueryRemaining.DownBool = info.QueryRemainlCount != 0;
|
| | | if (FullServiceAuctionList.Count == 0)
|
| | | {
|
| | | FullServiceAuctionList.InsertRange(0, fullServiceAuctionList);
|
| | | }
|
| | | else
|
| | | {
|
| | | FullServiceAuctionList.InsertRange(FullServiceAuctionList.Count - 1, fullServiceAuctionList);
|
| | | }
|
| | | |
| | | }
|
| | | else if (info.QueryDir == 2)//往前查询
|
| | | {
|
| | | QueryRemaining.UpBool = info.QueryRemainlCount != 0;
|
| | | FullServiceAuctionList.InsertRange(0, fullServiceAuctionList);
|
| | | }
|
| | | else if (info.QueryDir == 3)//定位查询
|
| | | {
|
| | | FullServiceAuctionList.InsertRange(FullServiceAuctionList.Count - 1, fullServiceAuctionList);
|
| | | }
|
| | |
|
| | | if (FullServiceAuctionUpdate != null)
|
| | | {
|
| | | FullServiceAuctionUpdate();
|
| | | }
|
| | | }
|
| | |
|
| | | public void PlayerAuctionItemInfo(HB502_tagGCPlayerAuctionItemInfo info)//拍卖行玩家拍卖中的物品信息
|
| | | {
|
| | | for (int i = 0; i < info.AuctionItemCount; i++)
|
| | | {
|
| | | var PlayerAuctionItem = info.AuctionItemList[i];
|
| | | AuctionItemClass playerAuctionItemClass = new AuctionItemClass();
|
| | | playerAuctionItemClass.ItemGUID = PlayerAuctionItem.ItemGUID;
|
| | | playerAuctionItemClass.FamilyID = (int)PlayerAuctionItem.FamilyID;
|
| | | playerAuctionItemClass.ItemID = (int)PlayerAuctionItem.ItemID;
|
| | | playerAuctionItemClass.ItemCount = (int)PlayerAuctionItem.ItemCount;
|
| | | playerAuctionItemClass.TimeStr = PlayerAuctionItem.AddTime;
|
| | | playerAuctionItemClass.Time = DateTime.Parse(PlayerAuctionItem.AddTime);
|
| | | playerAuctionItemClass.BidderPrice = PlayerAuctionItem.BidderPrice;
|
| | | playerAuctionItemClass.UserData = PlayerAuctionItem.UserData;
|
| | | if (PlayerAuctionItemInfoDic.ContainsKey(playerAuctionItemClass.ItemGUID))
|
| | | {
|
| | | PlayerAuctionItemInfoDic[playerAuctionItemClass.ItemGUID] = playerAuctionItemClass;
|
| | | }
|
| | | else
|
| | | {
|
| | | PlayerAuctionItemInfoDic.Add(playerAuctionItemClass.ItemGUID, playerAuctionItemClass);
|
| | | }
|
| | | }
|
| | | if (PlayerAuctionItem != null)
|
| | | {
|
| | | PlayerAuctionItem();
|
| | | }
|
| | | }
|
| | |
|
| | | public event Action PlayerAuctionRecordUpdate;//拍卖记录新增拍卖记录
|
| | | public void PlayerAuctionRecord(HB503_tagGCPlayerAuctionRecordInfo info)//拍卖行玩家拍卖记录
|
| | | {
|
| | | for (int i = 0; i < info.Count; i++)
|
| | | {
|
| | | var PlayerAuctionRecord = info.AuctionRecordList[i];
|
| | | AuctionItemClass playerAuctionRecordClass = new AuctionItemClass();
|
| | | playerAuctionRecordClass.ItemGUID = PlayerAuctionRecord.ItemGUID;
|
| | | playerAuctionRecordClass.FamilyID = (int)PlayerAuctionRecord.FamilyID;
|
| | | playerAuctionRecordClass.TimeStr = PlayerAuctionRecord.RecordTime;//记录时间
|
| | | playerAuctionRecordClass.Time = DateTime.Parse(PlayerAuctionRecord.RecordTime);
|
| | | playerAuctionRecordClass.RecordType = PlayerAuctionRecord.RecordType;//记录类型 0-我的拍品记录 1-仙盟拍品记录 2-我的竞拍记录
|
| | | playerAuctionRecordClass.RecordResult = PlayerAuctionRecord.RecordResult;//记录结果 0-流拍 1-拍卖成交 2-回收 3-竞价成功 4-竞价失败
|
| | | playerAuctionRecordClass.BidderPrice = (int)PlayerAuctionRecord.BidderPrice;//成交价格
|
| | | playerAuctionRecordClass.BidderName = PlayerAuctionRecord.BidderName;//玩家名
|
| | | playerAuctionRecordClass.ItemID = (int)PlayerAuctionRecord.ItemID;
|
| | | playerAuctionRecordClass.ItemCount = (int)PlayerAuctionRecord.ItemCount;
|
| | | playerAuctionRecordClass.UserData = PlayerAuctionRecord.UserData;
|
| | | if (PlayerAuctionRecordDic.ContainsKey(playerAuctionRecordClass.ItemGUID))
|
| | | {
|
| | | PlayerAuctionRecordDic[playerAuctionRecordClass.ItemGUID] = playerAuctionRecordClass;
|
| | | }
|
| | | else
|
| | | {
|
| | | PlayerAuctionRecordDic.Add(playerAuctionRecordClass.ItemGUID, playerAuctionRecordClass);
|
| | | }
|
| | | }
|
| | | if (PlayerAuctionRecordUpdate != null)
|
| | | {
|
| | | PlayerAuctionRecordUpdate();
|
| | | }
|
| | | }
|
| | |
|
| | | public void AddAuctionItemInfo(HB504_tagGCAddAuctionItemInfo info)//拍卖行新上架拍品(玩家有关注的拍品 )
|
| | | {
|
| | | for (int i = 0; i < info.AddCount; i++)
|
| | | {
|
| | | var AddAuctionItem = info.AddAuctionItemList[i];
|
| | | AddAuctionItemInfoClass addAuctionItemInfo = new AddAuctionItemInfoClass();
|
| | | addAuctionItemInfo.ItemGUID = AddAuctionItem.ItemGUID;
|
| | | addAuctionItemInfo.ItemID = (int)AddAuctionItem.ItemID;
|
| | | addAuctionItemInfo.Bool = true;
|
| | | if (AddAuctionItemInfoDic.ContainsKey(addAuctionItemInfo.ItemID))
|
| | | {
|
| | | AddAuctionItemInfoDic[addAuctionItemInfo.ItemID] = addAuctionItemInfo;
|
| | | }
|
| | | else
|
| | | {
|
| | | AddAuctionItemInfoDic.Add(addAuctionItemInfo.ItemID, addAuctionItemInfo);
|
| | | }
|
| | | }
|
| | | if (AddAuctionItemInfoUpdate != null)
|
| | | {
|
| | | AddAuctionItemInfoUpdate();
|
| | | }
|
| | | }
|
| | |
|
| | | public event Action FamilyAuctionItemUpdate;//仙盟拍卖的物品添加刷新
|
| | | public void FamilyAuctionItemInfo(HB505_tagGCFamilyAuctionItemInfo info)//拍卖行仙盟拍卖中的物品信息(上线同步,刷新同步)
|
| | | {
|
| | | for (int i = 0; i < info.AuctionItemCount; i++)
|
| | | {
|
| | | var FamilyAuctionItem = info.AuctionItemList[i];
|
| | | AuctionItemClass familyAuctionItemClass = new AuctionItemClass();
|
| | | familyAuctionItemClass.ItemGUID = FamilyAuctionItem.ItemGUID;
|
| | | familyAuctionItemClass.FamilyID = (int)FamilyAuctionItem.FamilyID;
|
| | | familyAuctionItemClass.ItemID = (int)FamilyAuctionItem.ItemID;
|
| | | familyAuctionItemClass.ItemCount = (int)FamilyAuctionItem.ItemCount;
|
| | | familyAuctionItemClass.TimeStr = FamilyAuctionItem.AddTime;
|
| | | familyAuctionItemClass.Time = DateTime.Parse(FamilyAuctionItem.AddTime);
|
| | | familyAuctionItemClass.BidderPrice = FamilyAuctionItem.BidderPrice;
|
| | | familyAuctionItemClass.UserData = FamilyAuctionItem.UserData;
|
| | | familyAuctionItemClass.FamilyPlayerIDInfo = FamilyAuctionItem.FamilyPlayerIDInfo;
|
| | | familyAuctionItemClass.FamilyPlayerIDList = new List<int>();
|
| | | familyAuctionItemClass.FamilyPlayerIDList = GetFamilyPlayerIDList(FamilyAuctionItem.FamilyPlayerIDInfo);
|
| | | familyAuctionItemClass.AuctionType = FamilyAuctionItem.AuctionType;
|
| | | if (FamilyAuctionItemDic.ContainsKey(familyAuctionItemClass.ItemGUID))
|
| | | {
|
| | | FamilyAuctionItemDic[familyAuctionItemClass.ItemGUID] = familyAuctionItemClass;
|
| | | }
|
| | | else
|
| | | {
|
| | | FamilyAuctionItemDic.Add(familyAuctionItemClass.ItemGUID, familyAuctionItemClass);
|
| | | }
|
| | | }
|
| | | if (FamilyAuctionItemUpdate != null)
|
| | | {
|
| | | FamilyAuctionItemUpdate();
|
| | | }
|
| | | }
|
| | |
|
| | | private List<int> GetFamilyPlayerIDList(string familyPlayerIdStr)
|
| | | {
|
| | | List<int> list = new List<int>();
|
| | | var jsonData = LitJson.JsonMapper.ToObject<int[]>(familyPlayerIdStr);
|
| | | for (int i = 0; i < jsonData.Length; i++)
|
| | | {
|
| | | list.Add(jsonData[i]);
|
| | | }
|
| | | return list;
|
| | | }
|
| | |
|
| | | public event Action AttentionAuctionItemUdate;//拍卖行关注中的拍品信息变更(信息每次重置)
|
| | | public void AttentionAuctionItemInfo(HB506_tagGCAttentionAuctionItemInfo info)//拍卖行关注中的拍品信息
|
| | | {
|
| | | AttentionAuctionItemDic.Clear();
|
| | | for (int i = 0; i < info.AuctionItemCount; i++)
|
| | | {
|
| | | var AttentionAuctionItem = info.AuctionItemList[i];
|
| | | AuctionItemClass playerAuctionItemClass = new AuctionItemClass();
|
| | | playerAuctionItemClass.ItemGUID = AttentionAuctionItem.ItemGUID;
|
| | | playerAuctionItemClass.FamilyID = (int)AttentionAuctionItem.FamilyID;
|
| | | playerAuctionItemClass.ItemID = (int)AttentionAuctionItem.ItemID;
|
| | | playerAuctionItemClass.ItemCount = (int)AttentionAuctionItem.ItemCount;
|
| | | playerAuctionItemClass.TimeStr = AttentionAuctionItem.AddTime;
|
| | | playerAuctionItemClass.Time = DateTime.Parse(AttentionAuctionItem.AddTime);
|
| | | playerAuctionItemClass.BidderPrice = AttentionAuctionItem.BidderPrice;
|
| | | playerAuctionItemClass.UserData = AttentionAuctionItem.UserData;
|
| | | if (AttentionAuctionItemDic.ContainsKey(playerAuctionItemClass.ItemGUID))
|
| | | {
|
| | | AttentionAuctionItemDic[playerAuctionItemClass.ItemGUID] = playerAuctionItemClass;
|
| | | }
|
| | | else
|
| | | {
|
| | | AttentionAuctionItemDic.Add(playerAuctionItemClass.ItemGUID, playerAuctionItemClass);
|
| | | }
|
| | | }
|
| | | if (AttentionAuctionItemUdate != null)
|
| | | {
|
| | | AttentionAuctionItemUdate();
|
| | | }
|
| | | }
|
| | |
|
| | | public event Action AttentionAuctionItemUpdate;//关注物品ID刷新
|
| | | public void AttentionAuctionItemID(HB507_tagGCAttentionAuctionItemID info)//关注的物品ID(需要主动查询)
|
| | | {
|
| | | AttentionAuctionItemIDdic.Clear();
|
| | | for (int i = 0; i < info.AttentionCount; i++)
|
| | | {
|
| | | var attentionItemID = (int)info.AttentionItemIDList[i];
|
| | | if (!AttentionAuctionItemIDdic.ContainsKey(attentionItemID))
|
| | | {
|
| | | AttentionAuctionItemIDdic.Add(attentionItemID, 0);
|
| | | }
|
| | | }
|
| | | if (AttentionAuctionItemUpdate != null)
|
| | | {
|
| | | AttentionAuctionItemUpdate();
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | public event Action RefreshAuctionItemUpdate;//拍卖行数据刷新(仅用于数据刷新)
|
| | | public void RefreshAuctionItem(HB508_tagGCRefreshAuctionItemInfo info)//拍卖行刷新拍品(只进行刷新)
|
| | | {
|
| | | for (int i = 0; i < info.RefreshCount; i++)
|
| | | {
|
| | | var RefreshAuctionItem = info.RefreshAuctionItemList[i];
|
| | |
|
| | | if (FamilyAuctionItemDic.ContainsKey(RefreshAuctionItem.ItemGUID))// 拍卖行仙盟拍卖中的物品信息
|
| | | {
|
| | | var FamilyAuctionItem = FamilyAuctionItemDic[RefreshAuctionItem.ItemGUID];
|
| | | if (FamilyAuctionItem.AuctionType == RefreshAuctionItem.AuctionType)
|
| | | {
|
| | | FamilyAuctionItem.TimeStr = RefreshAuctionItem.AddTime;
|
| | | FamilyAuctionItem.Time = DateTime.Parse(RefreshAuctionItem.AddTime);
|
| | | FamilyAuctionItem.BidderID = (int)RefreshAuctionItem.BidderID;
|
| | | FamilyAuctionItem.BidderPrice = (int)RefreshAuctionItem.BidderPrice;
|
| | | FamilyAuctionItemDic[RefreshAuctionItem.ItemGUID] = FamilyAuctionItem;
|
| | | }
|
| | | else
|
| | | {
|
| | | FamilyAuctionItemDic.Remove(RefreshAuctionItem.ItemGUID);
|
| | | if (ClearFamilyAuctionUpdate != null)
|
| | | {
|
| | | ClearFamilyAuctionUpdate();
|
| | | }
|
| | | }
|
| | | }
|
| | | var index = FullServiceAuctionList.FindIndex((x) => { return x.ItemGUID == RefreshAuctionItem.ItemGUID; });
|
| | | if (index != -1)//全服拍品
|
| | | {
|
| | | FullServiceAuctionList[index].TimeStr = RefreshAuctionItem.AddTime;
|
| | | FullServiceAuctionList[index].Time = DateTime.Parse(RefreshAuctionItem.AddTime);
|
| | | FullServiceAuctionList[index].BidderID = (int)RefreshAuctionItem.BidderID;
|
| | | FullServiceAuctionList[index].BidderPrice = (int)RefreshAuctionItem.BidderPrice;
|
| | | }
|
| | | if (PlayerAuctionItemInfoDic.ContainsKey(RefreshAuctionItem.ItemGUID))//我的拍品刷新
|
| | | {
|
| | | var PlayerAuctionItemInfo = PlayerAuctionItemInfoDic[RefreshAuctionItem.ItemGUID];
|
| | | PlayerAuctionItemInfo.TimeStr = RefreshAuctionItem.AddTime;
|
| | | PlayerAuctionItemInfo.Time = DateTime.Parse(RefreshAuctionItem.AddTime);
|
| | | PlayerAuctionItemInfo.BidderID = (int)RefreshAuctionItem.BidderID;
|
| | | PlayerAuctionItemInfo.BidderPrice = (int)RefreshAuctionItem.BidderPrice;
|
| | | PlayerAuctionItemInfoDic[RefreshAuctionItem.ItemGUID] = PlayerAuctionItemInfo;
|
| | | }
|
| | | if (RefreshAuctionItemUpdate != null)
|
| | | {
|
| | | RefreshAuctionItemUpdate();
|
| | | }
|
| | | }
|
| | | }
|
| | |
|
| | | public event Action ClearAuctionUpdate;//拍卖行物品清除
|
| | | public event Action ClearFamilyAuctionUpdate;//清除仙盟物品
|
| | | public void ClearAuctionItem(HB509_tagGCClearAuctionItemInfo info)//拍卖行清除拍品 |
| | | {
|
| | | for (int i = 0; i < info.ClearCount; i++)
|
| | | {
|
| | | var ItemGUIDList = info.ClearAuctionItemList[i];
|
| | | if (BiddingItemInfoDic.ContainsKey(ItemGUIDList.ItemGUID))//清除拍卖行玩家参与竞价中的物品信息 |
| | | {
|
| | | BiddingItemInfoDic.Remove(ItemGUIDList.ItemGUID);
|
| | | }
|
| | | if (FamilyAuctionItemDic.ContainsKey(ItemGUIDList.ItemGUID))// 清除拍卖行仙盟拍卖中的物品信息
|
| | | {
|
| | | FamilyAuctionItemDic.Remove(ItemGUIDList.ItemGUID);
|
| | | if (ClearFamilyAuctionUpdate != null)
|
| | | {
|
| | | ClearFamilyAuctionUpdate();
|
| | | }
|
| | | }
|
| | | var index = FullServiceAuctionList.FindIndex((x) => { return x.ItemGUID == ItemGUIDList.ItemGUID; });
|
| | | if (index != -1)//清除全服拍品的某一件物品
|
| | | {
|
| | | FullServiceAuctionList.RemoveAt(index);
|
| | | }
|
| | | if (PlayerAuctionItemInfoDic.ContainsKey(ItemGUIDList.ItemGUID))//我的拍品清除
|
| | | {
|
| | | PlayerAuctionItemInfoDic.Remove(ItemGUIDList.ItemGUID);
|
| | | }
|
| | | }
|
| | | if (ClearAuctionUpdate != null)
|
| | | {
|
| | | ClearAuctionUpdate();
|
| | | }
|
| | | }
|
| | |
|
| | | public event Action BiddingItemInfoUpdate;//卖行玩家竞价中的物品信息刷新
|
| | | public void BiddingItemInfo(HB510_tagGCBiddingItemInfo info)//拍卖行玩家竞价中的物品信息 (每次上线同步一次)
|
| | | {
|
| | | for (int i = 0; i < info.AuctionItemCount; i++)
|
| | | {
|
| | | var BiddingItem = info.AuctionItemList[i];
|
| | | AuctionItemClass BiddingItemClass = new AuctionItemClass();
|
| | | BiddingItemClass.ItemGUID = BiddingItem.ItemGUID;
|
| | | BiddingItemClass.ItemID = (int)BiddingItem.ItemID;
|
| | | BiddingItemClass.ItemCount = BiddingItem.ItemCount;
|
| | | BiddingItemClass.FamilyID = (int)BiddingItem.FamilyID;
|
| | | BiddingItemClass.TimeStr = BiddingItem.AddTime;
|
| | | BiddingItemClass.Time = DateTime.Parse(BiddingItem.AddTime);
|
| | | BiddingItemClass.BidderPrice = BiddingItem.BidderPrice;//竞拍玩家出价
|
| | | BiddingItemClass.BidderID = (int)BiddingItem.BidderID;//竞拍玩家ID,也就是当前最高竞价玩家ID
|
| | | BiddingItemClass.UserData = BiddingItem.UserData;
|
| | | if (BiddingItemInfoDic.ContainsKey(BiddingItemClass.ItemGUID))
|
| | | {
|
| | | BiddingItemInfoDic[BiddingItemClass.ItemGUID] = BiddingItemClass;
|
| | | }
|
| | | else
|
| | | {
|
| | | BiddingItemInfoDic.Add(BiddingItemClass.ItemGUID, BiddingItemClass);
|
| | | }
|
| | | }
|
| | | if (BiddingItemInfoUpdate != null)
|
| | | {
|
| | | BiddingItemInfoUpdate();
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: aea72fc3de60da04ab9ab6aba1750b19 |
| | | timeCreated: 1551082286 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Wednesday, March 06, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | //拍品上架 |
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class AuctionShelfWin : Window |
| | | { |
| | | [SerializeField] ItemCell m_ItemCell; |
| | | [SerializeField] Text m_ItemName; |
| | | [SerializeField] Text m_BasePriceText; |
| | | [SerializeField] Text m_BuyoutPriceText; |
| | | [SerializeField] Button m_CloseBtn; |
| | | [SerializeField] Button m_UseBtn;
|
| | | [SerializeField] Button m_Auction;
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } }
|
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } |
| | | #region Built-in |
| | | protected override void BindController() |
| | | { |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_CloseBtn.AddListener(() => { CloseImmediately(); }); |
| | | m_UseBtn.AddListener(OnClickUseBtn); |
| | | m_Auction.AddListener(OnClickAuction); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | GetItemID(); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | } |
| | | private void OnClickUseBtn()
|
| | | {
|
| | | CloseImmediately();
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, auctionHelpModel.ItemModel.guid, false, true);
|
| | | itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | } |
| | | private void OnClickAuction()
|
| | | {
|
| | | CloseImmediately();
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(auctionHelpModel.ItemModel.itemInfo.index);
|
| | | } |
| | | private void GetItemID( )
|
| | | {
|
| | | if (auctionHelpModel.ItemModel == null) { return; } |
| | | var config = AuctionItemConfig.Get(auctionHelpModel.ItemModel.itemId);
|
| | | ItemCellModel cellModel = new ItemCellModel(auctionHelpModel.ItemModel.itemId, true, (ulong)1,1);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemName.text = auctionHelpModel.ItemModel.config.ItemName;
|
| | | if (config == null) { return; }
|
| | | m_BasePriceText.text = config.BasePrice.ToString();
|
| | | m_BuyoutPriceText.text = config.BuyoutPrice.ToString();
|
| | | } |
| | | #endregion |
| | |
|
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 001037399d32b8e47b509cb6276e0517 |
| | | timeCreated: 1551861786 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, March 01, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class FamilyAuctionWin : Window |
| | | {
|
| | | [SerializeField] ScrollerController m_ScrollerControllerItem;
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } } |
| | | List<AuctionItemClass> FamilyAuctionList = new List<AuctionItemClass>(); |
| | | #region Built-in |
| | | protected override void BindController() |
| | | {
|
| | | m_ScrollerControllerItem.OnRefreshCell += OnRefreshGridCellItem; |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | GetFamilyAuctionItemList();
|
| | | ListSotr();
|
| | | OnCreateGridCellItem(m_ScrollerControllerItem); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | model.FamilyAuctionItemUpdate += FamilyAuctionReset;
|
| | | model.ClearFamilyAuctionUpdate += FamilyAuctionReset; |
| | | model.RefreshAuctionItemUpdate += RefreshAuctionItemUpdate; |
| | | model.BiddingItemInfoUpdate += RefreshAuctionItemUpdate; |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | {
|
| | | model.FamilyAuctionItemUpdate -= FamilyAuctionReset;
|
| | | model.ClearFamilyAuctionUpdate -= FamilyAuctionReset;
|
| | | model.BiddingItemInfoUpdate -= RefreshAuctionItemUpdate;
|
| | | model.RefreshAuctionItemUpdate -= RefreshAuctionItemUpdate;
|
| | | |
| | | }
|
| | |
|
| | | |
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | | #endregion |
| | | private void FamilyAuctionReset()
|
| | | {
|
| | | GetFamilyAuctionItemList();
|
| | | ListSotr();
|
| | | OnCreateGridCellItem(m_ScrollerControllerItem);
|
| | | }
|
| | | private void RefreshAuctionItemUpdate()
|
| | | {
|
| | | m_ScrollerControllerItem.m_Scorller.RefreshActiveCellViews();//刷新可见
|
| | | } |
| | | private void OnCreateGridCellItem(ScrollerController gridCtrl)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | |
|
| | | for (int i = 0; i < FamilyAuctionList.Count; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | | gridCtrl.Restart();
|
| | | } |
| | | private void OnRefreshGridCellItem(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | int index = cell.index;
|
| | | var ItemGUID = FamilyAuctionList[index].ItemGUID;
|
| | | FamilyAuctioncell familyAuctionCell = cell.GetComponent<FamilyAuctioncell>();
|
| | | familyAuctionCell.GetFamilyAuctionGUID(ItemGUID);
|
| | | } |
| | | |
| | | |
| | | |
| | | private void GetFamilyAuctionItemList()
|
| | | {
|
| | | FamilyAuctionList.Clear();
|
| | | foreach (var value in model.FamilyAuctionItemDic.Values)
|
| | | {
|
| | | FamilyAuctionList.Add(value);
|
| | | }
|
| | | } |
| | | private void ListSotr()
|
| | | {
|
| | | FamilyAuctionList.Sort(Compare);
|
| | | }
|
| | | int Compare(AuctionItemClass x, AuctionItemClass y)//数组排列
|
| | | {
|
| | | bool havex = IsHighestPrice(x.ItemGUID);
|
| | | bool havey = IsHighestPrice(y.ItemGUID);
|
| | | if (havex.CompareTo(havey) != 0)//是否最高价
|
| | | {
|
| | | return -havex.CompareTo(havey);
|
| | | }
|
| | | bool havex1 = IsParticipate(x.ItemGUID);
|
| | | bool havey1 = IsParticipate(y.ItemGUID);
|
| | | if (havex1.CompareTo(havey1) != 0)//是否参与
|
| | | {
|
| | | return -havex1.CompareTo(havey1);
|
| | | }
|
| | | bool havex2 = IsAttention(x.ItemID);
|
| | | bool havey2 = IsAttention(y.ItemID);
|
| | | if (havex2.CompareTo(havey2) != 0)//是否关注
|
| | | {
|
| | | return -havex2.CompareTo(havey2);
|
| | | }
|
| | | int havex3 = TimeSort(x);
|
| | | int havey3 = TimeSort(y);
|
| | | if (havex3.CompareTo(havey3) != 0)//时间排序
|
| | | {
|
| | | return -havex3.CompareTo(havey3);
|
| | | }
|
| | | return 1;
|
| | | } |
| | | |
| | | private bool IsHighestPrice(string GUID)
|
| | | {
|
| | | bool isBool = false;
|
| | | int playerId = (int)PlayerDatas.Instance.baseData.PlayerID;
|
| | | if (model.BiddingItemInfoDic.ContainsKey(GUID))
|
| | | {
|
| | | var biddingItemInfo = model.BiddingItemInfoDic[GUID];
|
| | | isBool=biddingItemInfo.BidderID == playerId;
|
| | | }
|
| | | return isBool;
|
| | | }
|
| | |
|
| | | private bool IsParticipate(string GUID)
|
| | | {
|
| | | bool isBool = false;
|
| | | if (model.BiddingItemInfoDic.ContainsKey(GUID))
|
| | | {
|
| | | isBool = true;
|
| | | }
|
| | | return isBool;
|
| | | } |
| | | private bool IsAttention(int itemId)
|
| | | {
|
| | | bool isBool = false;
|
| | | if (model.AttentionAuctionItemIDdic.ContainsKey(itemId))
|
| | | {
|
| | | isBool = true;
|
| | | }
|
| | | return isBool;
|
| | | } |
| | | private int TimeSort(AuctionItemClass auctionItemClass)
|
| | | {
|
| | | int scends = 0;
|
| | | var auctionItem = AuctionItemConfig.Get(auctionItemClass.ItemID);
|
| | | if (auctionItem == null)
|
| | | {
|
| | | return 0;
|
| | | }
|
| | | var timeNow = TimeUtility.ServerNow;
|
| | | TimeSpan timeSpan = timeNow - auctionItemClass.Time;
|
| | | scends= (int)timeSpan.TotalSeconds;
|
| | | return scends;
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e0d579e1b72c3f54a975fa5fe5e130c4 |
| | | timeCreated: 1551428716 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, March 04, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using System;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class FamilyAuctioncell : MonoBehaviour
|
| | | { |
| | | [SerializeField] GameObject m_NeedImage;//需要
|
| | | [SerializeField] GameObject m_ParticipateImage;//参与竞价
|
| | | [SerializeField] ItemCell m_ItemCell;//物品
|
| | | [SerializeField] TextEx m_ItemName;//物品名
|
| | | [SerializeField] GameObject m_EquipmentScoreObj;//装备评分
|
| | | [SerializeField] TextEx m_Score;//评分
|
| | | [SerializeField] GameObject m_StateIcon;//上升剪头
|
| | | [SerializeField] GameObject m_BiddingTextObj;//竞价中
|
| | | [SerializeField] GameObject m_HighestPriceImage;//最高价
|
| | | [SerializeField] TextEx m_JadeNumber;//当前价格
|
| | | [SerializeField] TextEx m_TimeText;//时间
|
| | |
|
| | | [SerializeField] Button m_PriceButton;//一口价按钮
|
| | | [SerializeField] ImageEx m_PriceImage;
|
| | | [SerializeField] TextEx m_JadeNumber1;
|
| | |
|
| | | [SerializeField] Button m_BiddingButton;//竞价按钮
|
| | | [SerializeField] ImageEx m_BiddingImage;
|
| | | [SerializeField] TextEx m_JadeNumber2;
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } }
|
| | | private AuctionItemConfig AuctionItem;
|
| | | private AuctionItemClass FamilyAuctionItem; |
| | | public void GetFamilyAuctionGUID(string GUIID)
|
| | | {
|
| | | m_NeedImage.SetActive(false);
|
| | | m_ParticipateImage.SetActive(false);
|
| | | m_BiddingTextObj.SetActive(false);
|
| | | m_HighestPriceImage.SetActive(false);
|
| | | m_EquipmentScoreObj.SetActive(false);
|
| | | if (!model.FamilyAuctionItemDic.ContainsKey(GUIID))
|
| | | {
|
| | | DebugEx.LogError("未找到相应的仙盟拍品数据");
|
| | | return;
|
| | | }
|
| | | var familyAuctionItem = model.FamilyAuctionItemDic[GUIID];
|
| | | FamilyAuctionItem = familyAuctionItem;
|
| | | var playerId = PlayerDatas.Instance.baseData.PlayerID;
|
| | | var auctionItem = AuctionItemConfig.Get(familyAuctionItem.ItemID);
|
| | | var itemConfig = ItemConfig.Get(familyAuctionItem.ItemID);
|
| | | if (itemConfig == null)
|
| | | {
|
| | | DebugEx.LogError("物品表没有找到该物品,物品ID为" + familyAuctionItem.ItemID);
|
| | | return;
|
| | | }
|
| | | if (auctionItem == null)
|
| | | {
|
| | | DebugEx.LogError("拍卖物品表没有找到该物品,物品ID为" + familyAuctionItem.ItemID);
|
| | | return;
|
| | | }
|
| | | AuctionItem = auctionItem;
|
| | | if (model.AttentionAuctionItemIDdic.ContainsKey(familyAuctionItem.ItemID))//是否关注
|
| | | {
|
| | | m_NeedImage.SetActive(true);
|
| | | }
|
| | | if (model.BiddingItemInfoDic.ContainsKey(GUIID))//参与了竞价的物品
|
| | | {
|
| | | var biddingItemInfo = model.BiddingItemInfoDic[GUIID];
|
| | | m_ParticipateImage.SetActive(true);
|
| | | if (biddingItemInfo.BidderID == playerId)//判断是否最高竞价
|
| | | {
|
| | | m_HighestPriceImage.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_BiddingTextObj.SetActive(true);
|
| | | }
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(familyAuctionItem.ItemID, true,
|
| | | (ulong)familyAuctionItem.ItemCount, itemConfig.BindType);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemName.text = itemConfig.ItemName;
|
| | | if (itemConfig.EquipPlace != 0)
|
| | | {
|
| | | m_EquipmentScoreObj.SetActive(true);
|
| | | // m_Score.text
|
| | | }
|
| | | int needJade = 0;
|
| | | if (familyAuctionItem.BidderPrice == 0)
|
| | | {
|
| | | needJade = auctionItem.BasePrice;
|
| | | }
|
| | | else
|
| | | {
|
| | | needJade = familyAuctionItem.BidderPrice + auctionItem.BiddingAdd;
|
| | | }
|
| | | m_JadeNumber.text = (needJade).ToString();
|
| | | m_JadeNumber1.text = auctionItem.BuyoutPrice.ToString(); |
| | | m_PriceButton.SetListener(() => //一口价
|
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + auctionItem.BuyoutPrice + "立即拍下商品?";
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (jade >= auctionItem.BuyoutPrice)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(GUIID, auctionItem.BuyoutPrice);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | });
|
| | | });
|
| | | m_JadeNumber2.text = (needJade).ToString();
|
| | | m_BiddingButton.SetListener(() => //竞价
|
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + needJade + "参与竞价?";
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (jade >= needJade)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(GUIID, needJade);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | });
|
| | | |
| | | });
|
| | | }
|
| | | private void LateUpdate()
|
| | | {
|
| | | if (AuctionItem != null && FamilyAuctionItem != null)
|
| | | {
|
| | | var timeNow = TimeUtility.ServerNow;
|
| | | TimeSpan timeSpan = timeNow - FamilyAuctionItem.Time;
|
| | | int minute = (int)timeSpan.TotalMinutes;
|
| | | if (minute < AuctionItem.NoticeSaleMinutes)//预热中
|
| | | {
|
| | | if (m_PriceButton.interactable)
|
| | | {
|
| | | m_PriceButton.interactable = false;
|
| | | m_PriceImage.gray = true;
|
| | | }
|
| | | if (m_BiddingButton.interactable)
|
| | | {
|
| | | m_BiddingButton.interactable = false;
|
| | | m_BiddingImage.gray = true;
|
| | | }
|
| | | int seconds = AuctionItem.NoticeSaleMinutes * 60 - (int)timeSpan.TotalSeconds;
|
| | | m_TimeText.text = TimeUtility.SecondsToHMS(seconds) + "后开始";
|
| | | }
|
| | | else if (minute >= AuctionItem.NoticeSaleMinutes && minute <= AuctionItem.FamilySaleMinutes)//拍卖中
|
| | | {
|
| | | if (!m_PriceButton.interactable || m_PriceImage.gray)
|
| | | {
|
| | | m_PriceButton.interactable = true;
|
| | | m_PriceImage.gray = false;
|
| | | }
|
| | | if (!m_BiddingButton.interactable || m_BiddingImage.gray)
|
| | | {
|
| | | m_BiddingButton.interactable = true;
|
| | | m_BiddingImage.gray = false;
|
| | | }
|
| | | int seconds = AuctionItem.FamilySaleMinutes * 60 - ((int)timeSpan.TotalSeconds - AuctionItem.NoticeSaleMinutes * 60);
|
| | | m_TimeText.text = "剩余" + TimeUtility.SecondsToHMS(seconds);
|
| | | }
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 0bb71d522f2496447b4a4f1af10e45cf |
| | | timeCreated: 1551686468 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Wednesday, February 27, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class FullServiceAuctionWin : Window |
| | | {
|
| | |
|
| | | #region Built-in |
| | | [SerializeField] ScrollerController m_ScrollerController;
|
| | | [SerializeField] ScrollerController m_ScrollerControllerJob;
|
| | | [SerializeField] ScrollerController m_ScrollerControllerType;
|
| | | [SerializeField] ScrollerController m_ScrollerControllerItem;
|
| | | [SerializeField] GameObject m_JobTip;
|
| | | [SerializeField] GameObject m_TypeTip;
|
| | | [SerializeField] Button m_JobTipBtn;
|
| | | [SerializeField] Button m_TypeTipBtn;
|
| | | [SerializeField] Text m_JobTipText;
|
| | | [SerializeField] Text m_TypeTipText;
|
| | | List<AuctionItemClass> FullServiceAuctionListSort = new List<AuctionItemClass>();//全服拍品列表
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } } |
| | | protected override void BindController() |
| | | {
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell; |
| | | m_ScrollerControllerJob.OnRefreshCell += OnRefreshGridCellJob;
|
| | | m_ScrollerControllerType.OnRefreshCell += OnRefreshGridCellType; |
| | | m_ScrollerControllerItem.OnRefreshCell += OnRefreshGridCellItem;
|
| | | m_ScrollerControllerItem.lockType = EnhanceLockType.KeepVertical;
|
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_JobTipBtn.AddListener(OnClickJobTipBtn); |
| | | m_TypeTipBtn.AddListener(OnClickTypeTipBtn); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | model.FullServiceAuctionUpdate += FullServiceAuctionUpdate;//数据请求刷新 |
| | | model.RefreshAuctionItemUpdate += RefreshAuctionItemUpdate;//刷新 |
| | | model.ClearAuctionUpdate += ClearAuctionUpdate;//清除 |
| | | model.BiddingItemInfoUpdate += BiddingItemInfoUpdate;//竞价物品信息刷新 |
| | | Reset(); |
| | | CloseTip();
|
| | | ListSort(); |
| | | OnCreateGridLineCell(m_ScrollerController); |
| | | OnCreateGridLineCellJob(m_ScrollerControllerJob); |
| | | OnCreateGridLineCellType(m_ScrollerControllerType); |
| | | OnCreateGridLineCellItem(m_ScrollerControllerItem); |
| | | SetTipText(); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | {
|
| | | |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | model.FullServiceAuctionUpdate -= FullServiceAuctionUpdate;
|
| | | model.RefreshAuctionItemUpdate -= RefreshAuctionItemUpdate; |
| | | model.ClearAuctionUpdate -= ClearAuctionUpdate;
|
| | | model.BiddingItemInfoUpdate -= BiddingItemInfoUpdate;//竞价物品信息刷新 |
| | | } |
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | | #endregion |
| | | private void FullServiceAuctionUpdate()
|
| | | {
|
| | | OnCreateGridLineCellItem(m_ScrollerControllerItem);
|
| | | } |
| | | private void RefreshAuctionItemUpdate()
|
| | | {
|
| | | m_ScrollerControllerItem.m_Scorller.RefreshActiveCellViews();//刷新可见
|
| | | }
|
| | | private void ClearAuctionUpdate()
|
| | | {
|
| | | OnCreateGridLineCellItem(m_ScrollerControllerItem);
|
| | | } |
| | | private void BiddingItemInfoUpdate()
|
| | | {
|
| | | |
| | | } |
| | | private void OnClickJobTipBtn()
|
| | | {
|
| | | m_JobTip.SetActive(true);
|
| | | } |
| | | |
| | | private void OnClickTypeTipBtn()
|
| | | {
|
| | | m_TypeTip.SetActive(true);
|
| | | } |
| | | private void OnCreateGridLineCell(ScrollerController gridCtrl)
|
| | | {
|
| | | |
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i < auctionHelpModel.FullServiceAuctionList.Count; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | | gridCtrl.Restart();
|
| | | } |
| | | private void OnRefreshGridCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | var index = cell.index;
|
| | | if (index >= auctionHelpModel.FullServiceAuctionList.Count)
|
| | | {
|
| | | return;
|
| | | }
|
| | | var fullServiceAuction = auctionHelpModel.FullServiceAuctionList[index];
|
| | | Text textName = cell.transform.Find("Text").GetComponent<Text>();
|
| | | GameObject selected = cell.transform.Find("Selected").gameObject;
|
| | | ButtonEx button = cell.GetComponent<ButtonEx>();
|
| | | textName.text = fullServiceAuction.TypeName;
|
| | | if (fullServiceAuction.Id == auctionHelpModel.SelectedGenreNow)
|
| | | {
|
| | | selected.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | selected.SetActive(false);
|
| | | }
|
| | | button.SetListener(() =>
|
| | | {
|
| | | if (fullServiceAuction.Id != auctionHelpModel.SelectedGenreNow)
|
| | | {
|
| | | CloseTip();
|
| | | auctionHelpModel.SelectedGenreNow = fullServiceAuction.Id;
|
| | | Reset();
|
| | | m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
|
| | | OnCreateGridLineCellJob(m_ScrollerControllerJob);
|
| | | OnCreateGridLineCellType(m_ScrollerControllerType);
|
| | | SetTipText();
|
| | | }
|
| | | });
|
| | |
|
| | | } |
| | | |
| | | private void OnCreateGridLineCellJob(ScrollerController gridCtrl)
|
| | | {
|
| | | var index = 0;
|
| | | index = auctionHelpModel.FullServiceAuctionList.FindIndex((x) =>
|
| | | {
|
| | | return x.Id == auctionHelpModel.SelectedGenreNow;
|
| | | });
|
| | | if (index != -1)
|
| | | {
|
| | | var fullServiceAuction = auctionHelpModel.FullServiceAuctionList[index];
|
| | | if (fullServiceAuction.ChooseItem1 != null && fullServiceAuction.ChooseItem1.Length!=0)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i < fullServiceAuction.ChooseItem1.Length; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | | gridCtrl.Restart();
|
| | | }
|
| | |
|
| | | }
|
| | | }
|
| | | private void OnRefreshGridCellJob(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | var index = cell.index;
|
| | | var selectedGenreNow = auctionHelpModel.SelectedGenreNow;
|
| | | if (auctionHelpModel.FullServiceAuctionDic.ContainsKey(selectedGenreNow))
|
| | | {
|
| | | var config = auctionHelpModel.FullServiceAuctionDic[selectedGenreNow];
|
| | | Text textName = cell.transform.Find("Text").GetComponent<Text>();
|
| | | Button button = cell.GetComponent<Button>();
|
| | | textName.text = config.Config.ChooseItemName1[index];
|
| | | button.SetListener(() =>
|
| | | {
|
| | | m_JobTip.SetActive(false);
|
| | | if (index != config.JobEntry)
|
| | | {
|
| | | auctionHelpModel.FullServiceAuctionDic[selectedGenreNow].JobEntry = index;
|
| | | Reset(); |
| | | SetTipText();
|
| | | }
|
| | | });
|
| | | }
|
| | | } |
| | | |
| | | private void OnCreateGridLineCellType(ScrollerController gridCtrl)
|
| | | {
|
| | | var index = 0;
|
| | | index = auctionHelpModel.FullServiceAuctionList.FindIndex((x) =>
|
| | | {
|
| | | return x.Id == auctionHelpModel.SelectedGenreNow;
|
| | | });
|
| | | if (index != -1)
|
| | | {
|
| | | var fullServiceAuction = auctionHelpModel.FullServiceAuctionList[index];
|
| | | if (fullServiceAuction.ChooseItem2 != null && fullServiceAuction.ChooseItem2.Length!=0)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i < fullServiceAuction.ChooseItem2.Length; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | | gridCtrl.Restart();
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | private void OnRefreshGridCellType(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | var index = cell.index;
|
| | | var selectedGenreNow = auctionHelpModel.SelectedGenreNow;
|
| | | if (auctionHelpModel.FullServiceAuctionDic.ContainsKey(selectedGenreNow))
|
| | | {
|
| | | var config = auctionHelpModel.FullServiceAuctionDic[selectedGenreNow];
|
| | | Text textName = cell.transform.Find("Text").GetComponent<Text>();
|
| | | Button button = cell.GetComponent<Button>();
|
| | | textName.text = config.Config.ChooseItemName2[index];
|
| | | button.SetListener(() =>
|
| | | {
|
| | | m_TypeTip.SetActive(false);
|
| | | if (index != config.TypeEntry)
|
| | | {
|
| | | auctionHelpModel.FullServiceAuctionDic[selectedGenreNow].TypeEntry = index;
|
| | | Reset(); |
| | | SetTipText();
|
| | | }
|
| | | });
|
| | | }
|
| | |
|
| | | }
|
| | |
|
| | | private void OnCreateGridLineCellItem(ScrollerController gridCtrl)
|
| | | {
|
| | | ListSort();
|
| | | for (int i = 0; i < model.FullServiceAuctionList.Count; i++)
|
| | | {
|
| | | var FullServiceAuction = model.FullServiceAuctionList[i];
|
| | | var index = FullServiceAuctionListSort.FindIndex((x) => { return x.ItemGUID == FullServiceAuction.ItemGUID; });
|
| | | if (index == -1)
|
| | | {
|
| | | FullServiceAuctionListSort.Add(FullServiceAuction);
|
| | | }
|
| | | }
|
| | | |
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i <FullServiceAuctionListSort.Count; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | | gridCtrl.Restart();
|
| | | } |
| | | private void OnRefreshGridCellItem(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | int index = cell.index;
|
| | | FullServiceAuctioncell fullServiceAuctioncell = cell.GetComponent<FullServiceAuctioncell>();
|
| | | AuctionItemClass auctionItemClass = FullServiceAuctionListSort[index];
|
| | | fullServiceAuctioncell.GetFullServiceAuctionGUID(auctionItemClass.ItemGUID, index);
|
| | | } |
| | | |
| | | private void Reset()//重置查询
|
| | | {
|
| | | model.FullServiceAuctionList.Clear();
|
| | | model.QueryRemaining.UpBool = true;
|
| | | model.QueryRemaining.DownBool = true;
|
| | | var sendNumber = AuctionInquiry.Instance.GetSendNumber();
|
| | | if (sendNumber != 0)
|
| | | {
|
| | | AuctionInquiry.Instance.SendQueryAuction(string.Empty, sendNumber, 1);
|
| | | }
|
| | | |
| | | } |
| | | private void CloseTip()
|
| | | {
|
| | | m_JobTip.SetActive(false);
|
| | | m_TypeTip.SetActive(false);
|
| | | } |
| | | private void SetTipText()
|
| | | {
|
| | | var selectedGenreNow = auctionHelpModel.SelectedGenreNow;
|
| | | if (auctionHelpModel.FullServiceAuctionDic.ContainsKey(selectedGenreNow))
|
| | | {
|
| | | var config = auctionHelpModel.FullServiceAuctionDic[selectedGenreNow];
|
| | | m_JobTipBtn.gameObject.SetActive(config.JobTipBool);
|
| | | if (config.JobTipBool)
|
| | | {
|
| | | m_JobTipText.text = config.Config.ChooseItemName1[config.JobEntry];
|
| | | }
|
| | | m_TypeTipBtn.gameObject.SetActive(config.TypeTipBool);
|
| | | if (config.TypeTipBool)
|
| | | {
|
| | | m_TypeTipText.text = config.Config.ChooseItemName2[config.TypeEntry];
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | private void ListSort()
|
| | | {
|
| | | FullServiceAuctionListSort.Clear();
|
| | | var sendNumber = AuctionInquiry.Instance.GetSendNumber();
|
| | | foreach (var vlaue in model.BiddingItemInfoDic.Values)
|
| | | {
|
| | | int num = 0;
|
| | | if (sendNumber != 0)
|
| | | {
|
| | | var auctionItem = AuctionItemConfig.Get(vlaue.ItemID);
|
| | | num = sendNumber / 1000;
|
| | | num -= 1;
|
| | | if (num == 0)
|
| | | {
|
| | | FullServiceAuctionListSort.Add(vlaue);
|
| | | }
|
| | | else if (num == auctionItem.ItemType)
|
| | | {
|
| | | FullServiceAuctionListSort.Add(vlaue);
|
| | | }
|
| | | } |
| | | }
|
| | | FullServiceAuctionListSort.Sort(Compare);
|
| | | }
|
| | | int Compare(AuctionItemClass x, AuctionItemClass y)//数组排列
|
| | | {
|
| | | bool havex = IsHighestPrice(x.ItemGUID);
|
| | | bool havey = IsHighestPrice(y.ItemGUID);
|
| | | if (havex.CompareTo(havey) != 0)//是否最高价
|
| | | {
|
| | | return -havex.CompareTo(havey);
|
| | | }
|
| | | bool havex1 = IsParticipate(x.ItemGUID);
|
| | | bool havey1 = IsParticipate(y.ItemGUID);
|
| | | if (havex1.CompareTo(havey1) != 0)//是否参与
|
| | | {
|
| | | return -havex1.CompareTo(havey1);
|
| | | } |
| | | return 1;
|
| | | }
|
| | | private bool IsHighestPrice(string GUID)
|
| | | {
|
| | | bool isBool = false;
|
| | | int playerId = (int)PlayerDatas.Instance.baseData.PlayerID;
|
| | | if (model.BiddingItemInfoDic.ContainsKey(GUID))
|
| | | {
|
| | | var biddingItemInfo = model.BiddingItemInfoDic[GUID];
|
| | | isBool = biddingItemInfo.BidderID == playerId;
|
| | | }
|
| | | return isBool;
|
| | | }
|
| | |
|
| | | private bool IsParticipate(string GUID)
|
| | | {
|
| | | bool isBool = false;
|
| | | if (model.BiddingItemInfoDic.ContainsKey(GUID))
|
| | | {
|
| | | isBool = true;
|
| | | }
|
| | | return isBool;
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 3a10872c486a3494d90740fa77e4ca14 |
| | | timeCreated: 1551255532 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Thursday, February 28, 2019 |
| | | //-------------------------------------------------------- |
| | | using EnhancedUI.EnhancedScroller;
|
| | | using System.Collections;
|
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | using System;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class FullServiceAuctioncell : MonoBehaviour
|
| | | {
|
| | | [SerializeField] GameObject m_NeedImage;//需要
|
| | | [SerializeField] GameObject m_ParticipateImage;//参与竞价
|
| | | [SerializeField] ItemCell m_ItemCell;//物品
|
| | | [SerializeField] TextEx m_ItemName;//物品名
|
| | | [SerializeField] GameObject m_EquipmentScoreObj;//装备评分
|
| | | [SerializeField] TextEx m_Score;//评分
|
| | | [SerializeField] GameObject m_StateIcon;//上升剪头
|
| | | [SerializeField] GameObject m_BiddingTextObj;//竞价中
|
| | | [SerializeField] GameObject m_HighestPriceImage;//最高价
|
| | | [SerializeField] TextEx m_JadeNumber;//当前价格
|
| | | [SerializeField] TextEx m_TimeText;//时间
|
| | |
|
| | | [SerializeField] Button m_PriceButton;//一口价按钮
|
| | | [SerializeField] ImageEx m_PriceImage;
|
| | | [SerializeField] TextEx m_JadeNumber1;
|
| | |
|
| | | [SerializeField] Button m_BiddingButton;//竞价按钮
|
| | | [SerializeField] ImageEx m_BiddingImage;
|
| | | [SerializeField] TextEx m_JadeNumber2;
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } }
|
| | | private AuctionItemConfig AuctionItem;
|
| | | private AuctionItemClass FullServiceAuction;
|
| | |
|
| | | public void GetFullServiceAuctionGUID(string GUID,int index)
|
| | | {
|
| | | m_NeedImage.SetActive(false);
|
| | | m_ParticipateImage.SetActive(false);
|
| | | m_BiddingTextObj.SetActive(false);
|
| | | m_HighestPriceImage.SetActive(false);
|
| | | m_EquipmentScoreObj.SetActive(false);
|
| | | var indexList = model.FullServiceAuctionList.FindIndex((x) => { return x.ItemGUID == GUID; });
|
| | | if (indexList == -1)
|
| | | {
|
| | | DebugEx.LogError("未查找到相应的列表数据");
|
| | | return;
|
| | | }
|
| | | var fullServiceAuction = model.FullServiceAuctionList[indexList];
|
| | | if (index <5)
|
| | | {
|
| | | var sendNumber = AuctionInquiry.Instance.GetSendNumber();
|
| | | if (sendNumber != 0 && auctionHelpModel.Wait && model.QueryRemaining.UpBool)
|
| | | {
|
| | | AuctionInquiry.Instance.SendQueryAuction(fullServiceAuction.ItemGUID, sendNumber, 2);
|
| | | auctionHelpModel.Wait = false;
|
| | | }
|
| | | }
|
| | | else if (index >= model.FullServiceAuctionList.Count - 3)
|
| | | {
|
| | | var sendNumber = AuctionInquiry.Instance.GetSendNumber();
|
| | | if (sendNumber != 0 && auctionHelpModel.Wait && model.QueryRemaining.DownBool)
|
| | | {
|
| | | AuctionInquiry.Instance.SendQueryAuction(fullServiceAuction.ItemGUID, sendNumber, 1);
|
| | | auctionHelpModel.Wait = false;
|
| | | }
|
| | | }
|
| | | FullServiceAuction = fullServiceAuction;
|
| | | var playerId = PlayerDatas.Instance.baseData.PlayerID;
|
| | | var auctionItem = AuctionItemConfig.Get(fullServiceAuction.ItemID);
|
| | | var itemConfig = ItemConfig.Get(fullServiceAuction.ItemID);
|
| | | if (itemConfig == null)
|
| | | {
|
| | | DebugEx.LogError("物品表没有找到该物品,物品ID为" + fullServiceAuction.ItemID);
|
| | | return;
|
| | | }
|
| | | if (auctionItem == null)
|
| | | {
|
| | | DebugEx.LogError("拍卖物品表没有找到该物品,物品ID为" + fullServiceAuction.ItemID);
|
| | | return;
|
| | | }
|
| | | AuctionItem = auctionItem;
|
| | | if (model.BiddingItemInfoDic.ContainsKey(fullServiceAuction.ItemGUID))//参与了竞价的物品
|
| | | {
|
| | | var biddingItemInfo = model.BiddingItemInfoDic[fullServiceAuction.ItemGUID];
|
| | | m_ParticipateImage.SetActive(true);
|
| | | if (biddingItemInfo.BidderID == playerId)//判断是否最高竞价
|
| | | {
|
| | | m_HighestPriceImage.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_BiddingTextObj.SetActive(true);
|
| | | }
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(fullServiceAuction.ItemID, true,
|
| | | (ulong)fullServiceAuction.ItemCount, itemConfig.BindType);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemName.text = itemConfig.ItemName;
|
| | | if (itemConfig.EquipPlace != 0)
|
| | | {
|
| | | m_EquipmentScoreObj.SetActive(true);
|
| | | // m_Score.text
|
| | | }
|
| | | int needJade = 0;
|
| | | if (fullServiceAuction.BidderPrice == 0)
|
| | | {
|
| | | needJade = auctionItem.BasePrice;
|
| | | }
|
| | | else
|
| | | {
|
| | | needJade = fullServiceAuction.BidderPrice + auctionItem.BiddingAdd;
|
| | | }
|
| | | m_JadeNumber.text = needJade.ToString();
|
| | | m_JadeNumber1.text = auctionItem.BuyoutPrice.ToString();
|
| | | m_PriceButton.SetListener(() => //一口价
|
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + auctionItem.BuyoutPrice + "立即拍下商品?";
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (jade >= auctionItem.BuyoutPrice)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(fullServiceAuction.ItemGUID, auctionItem.BuyoutPrice);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | });
|
| | | });
|
| | | m_JadeNumber2.text = needJade.ToString();
|
| | | m_BiddingButton.SetListener(() => //竞价
|
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + needJade + "参与竞价?";
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (jade >= needJade)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(fullServiceAuction.ItemGUID, needJade);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | });
|
| | | });
|
| | | }
|
| | | //public override void Refresh(CellView cell)
|
| | | //{
|
| | | // m_NeedImage.SetActive(false);
|
| | | // m_ParticipateImage.SetActive(false);
|
| | | // m_BiddingTextObj.SetActive(false);
|
| | | // m_HighestPriceImage.SetActive(false);
|
| | | // m_EquipmentScoreObj.SetActive(false);
|
| | | // var index = cell.index;
|
| | | // if (index >= model.FullServiceAuctionList.Count)
|
| | | // {
|
| | | // DebugEx.LogError("超出数据存储范围");
|
| | | // return;
|
| | | // }
|
| | |
|
| | | // var fullServiceAuction = model.FullServiceAuctionList[index];
|
| | | // if (index == 1)
|
| | | // {
|
| | | // var sendNumber = AuctionInquiry.Instance.GetSendNumber();
|
| | | // if (sendNumber != 0 && auctionHelpModel.Wait && model.QueryRemaining.UpBool)
|
| | | // {
|
| | | // AuctionInquiry.Instance.SendQueryAuction(fullServiceAuction.ItemGUID, sendNumber, 2);
|
| | | // auctionHelpModel.Wait = false;
|
| | | // }
|
| | | // } else if (index== model.FullServiceAuctionList.Count-2)
|
| | | // {
|
| | | // var sendNumber = AuctionInquiry.Instance.GetSendNumber();
|
| | | // if (sendNumber != 0 && auctionHelpModel.Wait && model.QueryRemaining.DownBool)
|
| | | // {
|
| | | // AuctionInquiry.Instance.SendQueryAuction(fullServiceAuction.ItemGUID, sendNumber, 1);
|
| | | // auctionHelpModel.Wait = false;
|
| | | // }
|
| | | // }
|
| | | // FullServiceAuction = fullServiceAuction;
|
| | | // var playerId = PlayerDatas.Instance.baseData.PlayerID;
|
| | | // var auctionItem = AuctionItemConfig.Get(fullServiceAuction.ItemID); |
| | | // var itemConfig = ItemConfig.Get(fullServiceAuction.ItemID);
|
| | | // if (itemConfig == null)
|
| | | // {
|
| | | // DebugEx.LogError("物品表没有找到该物品,物品ID为" + fullServiceAuction.ItemID);
|
| | | // return;
|
| | | // }
|
| | | // if (auctionItem == null)
|
| | | // {
|
| | | // DebugEx.LogError("拍卖物品表没有找到该物品,物品ID为"+ fullServiceAuction.ItemID);
|
| | | // return;
|
| | | // }
|
| | | // AuctionItem = auctionItem;
|
| | | // if (model.BiddingItemInfoDic.ContainsKey(fullServiceAuction.ItemGUID))//参与了竞价的物品
|
| | | // {
|
| | | // var biddingItemInfo = model.BiddingItemInfoDic[fullServiceAuction.ItemGUID];
|
| | | // m_ParticipateImage.SetActive(true);
|
| | | // if (biddingItemInfo.BidderID == playerId)//判断是否最高竞价
|
| | | // {
|
| | | // m_HighestPriceImage.SetActive(true);
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // m_BiddingTextObj.SetActive(true);
|
| | | // }
|
| | | // }
|
| | | // ItemCellModel cellModel = new ItemCellModel(fullServiceAuction.ItemID, true, |
| | | // (ulong)fullServiceAuction.ItemCount, itemConfig.BindType);
|
| | | // m_ItemCell.Init(cellModel);
|
| | | // m_ItemName.text = itemConfig.ItemName;
|
| | | // if (itemConfig.EquipPlace != 0)
|
| | | // {
|
| | | // m_EquipmentScoreObj.SetActive(true);
|
| | | // // m_Score.text
|
| | | // }
|
| | | // int needJade = 0;
|
| | | // if (fullServiceAuction.BidderPrice == 0)
|
| | | // {
|
| | | // needJade = auctionItem.BasePrice;
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // needJade = fullServiceAuction.BidderPrice + auctionItem.BiddingAdd;
|
| | | // }
|
| | | // m_JadeNumber.text = needJade.ToString();
|
| | | // m_JadeNumber1.text = auctionItem.BuyoutPrice.ToString();
|
| | | // m_PriceButton.SetListener(()=> //一口价
|
| | | // {
|
| | | // int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | // string str = "是否花费" + auctionItem.BuyoutPrice + "立即拍下商品?";
|
| | | // ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | // if (jade >= auctionItem.BuyoutPrice)
|
| | | // {
|
| | | // AuctionInquiry.Instance.SendSellAuctionItem(fullServiceAuction.ItemGUID, auctionItem.BuyoutPrice);
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | // }
|
| | | // });
|
| | | // });
|
| | | // m_JadeNumber2.text = needJade.ToString();
|
| | | // m_BiddingButton.SetListener(()=> //竞价
|
| | | // {
|
| | | // int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | // string str = "是否花费" + needJade + "参与竞价?";
|
| | | // ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | // if (jade >= needJade)
|
| | | // {
|
| | | // AuctionInquiry.Instance.SendSellAuctionItem(fullServiceAuction.ItemGUID, needJade);
|
| | | // }
|
| | | // else
|
| | | // {
|
| | | // WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | // }
|
| | | // });
|
| | | // });
|
| | | //}
|
| | | private void LateUpdate()
|
| | | {
|
| | | if (AuctionItem != null && FullServiceAuction != null)
|
| | | {
|
| | | var timeNow = TimeUtility.ServerNow;
|
| | | TimeSpan timeSpan = timeNow - FullServiceAuction.Time;
|
| | | int minute = (int)timeSpan.TotalMinutes;
|
| | | if (minute < AuctionItem.NoticeSaleMinutes)//预热中
|
| | | {
|
| | | if (m_PriceButton.interactable)
|
| | | {
|
| | | m_PriceButton.interactable = false;
|
| | | m_PriceImage.gray = true;
|
| | | }
|
| | | if (m_BiddingButton.interactable)
|
| | | {
|
| | | m_BiddingButton.interactable = false;
|
| | | m_BiddingImage.gray = true;
|
| | | }
|
| | | int seconds = AuctionItem.NoticeSaleMinutes * 60 - (int)timeSpan.TotalSeconds;
|
| | | m_TimeText.text = TimeUtility.SecondsToHMS(seconds) + "后开始";
|
| | | }
|
| | | else if (minute >= AuctionItem.NoticeSaleMinutes && minute <= AuctionItem.FamilySaleMinutes)//拍卖中
|
| | | {
|
| | | if (!m_PriceButton.interactable || m_PriceImage.gray)
|
| | | {
|
| | | m_PriceButton.interactable = true;
|
| | | m_PriceImage.gray = false;
|
| | | }
|
| | | if (!m_BiddingButton.interactable || m_BiddingImage.gray)
|
| | | {
|
| | | m_BiddingButton.interactable = true;
|
| | | m_BiddingImage.gray = false;
|
| | | }
|
| | | int seconds = AuctionItem.FamilySaleMinutes * 60 - ((int)timeSpan.TotalSeconds - AuctionItem.NoticeSaleMinutes * 60);
|
| | | m_TimeText.text = "剩余" + TimeUtility.SecondsToHMS(seconds);
|
| | | }
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 6c58f35837f2862498619c9d0dab92fa |
| | | timeCreated: 1551344060 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, March 04, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using System;
|
| | |
|
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class MyAuctionCell : MonoBehaviour
|
| | | {
|
| | |
|
| | | [SerializeField] GameObject m_MyAuction;//我的拍品
|
| | | [SerializeField] GameObject m_FamilyImage;//仙盟拍品
|
| | | [SerializeField] ItemCell m_ItemCell;//物品
|
| | | [SerializeField] TextEx m_ItemName;//物品名
|
| | | [SerializeField] GameObject m_EquipmentScoreObj;//装备评分
|
| | | [SerializeField] TextEx m_Score;//评分
|
| | | [SerializeField] GameObject m_StateIcon;//上升剪头
|
| | | [SerializeField] Text m_BiddingText;//竞价状态
|
| | | [SerializeField] TextEx m_JadeNumber;//当前价格
|
| | | [SerializeField] TextEx m_TimeText;//时间
|
| | | [SerializeField] TextEx m_Income;//收益
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } }
|
| | | private AuctionItemConfig AuctionItem;
|
| | | private AuctionItemClass MyAuction;
|
| | | public void GetMyAuctionGUID(string GUIID)
|
| | | {
|
| | | if (!model.PlayerAuctionItemInfoDic.ContainsKey(GUIID) && !model.FamilyAuctionItemDic.ContainsKey(GUIID))
|
| | | {
|
| | | DebugEx.LogError("未找到相应的拍品数据");
|
| | | return;
|
| | | }
|
| | | m_MyAuction.SetActive(false);
|
| | | m_FamilyImage.SetActive(false);
|
| | | AuctionItemClass myAuction = new AuctionItemClass();
|
| | | int type = 0;
|
| | | if (model.PlayerAuctionItemInfoDic.ContainsKey(GUIID))
|
| | | {
|
| | | type = 0;
|
| | | m_MyAuction.SetActive(true);
|
| | | myAuction = model.PlayerAuctionItemInfoDic[GUIID];
|
| | | }
|
| | | if (model.FamilyAuctionItemDic.ContainsKey(GUIID))
|
| | | {
|
| | | type = 1;
|
| | | m_FamilyImage.SetActive(true);
|
| | | myAuction = model.FamilyAuctionItemDic[GUIID];
|
| | | }
|
| | | var auctionItem = AuctionItemConfig.Get(myAuction.ItemID);
|
| | | MyAuction = myAuction;
|
| | | var itemConfig = ItemConfig.Get(myAuction.ItemID);
|
| | | if (itemConfig == null)
|
| | | {
|
| | | DebugEx.LogError("物品表没有找到该物品,物品ID为" + myAuction.ItemID);
|
| | | return;
|
| | | }
|
| | | if (auctionItem == null)
|
| | | {
|
| | | DebugEx.LogError("拍卖物品表没有找到该物品,物品ID为" + myAuction.ItemID);
|
| | | return;
|
| | | }
|
| | | AuctionItem = auctionItem;
|
| | | m_Income.text = 0.ToString();
|
| | | if (myAuction.BidderPrice == 0)
|
| | | {
|
| | | m_BiddingText.text = "暂无出价";
|
| | | }
|
| | | else
|
| | | {
|
| | | m_BiddingText.text = "竞价中...";
|
| | | if (type == 0)
|
| | | {
|
| | | int auctionTaxrate = Mathf.CeilToInt((float)(auctionHelpModel.
|
| | | AuctionTaxrate1 * myAuction.BidderPrice) / 100);//个人税收
|
| | | int incomeNumber = myAuction.BidderPrice - auctionTaxrate;
|
| | | m_Income.text = incomeNumber.ToString();
|
| | | }
|
| | | else if (type == 1)
|
| | | {
|
| | | int auctionTaxrate = Mathf.CeilToInt((float)(auctionHelpModel.
|
| | | AuctionTaxrate2 * myAuction.BidderPrice) / 100);//仙盟税收
|
| | | int number = myAuction.BidderPrice - auctionTaxrate;
|
| | | int incomeMax = number - Mathf.CeilToInt((float)(number * auctionHelpModel.AuctionTaxrate3) / 100);
|
| | | int incomeNumber = Mathf.FloorToInt((float)number / myAuction.FamilyPlayerIDList.Count); |
| | | if (incomeMax >= incomeNumber)
|
| | | {
|
| | | m_Income.text = incomeNumber.ToString();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_Income.text = incomeMax.ToString();
|
| | | }
|
| | | }
|
| | |
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(myAuction.ItemID, true,
|
| | | (ulong)myAuction.ItemCount, itemConfig.BindType);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemName.text = itemConfig.ItemName;
|
| | | if (itemConfig.EquipPlace != 0)
|
| | | {
|
| | | m_EquipmentScoreObj.SetActive(true);
|
| | | // m_Score.text
|
| | | }
|
| | | if (myAuction.BidderPrice != 0)
|
| | | {
|
| | | m_JadeNumber.text = myAuction.BidderPrice.ToString();
|
| | | }
|
| | | else
|
| | | {
|
| | | m_JadeNumber.text = auctionItem.BasePrice.ToString();
|
| | | }
|
| | | |
| | | }
|
| | | private void LateUpdate()
|
| | | {
|
| | | if (AuctionItem != null && MyAuction != null)
|
| | | {
|
| | | var timeNow = TimeUtility.ServerNow;
|
| | | TimeSpan timeSpan = timeNow - MyAuction.Time;
|
| | | int minute = (int)timeSpan.TotalMinutes;
|
| | | if (minute < AuctionItem.NoticeSaleMinutes)//预热中
|
| | | {
|
| | | int seconds = AuctionItem.NoticeSaleMinutes * 60 - (int)timeSpan.TotalSeconds;
|
| | | m_TimeText.text = TimeUtility.SecondsToHMS(seconds) + "后开始";
|
| | | }
|
| | | else if (minute >= AuctionItem.NoticeSaleMinutes && minute <= AuctionItem.FamilySaleMinutes)//拍卖中
|
| | | {
|
| | | int seconds = AuctionItem.FamilySaleMinutes * 60 - ((int)timeSpan.TotalSeconds - AuctionItem.NoticeSaleMinutes * 60);
|
| | | m_TimeText.text = "剩余" + TimeUtility.SecondsToHMS(seconds);
|
| | | }
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 0684913b9b5989a47ad5ca04cea7df10 |
| | | timeCreated: 1551691294 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, March 04, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI { |
| | | |
| | | public class MyAuctionWin : Window |
| | | {
|
| | | [SerializeField] ScrollerController m_ScrollerController;
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } }
|
| | | List<AuctionItemClass> PlayerAuctionItemList = new List<AuctionItemClass>(); |
| | | #region Built-in |
| | | protected override void BindController() |
| | | {
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell;
|
| | | m_ScrollerController.lockType = EnhanceLockType.KeepVertical; |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | GetPlayerAuctionItemList(); |
| | | ListSotr(); |
| | | OnCreateGridLineCell(m_ScrollerController); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | { |
| | | } |
| | | |
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | | #endregion |
| | | private void OnCreateGridLineCell(ScrollerController gridCtrl)
|
| | | {
|
| | |
|
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i < PlayerAuctionItemList.Count; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | | gridCtrl.Restart();
|
| | | } |
| | | private void OnRefreshGridCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | |
|
| | | int index = cell.index;
|
| | | var ItemGUID = PlayerAuctionItemList[index].ItemGUID;
|
| | | MyAuctionCell myAuctionCell = cell.GetComponent<MyAuctionCell>();
|
| | | myAuctionCell.GetMyAuctionGUID(ItemGUID);
|
| | | } |
| | | |
| | | |
| | | private void GetPlayerAuctionItemList()
|
| | | {
|
| | | PlayerAuctionItemList.Clear();
|
| | | foreach (var value in model.PlayerAuctionItemInfoDic.Values)
|
| | | {
|
| | | PlayerAuctionItemList.Add(value);
|
| | | }
|
| | | int playerID = (int)PlayerDatas.Instance.baseData.PlayerID;
|
| | | foreach (var value in model.FamilyAuctionItemDic.Values)
|
| | | {
|
| | | for (int i = 0; i < value.FamilyPlayerIDList.Count; i++)
|
| | | {
|
| | | int familyPlayerID = value.FamilyPlayerIDList[i];
|
| | | if (familyPlayerID == playerID)
|
| | | {
|
| | | PlayerAuctionItemList.Add(value);
|
| | | }
|
| | | }
|
| | | }
|
| | | }
|
| | | private void ListSotr()
|
| | | {
|
| | | PlayerAuctionItemList.Sort(Compare);
|
| | | }
|
| | | int Compare(AuctionItemClass x, AuctionItemClass y)//数组排列
|
| | | {
|
| | | bool havex = model.PlayerAuctionItemInfoDic.ContainsKey(x.ItemGUID);
|
| | | bool havey = model.PlayerAuctionItemInfoDic.ContainsKey(y.ItemGUID); ;
|
| | | if (havex.CompareTo(havey) != 0)//是否为全服拍品
|
| | | {
|
| | | return -havex.CompareTo(havey);
|
| | | }
|
| | | bool havex1 = x.BidderPrice != 0;
|
| | | bool havey1 = y.BidderPrice != 0;
|
| | | if (havex1.CompareTo(havey1) != 0)//是否有收益
|
| | | {
|
| | | return -havex1.CompareTo(havey1);
|
| | | }
|
| | | bool havex2 = model.FamilyAuctionItemDic.ContainsKey(x.ItemGUID);
|
| | | bool havey2 = model.FamilyAuctionItemDic.ContainsKey(y.ItemGUID);
|
| | | if (havex2.CompareTo(havey2) != 0)//是否为仙盟拍品
|
| | | {
|
| | | return -havex2.CompareTo(havey2);
|
| | | }
|
| | | bool havex3 = x.BidderPrice != 0;
|
| | | bool havey3 = y.BidderPrice != 0;
|
| | | if (havex3.CompareTo(havey3) != 0)//是否有收益
|
| | | {
|
| | | return -havex3.CompareTo(havey3);
|
| | | }
|
| | | return 1;
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 36bacd4116435d646bb5634c2921e16a |
| | | timeCreated: 1551690092 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Friday, March 08, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using System.Collections.Generic;
|
| | | using System; |
| | | |
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class MyFocusBehavior : MonoBehaviour
|
| | | { |
| | | [SerializeField] GameObject m_MyFocusBehavior;
|
| | | [SerializeField] Button m_CloseButton; |
| | | [SerializeField] Button m_GoButton;
|
| | | [SerializeField] ItemCell m_ItemCell;
|
| | | [SerializeField] Text m_ItemNameTxt;
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } } |
| | | private List<AddAuctionItemInfoClass> MyFocusItemList = new List<AddAuctionItemInfoClass>(); |
| | | private int ItemID = 0; |
| | | private string ItemGUID = string.Empty; |
| | | public void Init()
|
| | | {
|
| | | model.AddAuctionItemInfoUpdate += AddAuctionItemInfoUpdate;
|
| | | if (!this.gameObject.activeSelf)
|
| | | {
|
| | | this.gameObject.SetActive(true);
|
| | | }
|
| | | GetMyFocusItemList();
|
| | | } |
| | | public void Unit()
|
| | | {
|
| | | model.AddAuctionItemInfoUpdate -= AddAuctionItemInfoUpdate;
|
| | | }
|
| | | |
| | | private void Start()
|
| | | {
|
| | |
|
| | | } |
| | | |
| | | private void OnEnable()
|
| | | {
|
| | |
|
| | | }
|
| | | private void AddAuctionItemInfoUpdate()
|
| | | {
|
| | | GetMyFocusItemList();
|
| | | } |
| | | private void LateUpdate()
|
| | | {
|
| | |
|
| | | if (MyFocusItemList.Count <= 0 && m_MyFocusBehavior.activeSelf)
|
| | | {
|
| | | ItemID = 0;
|
| | | ItemGUID = string.Empty; ;
|
| | | m_MyFocusBehavior.SetActive(false);
|
| | | }
|
| | | else if (!m_MyFocusBehavior.activeSelf && MyFocusItemList.Count > 0)
|
| | | {
|
| | | m_MyFocusBehavior.SetActive(true);
|
| | | var myFocusItem = MyFocusItemList[0];
|
| | | ItemID = myFocusItem.ItemID;
|
| | | ItemGUID = myFocusItem.ItemGUID;
|
| | | var itemConfig = ItemConfig.Get(ItemID);
|
| | | if (itemConfig != null)
|
| | | {
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, true, (ulong)1, itemConfig.BindType);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemNameTxt.text = itemConfig.ItemName;
|
| | | }
|
| | | }
|
| | | } |
| | | private void CloseButton()
|
| | | {
|
| | | if (model.AddAuctionItemInfoDic.ContainsKey(ItemID))
|
| | | {
|
| | | model.AddAuctionItemInfoDic.Remove(ItemID);
|
| | | GetMyFocusItemList();
|
| | | }
|
| | | }
|
| | |
|
| | | private void GoButton()
|
| | | {
|
| | | //model.AddAuctionItemInfoDic.Clear();
|
| | | //GetMyFocusItemList();
|
| | | DebugEx.LogError("跳转表没加跳不过去的。。。。。。");
|
| | | } |
| | | |
| | | private void GetMyFocusItemList()
|
| | | {
|
| | | MyFocusItemList.Clear();
|
| | | foreach (var value in model.AddAuctionItemInfoDic.Values)
|
| | | {
|
| | | if (value.Bool)
|
| | | {
|
| | | MyFocusItemList.Add(value);
|
| | | }
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 6e09418f93d6acc4086dca10812813c4 |
| | | timeCreated: 1552025629 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, March 05, 2019 |
| | | //-------------------------------------------------------- |
| | | using UnityEngine; |
| | | using System.Collections; |
| | | using UnityEngine.UI; |
| | | using System; |
| | | |
| | | namespace Snxxz.UI { |
| | | |
| | | public class MyFocusCell:MonoBehaviour {
|
| | | [SerializeField] GameObject m_NeedImage;//需要
|
| | | [SerializeField] GameObject m_ParticipateImage;//参与竞价
|
| | | [SerializeField] ItemCell m_ItemCell;//物品
|
| | | [SerializeField] TextEx m_ItemName;//物品名
|
| | | [SerializeField] GameObject m_EquipmentScoreObj;//装备评分
|
| | | [SerializeField] TextEx m_Score;//评分
|
| | | [SerializeField] GameObject m_StateIcon;//上升剪头
|
| | | [SerializeField] GameObject m_BiddingTextObj;//竞价中
|
| | | [SerializeField] GameObject m_HighestPriceImage;//最高价
|
| | | [SerializeField] TextEx m_JadeNumber;//当前价格
|
| | | [SerializeField] TextEx m_TimeText;//时间
|
| | |
|
| | | [SerializeField] Button m_PriceButton;//一口价按钮
|
| | | [SerializeField] ImageEx m_PriceImage;
|
| | | [SerializeField] TextEx m_JadeNumber1;
|
| | |
|
| | | [SerializeField] Button m_BiddingButton;//竞价按钮
|
| | | [SerializeField] ImageEx m_BiddingImage;
|
| | | [SerializeField] TextEx m_JadeNumber2;
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } }
|
| | | private AuctionItemConfig AuctionItem;
|
| | | private AuctionItemClass MyFocusItem;
|
| | | public void GetMyFocusGUID(string GUIID)
|
| | | {
|
| | | if (!model.AttentionAuctionItemDic.ContainsKey(GUIID) && !model.FamilyAuctionItemDic.ContainsKey(GUIID))
|
| | | {
|
| | | DebugEx.LogError("未找到相应的拍品数据");
|
| | | return;
|
| | | }
|
| | | m_NeedImage.SetActive(false);
|
| | | m_ParticipateImage.SetActive(false);
|
| | | m_BiddingTextObj.SetActive(false);
|
| | | m_HighestPriceImage.SetActive(false);
|
| | | m_EquipmentScoreObj.SetActive(false);
|
| | | AuctionItemClass myAuction = new AuctionItemClass();
|
| | | int type = 0;
|
| | | if (model.AttentionAuctionItemDic.ContainsKey(GUIID))
|
| | | {
|
| | | type = 0;
|
| | | myAuction = model.AttentionAuctionItemDic[GUIID];
|
| | | }
|
| | | if (model.FamilyAuctionItemDic.ContainsKey(GUIID))
|
| | | {
|
| | | type = 1;
|
| | | myAuction = model.FamilyAuctionItemDic[GUIID];
|
| | | }
|
| | | MyFocusItem = myAuction;
|
| | | var playerId = PlayerDatas.Instance.baseData.PlayerID;
|
| | | var auctionItem = AuctionItemConfig.Get(myAuction.ItemID);
|
| | | var itemConfig = ItemConfig.Get(myAuction.ItemID);
|
| | | if (itemConfig == null)
|
| | | {
|
| | | DebugEx.LogError("物品表没有找到该物品,物品ID为" + myAuction.ItemID);
|
| | | return;
|
| | | }
|
| | | if (auctionItem == null)
|
| | | {
|
| | | DebugEx.LogError("拍卖物品表没有找到该物品,物品ID为" + myAuction.ItemID);
|
| | | return;
|
| | | }
|
| | | AuctionItem = auctionItem;
|
| | | if (model.AttentionAuctionItemIDdic.ContainsKey(myAuction.ItemID))//是否关注
|
| | | {
|
| | | m_NeedImage.SetActive(true);
|
| | | }
|
| | | if (model.BiddingItemInfoDic.ContainsKey(GUIID))//参与了竞价的物品
|
| | | {
|
| | | var biddingItemInfo = model.BiddingItemInfoDic[GUIID];
|
| | | m_ParticipateImage.SetActive(true);
|
| | | if (biddingItemInfo.BidderID == playerId)//判断是否最高竞价
|
| | | {
|
| | | m_HighestPriceImage.SetActive(true);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_BiddingTextObj.SetActive(true);
|
| | | }
|
| | | }
|
| | | ItemCellModel cellModel = new ItemCellModel(myAuction.ItemID, true,
|
| | | (ulong)myAuction.ItemCount, itemConfig.BindType);
|
| | | m_ItemCell.Init(cellModel);
|
| | | m_ItemName.text = itemConfig.ItemName;
|
| | | if (itemConfig.EquipPlace != 0)
|
| | | {
|
| | | m_EquipmentScoreObj.SetActive(true);
|
| | | // m_Score.text
|
| | | }
|
| | | int needJade = 0;
|
| | | if (myAuction.BidderPrice == 0)
|
| | | {
|
| | | needJade = auctionItem.BasePrice;
|
| | | }
|
| | | else
|
| | | {
|
| | | needJade = myAuction.BidderPrice + auctionItem.BiddingAdd;
|
| | | }
|
| | | m_JadeNumber.text = (needJade).ToString();
|
| | | m_JadeNumber1.text = auctionItem.BuyoutPrice.ToString();
|
| | | m_PriceButton.SetListener(() => //一口价
|
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + auctionItem.BuyoutPrice + "立即拍下商品?";
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (jade >= auctionItem.BuyoutPrice)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(GUIID, auctionItem.BuyoutPrice);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | });
|
| | | });
|
| | | m_JadeNumber2.text = (needJade).ToString();
|
| | | m_BiddingButton.SetListener(() => //竞价
|
| | | {
|
| | | int jade = (int)PlayerDatas.Instance.baseData.diamond;
|
| | | string str = "是否花费" + needJade + "参与竞价?";
|
| | | ConfirmCancel.ShowPopConfirm(Language.Get("L1003"), str, (bool isOk) => {
|
| | | if (jade >= needJade)
|
| | | {
|
| | | AuctionInquiry.Instance.SendSellAuctionItem(GUIID, needJade);
|
| | | }
|
| | | else
|
| | | {
|
| | | WindowCenter.Instance.Open<RechargeTipWin>();
|
| | | }
|
| | | });
|
| | |
|
| | | });
|
| | | }
|
| | | private void LateUpdate()
|
| | | {
|
| | | if (AuctionItem != null && MyFocusItem != null)
|
| | | {
|
| | | var timeNow = TimeUtility.ServerNow;
|
| | | TimeSpan timeSpan = timeNow - MyFocusItem.Time;
|
| | | int minute = (int)timeSpan.TotalMinutes;
|
| | | if (minute < AuctionItem.NoticeSaleMinutes)//预热中
|
| | | {
|
| | | if (m_PriceButton.interactable)
|
| | | {
|
| | | m_PriceButton.interactable = false;
|
| | | m_PriceImage.gray = true;
|
| | | }
|
| | | if (m_BiddingButton.interactable)
|
| | | {
|
| | | m_BiddingButton.interactable = false;
|
| | | m_BiddingImage.gray = true;
|
| | | }
|
| | | int seconds = AuctionItem.NoticeSaleMinutes * 60 - (int)timeSpan.TotalSeconds;
|
| | | m_TimeText.text = TimeUtility.SecondsToHMS(seconds) + "后开始";
|
| | | }
|
| | | else if (minute >= AuctionItem.NoticeSaleMinutes && minute <= AuctionItem.FamilySaleMinutes)//拍卖中
|
| | | {
|
| | | if (!m_PriceButton.interactable || m_PriceImage.gray)
|
| | | {
|
| | | m_PriceButton.interactable = true;
|
| | | m_PriceImage.gray = false;
|
| | | }
|
| | | if (!m_BiddingButton.interactable || m_BiddingImage.gray)
|
| | | {
|
| | | m_BiddingButton.interactable = true;
|
| | | m_BiddingImage.gray = false;
|
| | | }
|
| | | int seconds = AuctionItem.FamilySaleMinutes * 60 - ((int)timeSpan.TotalSeconds - AuctionItem.NoticeSaleMinutes * 60);
|
| | | m_TimeText.text = "剩余" + TimeUtility.SecondsToHMS(seconds);
|
| | | }
|
| | | }
|
| | | } |
| | | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: a55422d4cf1e9dd4cbe928a895f933f4 |
| | | timeCreated: 1551779106 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Tuesday, March 05, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | namespace Snxxz.UI
|
| | | { |
| | | //我的关注物品详情 |
| | | public class MyFocusWin : Window |
| | | {
|
| | | [SerializeField] ScrollerController m_ScrollerController;
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } }
|
| | | List<AuctionItemClass> MyFocusList = new List<AuctionItemClass>(); |
| | | #region Built-in |
| | | protected override void BindController() |
| | | {
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell; |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | {
|
| | | AuctionInquiry.Instance.SendQueryAttentionAuctionItem();//查询拍卖行的关注物品
|
| | | GetMyFocusList(); |
| | | ListSotr();
|
| | | OnCreateGridLineCell(m_ScrollerController); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | model.AttentionAuctionItemUdate += Reset; |
| | | model.ClearAuctionUpdate += Reset;
|
| | | model.RefreshAuctionItemUpdate -= Update;//刷新 |
| | | model.FamilyAuctionItemUpdate += Reset; |
| | | }
|
| | |
|
| | |
|
| | |
|
| | | protected override void OnPreClose() |
| | | {
|
| | | model.AttentionAuctionItemUdate -= Reset;
|
| | | model.ClearAuctionUpdate -= Reset;
|
| | | model.RefreshAuctionItemUpdate -= Update;//刷新
|
| | | model.FamilyAuctionItemUpdate -= Reset; |
| | | }
|
| | |
|
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | | #endregion |
| | |
|
| | | private void Reset()
|
| | | {
|
| | | GetMyFocusList(); |
| | | ListSotr();
|
| | | OnCreateGridLineCell(m_ScrollerController);
|
| | | }
|
| | | private void Update()
|
| | | {
|
| | | m_ScrollerController.m_Scorller.RefreshActiveCellViews();//刷新可见
|
| | | } |
| | | private void OnCreateGridLineCell(ScrollerController gridCtrl)
|
| | | {
|
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i < MyFocusList.Count; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | | gridCtrl.Restart();
|
| | | }
|
| | | private void OnRefreshGridCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | int index = cell.index;
|
| | | var ItemGUID = MyFocusList[index].ItemGUID;
|
| | | MyFocusCell myAuctionCell = cell.GetComponent<MyFocusCell>();
|
| | | myAuctionCell.GetMyFocusGUID(ItemGUID);
|
| | | }
|
| | |
|
| | | private void GetMyFocusList()
|
| | | {
|
| | | MyFocusList.Clear();
|
| | | foreach (var value in model.AttentionAuctionItemDic.Values)
|
| | | {
|
| | | MyFocusList.Add(value);
|
| | | }
|
| | | int playerID = (int)PlayerDatas.Instance.baseData.PlayerID;
|
| | | foreach (var value in model.FamilyAuctionItemDic.Values)
|
| | | {
|
| | | if (model.AttentionAuctionItemIDdic.ContainsKey(value.ItemID))
|
| | | {
|
| | | MyFocusList.Add(value);
|
| | | }
|
| | | }
|
| | | }
|
| | | private void ListSotr()
|
| | | {
|
| | | MyFocusList.Sort(Compare);
|
| | | }
|
| | | int Compare(AuctionItemClass x, AuctionItemClass y)//数组排列
|
| | | {
|
| | | bool havex = IsHighestPrice(x.ItemGUID);
|
| | | bool havey = IsHighestPrice(y.ItemGUID);
|
| | | if (havex.CompareTo(havey) != 0)//是否最高价
|
| | | {
|
| | | return -havex.CompareTo(havey);
|
| | | }
|
| | | bool havex1 = IsParticipate(x.ItemGUID);
|
| | | bool havey1 = IsParticipate(y.ItemGUID);
|
| | | if (havex1.CompareTo(havey1) != 0)//是否参与
|
| | | {
|
| | | return -havex1.CompareTo(havey1);
|
| | | }
|
| | | bool havex2 = IsAttention(x.ItemID);
|
| | | bool havey2 = IsAttention(y.ItemID);
|
| | | if (havex2.CompareTo(havey2) != 0)//是否关注
|
| | | {
|
| | | return -havex2.CompareTo(havey2);
|
| | | }
|
| | | int havex3 = TimeSort(x);
|
| | | int havey3 = TimeSort(y);
|
| | | if (havex3.CompareTo(havey3) != 0)//时间排序
|
| | | {
|
| | | return -havex3.CompareTo(havey3);
|
| | | }
|
| | | return 1;
|
| | | }
|
| | |
|
| | | private bool IsHighestPrice(string GUID)
|
| | | {
|
| | | bool isBool = false;
|
| | | int playerId = (int)PlayerDatas.Instance.baseData.PlayerID;
|
| | | if (model.BiddingItemInfoDic.ContainsKey(GUID))
|
| | | {
|
| | | var biddingItemInfo = model.BiddingItemInfoDic[GUID];
|
| | | isBool = biddingItemInfo.BidderID == playerId;
|
| | | }
|
| | | return isBool;
|
| | | }
|
| | |
|
| | | private bool IsParticipate(string GUID)
|
| | | {
|
| | | bool isBool = false;
|
| | | if (model.BiddingItemInfoDic.ContainsKey(GUID))
|
| | | {
|
| | | isBool = true;
|
| | | }
|
| | | return isBool;
|
| | | } |
| | | private bool IsAttention(int itemId)
|
| | | {
|
| | | bool isBool = false;
|
| | | if (model.AttentionAuctionItemIDdic.ContainsKey(itemId))
|
| | | {
|
| | | isBool = true;
|
| | | }
|
| | | return isBool;
|
| | | } |
| | | private int TimeSort(AuctionItemClass auctionItemClass)
|
| | | {
|
| | | int scends = 0;
|
| | | var auctionItem = AuctionItemConfig.Get(auctionItemClass.ItemID);
|
| | | if (auctionItem == null)
|
| | | {
|
| | | return 0;
|
| | | }
|
| | | var timeNow = TimeUtility.ServerNow;
|
| | | TimeSpan timeSpan = timeNow - auctionItemClass.Time;
|
| | | scends = (int)timeSpan.TotalSeconds;
|
| | | return scends;
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: 41c604d9f27d5954eadc6a3ad9bd02a6 |
| | | timeCreated: 1551777906 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| New file |
| | |
| | | //-------------------------------------------------------- |
| | | // [Author]: 第二世界 |
| | | // [ Date ]: Monday, March 04, 2019 |
| | | //-------------------------------------------------------- |
| | | |
| | | using System; |
| | | using System.Collections; |
| | | using System.Collections.Generic; |
| | | using UnityEngine; |
| | | using UnityEngine.UI; |
| | | |
| | | //成交记录 |
| | | namespace Snxxz.UI
|
| | | { |
| | | |
| | | public class TransactionRecordWin : Window |
| | | {
|
| | | [SerializeField] ScrollerController m_ScrollerController;
|
| | | [SerializeField] ScrollerController m_ScrollerControllerType; |
| | | [SerializeField] Button m_ClosButton; |
| | | [SerializeField] GameObject m_TypeTip; |
| | | [SerializeField] Text m_TypeText; |
| | | [SerializeField] Button m_TypeButon;
|
| | | [SerializeField] GameObject m_TextObj;
|
| | | AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
|
| | | AuctionHelpModel auctionHelpModel { get { return ModelCenter.Instance.GetModel<AuctionHelpModel>(); } } |
| | | private List<AuctionItemClass> AuctionRecordList = new List<AuctionItemClass>(); |
| | | int AuctionType = 0; |
| | | #region Built-in |
| | | protected override void BindController() |
| | | {
|
| | | m_ScrollerController.OnRefreshCell += OnRefreshGridCell; |
| | | m_ScrollerControllerType.OnRefreshCell += OnRefreshGridCellType;
|
| | | m_ScrollerController.lockType = EnhanceLockType.KeepVertical; |
| | | AuctionInquiry.Instance.SendQueryAuctionRecord(0);//查询拍卖记录 |
| | | } |
| | | |
| | | protected override void AddListeners() |
| | | { |
| | | m_ClosButton.AddListener(() =>
|
| | | {
|
| | | CloseImmediately();
|
| | | }); |
| | | m_TypeButon.AddListener(() =>
|
| | | {
|
| | | if (!m_TypeTip.activeSelf)
|
| | | {
|
| | | m_TypeTip.SetActive(true);
|
| | | }
|
| | | }); |
| | | } |
| | | |
| | | protected override void OnPreOpen() |
| | | { |
| | | AuctionType = 0; |
| | | if (m_TypeTip.activeSelf)
|
| | | {
|
| | | m_TypeTip.SetActive(false);
|
| | | } |
| | | m_TypeText.text = GetTextName(AuctionType); |
| | | OnCreateGridTypeCell(m_ScrollerControllerType); |
| | | OnCreateGridCell(m_ScrollerController); |
| | | } |
| | | |
| | | protected override void OnAfterOpen() |
| | | { |
| | | model.PlayerAuctionRecordUpdate += PlayerAuctionRecordUpdate; |
| | | } |
| | | |
| | | protected override void OnPreClose() |
| | | {
|
| | | model.PlayerAuctionRecordUpdate -= PlayerAuctionRecordUpdate; |
| | | }
|
| | |
|
| | |
|
| | |
|
| | | protected override void OnAfterClose() |
| | | { |
| | | }
|
| | | #endregion |
| | | private void PlayerAuctionRecordUpdate()
|
| | | {
|
| | | OnCreateGridCell(m_ScrollerController);
|
| | | } |
| | | private void OnCreateGridCell(ScrollerController gridCtrl)
|
| | | {
|
| | | GetAuctionRecordList();
|
| | | if (AuctionRecordList.Count > 0)
|
| | | {
|
| | | m_TextObj.SetActive(false);
|
| | | }
|
| | | else
|
| | | {
|
| | | m_TextObj.SetActive(true);
|
| | | }
|
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i < AuctionRecordList.Count; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | | gridCtrl.Restart();
|
| | | } |
| | | private void OnRefreshGridCell(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | int index = cell.index;
|
| | | var auctionRecord = AuctionRecordList[index];
|
| | | var itemConfig = ItemConfig.Get(auctionRecord.ItemID);
|
| | | if (itemConfig == null)
|
| | | {
|
| | | DebugEx.LogError("物品表没有找到该物品,物品ID为" + auctionRecord.ItemID);
|
| | | return;
|
| | | }
|
| | | ItemCell itemCell = cell.transform.Find("ItemCell1").GetComponent<ItemCell>();
|
| | | Text textName = cell.transform.Find("ItemName").GetComponent<Text>();
|
| | | Text transactionStatusText = cell.transform.Find("TransactionStatusText").GetComponent<Text>();
|
| | | Text timeText = cell.transform.Find("TimeText").GetComponent<Text>();
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, true, (ulong)1, itemConfig.BindType);
|
| | | itemCell.Init(cellModel);
|
| | | textName.text = itemConfig.ItemName;
|
| | | transactionStatusText.text = GetRecordResultName(auctionRecord.RecordResult);
|
| | | timeText.text = auctionRecord.TimeStr;
|
| | | }
|
| | |
|
| | | private void OnCreateGridTypeCell(ScrollerController gridCtrl)
|
| | | {
|
| | |
|
| | | gridCtrl.Refresh();
|
| | | for (int i = 0; i < 3; i++)
|
| | | {
|
| | | gridCtrl.AddCell(ScrollerDataType.Header, i);
|
| | | }
|
| | | gridCtrl.Restart();
|
| | | }
|
| | | private void OnRefreshGridCellType(ScrollerDataType type, CellView cell)
|
| | | {
|
| | | int idnex = cell.index;
|
| | | Text textName = cell.transform.Find("Text").GetComponent<Text>();
|
| | | Button button = cell.GetComponent<Button>();
|
| | | textName.text = GetTextName(idnex);
|
| | | button.SetListener(() =>
|
| | | {
|
| | | if (idnex != AuctionType)
|
| | | {
|
| | | AuctionType = idnex;
|
| | | AuctionInquiry.Instance.SendQueryAuctionRecord(idnex);//查询拍卖记录
|
| | | m_TypeTip.SetActive(false);
|
| | | OnCreateGridCell(m_ScrollerController);
|
| | | m_TypeText.text = GetTextName(AuctionType);
|
| | | }
|
| | | });
|
| | | } |
| | | |
| | | private string GetTextName(int index)
|
| | | {
|
| | | string str = string.Empty;
|
| | | switch (index)
|
| | | {
|
| | | case 0:
|
| | | str = "我的拍品";
|
| | | break;
|
| | | case 1:
|
| | | str = "仙盟拍品";
|
| | | break;
|
| | | case 2:
|
| | | str = "我的竞拍";
|
| | | break;
|
| | | }
|
| | | return str;
|
| | | } |
| | | |
| | | private string GetRecordResultName(int index)
|
| | | {
|
| | | string str = string.Empty;
|
| | | switch (index)
|
| | | {
|
| | | case 0:
|
| | | str = "流拍";
|
| | | break;
|
| | | case 1:
|
| | | str = "拍卖成交";
|
| | | break;
|
| | | case 2:
|
| | | str = "回收";
|
| | | break;
|
| | | case 3:
|
| | | str = "竞价成功";
|
| | | break;
|
| | | case 4:
|
| | | str = "竞价失败";
|
| | | break;
|
| | |
|
| | | }
|
| | | return str;
|
| | | } |
| | | private void GetAuctionRecordList()
|
| | | {
|
| | | AuctionRecordList.Clear();
|
| | | foreach (var value in model.PlayerAuctionRecordDic.Values)
|
| | | {
|
| | | if (value.RecordType == AuctionType)
|
| | | {
|
| | | AuctionRecordList.Add(value);
|
| | | }
|
| | | }
|
| | | } |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | |
| | | |
| New file |
| | |
| | | fileFormatVersion: 2 |
| | | guid: e609e4928fc1e6c46a6dbe1e6f9cdb0b |
| | | timeCreated: 1551671277 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | | defaultReferences: [] |
| | | executionOrder: 0 |
| | | icon: {instanceID: 0} |
| | | userData: |
| | | assetBundleName: |
| | | assetBundleVariant: |
| | |
| | | return count;
|
| | | }
|
| | |
|
| | | public int GetAllGemsLevel()
|
| | | {
|
| | | var level = 0;
|
| | | foreach (var key in m_EquipGems.Keys)
|
| | | {
|
| | | var equipGems = m_EquipGems[key];
|
| | | foreach (var equipGem in equipGems)
|
| | | {
|
| | | var id = equipGem.id;
|
| | | if (id == 0)
|
| | | {
|
| | | continue;
|
| | | }
|
| | | var config = ItemConfig.Get(id);
|
| | | level += config != null ? config.EffectValueB1 : 0;
|
| | | }
|
| | | }
|
| | | return level;
|
| | | }
|
| | |
|
| | | public int Compare(string lhs, string rhs)
|
| | | {
|
| | | var lhsItem = packModel.GetItemByGuid(lhs);
|
| | |
| | | /// <param name="attrData"></param>
|
| | | public void SetBagTipsBtn(ItemAttrData attrData)
|
| | | {
|
| | | if (attrData == null) return;
|
| | |
|
| | | //if (attrData == null) return;
|
| | | //if (attrData == null) return;
|
| | | //var auctionHelpModel = ModelCenter.Instance.GetModel<AuctionHelpModel>();
|
| | | //auctionHelpModel.AttrData = attrData;
|
| | | //WindowCenter.Instance.Open<AuctionShelfWin>();
|
| | | //return;
|
| | | var horseModel = ModelCenter.Instance.GetModel<MountModel>();
|
| | | var petmodel = ModelCenter.Instance.GetModel<PetModel>();
|
| | | bool isOverdue = ItemLogicUtility.Instance.IsOverdue(attrData.guid, attrData.itemId, attrData.useDataDict);
|
| | |
| | | {
|
| | | gridCell.itemCellBtn.OnOneParaClick = (int info) =>
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, itemModel.guid, false, true);
|
| | | itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | if (itemModel.itemInfo.isBind!= 1)
|
| | | {
|
| | | AuctionHelpModel auctionHelpModel = ModelCenter.Instance.GetModel<AuctionHelpModel>();
|
| | | auctionHelpModel.ItemModel = itemModel;
|
| | | WindowCenter.Instance.Open<AuctionShelfWin>();
|
| | | }
|
| | | else
|
| | | {
|
| | | itemTipsModel.SetItemTipsModel(PackType.Item, itemModel.guid, false, true);
|
| | | itemTipsModel.SetBagTipsBtn(itemTipsModel.curAttrData);
|
| | | itemTipsModel.ShowUICtrl();
|
| | | }
|
| | | |
| | | };
|
| | | }
|
| | |
|
| | |
| | | fileFormatVersion: 2 |
| | | guid: 35473b2a6cd5171499a434642f1712a8 |
| | | timeCreated: 1516008186 |
| | | timeCreated: 1552035262 |
| | | licenseType: Pro |
| | | MonoImporter: |
| | | serializedVersion: 2 |
| | |
| | | void MarketButton()//市场按钮
|
| | | {
|
| | | WindowCenter.Instance.Close<MainInterfaceWin>();
|
| | | WindowCenter.Instance.Open<MarketWin>();
|
| | | WindowCenter.Instance.Open<AuctionHouseWin>();
|
| | | }
|
| | |
|
| | | void OpenService()//开服活动
|
| | |
| | | [SerializeField] DogzNotifyBehaviour m_DogzNotifyBehaviour;
|
| | | [SerializeField] InSevenDayBehavior m_InSevenDayBehavior;
|
| | | [SerializeField] FBHelpPointExchageNotify m_HelpPointExchangeNotify;
|
| | | [SerializeField] MyFocusBehavior m_MyFocusBehavio;
|
| | |
|
| | | WorldBossModel worldBossModel { get { return ModelCenter.Instance.GetModel<WorldBossModel>(); } }
|
| | | BossHomeModel bossHomeModel { get { return ModelCenter.Instance.GetModel<BossHomeModel>(); } }
|
| | |
| | | CheckDogzNotify();
|
| | | InSevenDayShow();
|
| | | CheckHelpPointExchange();
|
| | | m_MyFocusBehavio.Init();
|
| | | exchageModel.UpdateHelpPointShopEvent += CheckHelpPointExchange;
|
| | | playerPack.RefreshDecomAttrAct += CheckEquipDecompose;
|
| | | betterEquipGetModel.showEquipRefreshEvent += CheckBetterEquip;
|
| | |
| | |
|
| | | public void UnInit()
|
| | | {
|
| | | m_MyFocusBehavio.Unit();
|
| | | fairyGrabBossModel.helpCoolDown = false;
|
| | | exchageModel.UpdateHelpPointShopEvent -= CheckHelpPointExchange;
|
| | | playerPack.RefreshDecomAttrAct -= CheckEquipDecompose;
|
| | |
| | |
|
| | | void DownButton(GameObject go)
|
| | | {
|
| | | |
| | | _ExpRate.gameObject.SetActive(true);
|
| | | }
|
| | |
|
| | |
| | | get { return _playerPack ?? (_playerPack = ModelCenter.Instance.GetModel<PackModel>()); }
|
| | | }
|
| | |
|
| | | EquipGemModel equipGemModel { get { return ModelCenter.Instance.GetModel<EquipGemModel>(); } }
|
| | |
|
| | | [SerializeField] Image funcImg;
|
| | | [SerializeField] Text targetFightPowerTxt;
|
| | | [SerializeField] Text selfFightPowerTxt;
|
| | |
| | | break;
|
| | | case FuncPowerType.Stone:
|
| | | targetValue = GetAllStoneLv(viewPlayerData.rolePlusData.GetAllEquipStone());
|
| | | selfValue = GetAllStoneLv(PlayerStoneData.Instance.GetAllStone());
|
| | | selfValue = equipGemModel.GetAllGemsLevel();
|
| | | break;
|
| | | case FuncPowerType.Suit:
|
| | | handled = true;
|
| | |
| | | {
|
| | | ParseConfig();
|
| | | playerPack.refreshItemCountEvent += RefreshItemCountAct;
|
| | | PlayerStoneData.OnRefreshStoneData += OnRefreshStoneData;
|
| | | MountModel.Event_MountHA301A += OnRefreshMountData;
|
| | | PetModel.Event_H0704Add += OnRefreshPetData;
|
| | | PetModel.Event_H0704Update += OnRefreshPetData;
|
| | |
| | |
|
| | | public void RefreshData()
|
| | | {
|
| | | GetAllStoneLv();
|
| | | GetWashCntDic();
|
| | | GetPetCntDic();
|
| | | GetMountCntDic();
|
| | |
| | | }
|
| | | _count = totalLv >= _tatalLv ? _runeHoleDatas.Count : 0;
|
| | | return totalLv >= _tatalLv;
|
| | | }
|
| | | #endregion
|
| | |
|
| | | #region 宝石
|
| | | private void OnRefreshStoneData()
|
| | | {
|
| | | GetAllStoneLv();
|
| | | }
|
| | | private int m_AllStoneLv = 0;
|
| | | public int allStoneLv
|
| | | {
|
| | | get { return m_AllStoneLv; }
|
| | | }
|
| | | private void GetAllStoneLv()
|
| | | {
|
| | | m_AllStoneLv = 0;
|
| | | var dict = PlayerStoneData.Instance.GetAllStone();
|
| | | foreach (uint[] array in dict.Values)
|
| | | {
|
| | | if (array == null || array.Length == 0) continue;
|
| | | for (int i = 0; i < array.Length; i++)
|
| | | {
|
| | | if (array[i] == 0) continue;
|
| | | ItemConfig _tagChinItemModel = ItemConfig.Get((int)array[i]);
|
| | | if (_tagChinItemModel == null) continue;
|
| | | m_AllStoneLv += _tagChinItemModel.EffectValueB1;
|
| | | }
|
| | | }
|
| | | }
|
| | | #endregion
|
| | |
|
| | |
| | | { |
| | | int Type = GameDefineIndex(EquippedWith); |
| | | ItemPlusConfig _tagItemPlue = ItemPlusConfig.GetTypeAndGrade(Type, EquipmentLevel); |
| | | if (_tagItemPlue == null)
|
| | | {
|
| | | return;
|
| | | } |
| | | if (DicEquip.ContainsKey(EquippedWith)) |
| | | { |
| | | DicEquip[EquippedWith].CurrentLevel = EquipmentLevel; |
| | |
| | | }
|
| | | if (!WindowCenter.Instance.IsOpen<MessageWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<MessageWin>();
|
| | | WindowCenter.Instance.Open<MessageWin>(true);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | }
|
| | | if (!WindowCenter.Instance.IsOpen<MessageWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<MessageWin>();
|
| | | WindowCenter.Instance.Open<MessageWin>(true);
|
| | | }
|
| | | }
|
| | |
|
| | |
| | | requireOpenGM = true;
|
| | | if (!WindowCenter.Instance.IsOpen<MessageWin>())
|
| | | {
|
| | | WindowCenter.Instance.Open<MessageWin>();
|
| | | WindowCenter.Instance.Open<MessageWin>(true);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | RegisterModel<EquipStarModel>();
|
| | | RegisterModel<TreasureSkillModel>();
|
| | | RegisterModel<EquipGemModel>();
|
| | | RegisterModel<AuctionInquiryModel>();
|
| | | RegisterModel<AuctionHelpModel>();
|
| | | inited = true;
|
| | | }
|
| | |
|
| | |
| | | priorTasks.Add(new ConfigInitTask("DirtyWordConfig", () => { DirtyWordConfig.Init(); }, () => { return DirtyWordConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("CreateRoleConfig", () => { CreateRoleConfig.Init(); }, () => { return CreateRoleConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("JobSetupConfig", () => { JobSetupConfig.Init(); }, () => { return JobSetupConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("ModelResConfig", () => { ModelResConfig.Init(); }, () => { return ModelResConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("GodWeaponConfig", () => { GodWeaponConfig.Init(); }, () => { return GodWeaponConfig.inited; }));
|
| | | priorTasks.Add(new ConfigInitTask("ModelResConfig", () => { ModelResConfig.Init(); }, () => { return ModelResConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("GodWeaponConfig", () => { GodWeaponConfig.Init(); }, () => { return GodWeaponConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("GodWeaponEffectConfig", () => { GodWeaponEffectConfig.Init(); }, () => { return GodWeaponEffectConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("TASKINFOConfig", () => { TASKINFOConfig.Init(); }, () => { return TASKINFOConfig.inited; })); |
| | | priorTasks.Add(new ConfigInitTask("mapnpcConfig", () => { mapnpcConfig.Init(); }, () => { return mapnpcConfig.inited; })); |
| | |
| | | normalTasks.Add(new ConfigInitTask("XMZZAchievementConfig", () => { XMZZAchievementConfig.Init(); }, () => { return XMZZAchievementConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("CrossRealmPKOrderAwardConfig", () => { CrossRealmPKOrderAwardConfig.Init(); }, () => { return CrossRealmPKOrderAwardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DungeonMixServerStateTimeConfig", () => { DungeonMixServerStateTimeConfig.Init(); }, () => { return DungeonMixServerStateTimeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("DailyQuestMixServerStateTimeConfig", () => { DailyQuestMixServerStateTimeConfig.Init(); }, () => { return DailyQuestMixServerStateTimeConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("CrossRealmPKDanAwardConfig", () => { CrossRealmPKDanAwardConfig.Init(); }, () => { return CrossRealmPKDanAwardConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("CrossServerOneVsOneRobotConfig", () => { CrossServerOneVsOneRobotConfig.Init(); }, () => { return CrossServerOneVsOneRobotConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("EquipPlaceMapConfig", () => { EquipPlaceMapConfig.Init(); }, () => { return EquipPlaceMapConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("EquipControlConfig", () => { EquipControlConfig.Init(); }, () => { return EquipControlConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("EquipSuitConfig", () => { EquipSuitConfig.Init(); }, () => { return EquipSuitConfig.inited; }));
|
| | | normalTasks.Add(new ConfigInitTask("DailyQuestMixServerStateTimeConfig", () => { DailyQuestMixServerStateTimeConfig.Init(); }, () => { return DailyQuestMixServerStateTimeConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("CrossRealmPKDanAwardConfig", () => { CrossRealmPKDanAwardConfig.Init(); }, () => { return CrossRealmPKDanAwardConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("CrossServerOneVsOneRobotConfig", () => { CrossServerOneVsOneRobotConfig.Init(); }, () => { return CrossServerOneVsOneRobotConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AuctionConfig", () => { AuctionConfig.Init(); }, () => { return AuctionConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AuctionItemConfig", () => { AuctionItemConfig.Init(); }, () => { return AuctionItemConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("AuctionIndexConfig", () => { AuctionIndexConfig.Init(); }, () => { return AuctionIndexConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipPlaceMapConfig", () => { EquipPlaceMapConfig.Init(); }, () => { return EquipPlaceMapConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipControlConfig", () => { EquipControlConfig.Init(); }, () => { return EquipControlConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipSuitConfig", () => { EquipSuitConfig.Init(); }, () => { return EquipSuitConfig.inited; })); |
| | | normalTasks.Add(new ConfigInitTask("EquipStarConfig", () => { EquipStarConfig.Init(); }, () => { return EquipStarConfig.inited; })); |
| | | } |
| | | |
| | |
| | | { |
| | | case "ItemConfig": |
| | | ItemConfig.GemItemInit(); |
| | | break;
|
| | | break; |
| | | case "SkillConfig": |
| | | SkillConfig.SkillClassifingInit();
|
| | | SkillConfig.SkillClassifingInit(); |
| | | break; |
| | | case "FuncConfigConfig": |
| | | GeneralDefine.Init(); |