From f649c851a1c7107709f65affeb0cd76790b0ef43 Mon Sep 17 00:00:00 2001
From: client_Zxw <826696702@qq.com>
Date: 星期三, 06 三月 2019 11:45:58 +0800
Subject: [PATCH] 6251 子 【开发】【2.0】拍卖行开发单
---
System/Auction/AuctionHelpModel.cs | 120 ++++++-----------------------------------------------------
1 files changed, 13 insertions(+), 107 deletions(-)
diff --git a/System/Auction/AuctionHelpModel.cs b/System/Auction/AuctionHelpModel.cs
index 317730c..60221c0 100644
--- a/System/Auction/AuctionHelpModel.cs
+++ b/System/Auction/AuctionHelpModel.cs
@@ -21,8 +21,7 @@
public class AuctionHelpModel : Model, IBeforePlayerDataInitialize, IPlayerLoginOk
{
public List<AuctionConfig> FullServiceAuctionList = new List<AuctionConfig>();//鍏ㄦ湇鎷嶅崠鍒楄〃
- public List<AuctionConfig> FamilyAuctionList = new List<AuctionConfig>();//浠欑洘鎷嶅崠鍒楄〃
- public Dictionary<int, AuctionConfigClass> FullServiceAuctionDic = new Dictionary<int, AuctionConfigClass>();//鍏ㄦ湇鎷嶅崠璁板綍
+ public Dictionary<int, AuctionConfigClass> FullServiceAuctionDic = new Dictionary<int, AuctionConfigClass>();//鍏ㄦ湇鎷嶅崠閫夋嫨璁板綍
public List<AuctionItemConfig> AuctionItemList = new List<AuctionItemConfig>();//鎷嶅崠鐗╁搧琛�
AuctionInquiryModel model { get { return ModelCenter.Instance.GetModel<AuctionInquiryModel>(); } }
private bool wait = true;
@@ -56,124 +55,31 @@
GlobalTimeEvent.Instance.secondEvent += secondEvent;
}
-
+
public override void UnInit()
{
}
- private void GetAuctionList()//鑾峰彇鎷嶅崠鍒楄〃
+ private void GetAuctionList()//鍏ㄦ湇鑾峰彇鎷嶅崠鍒楄〃
{
- FullServiceAuctionList.Clear();
- FamilyAuctionList.Clear();
FullServiceAuctionDic.Clear();
var config = AuctionConfig.GetValues();
foreach (var value in config)
{
- if (value.Type == 1)
+ FullServiceAuctionList.Add(value);
+ if (!FullServiceAuctionDic.ContainsKey(value.Id))
{
- FullServiceAuctionList.Add(value);
- if (!FullServiceAuctionDic.ContainsKey(value.Sort))
- {
- 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.Sort, AuctionConfig);
- }
+ 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);
}
- else if (value.Type == 2)
- {
- FamilyAuctionList.Add(value);
- }
+ }
- }
- }
-
- public int GetConfigIndex(int job, int[] typeIdlist)
- {
- int index = 0;
- if (!FullServiceAuctionDic.ContainsKey(selectedGenreNow))
- {
- return index;
- }
- var fullServiceAuction = FullServiceAuctionDic[selectedGenreNow];
- if (job == 0 && typeIdlist.Length >= 3)
- {
- index = 0;
- return index;
- }
- if (fullServiceAuction.JobTipBool && fullServiceAuction.TypeTipBool)
- {
- if (job == 0 && typeIdlist.Length == 2)
- {
- for (int i = 0; i < fullServiceAuction.Config.QueryTypeJob1.Length; i++)
- {
- int type1 = fullServiceAuction.Config.QueryTypeJob1[i];
- for (int j = 0; job < typeIdlist.Length; j++)
- {
- int type2 = typeIdlist[j];
- if (type1 == type2)
- {
- index = i;
- }
- }
- }
- }
- else
- {
- if (job == 1)
- {
- for (int i = 0; i < fullServiceAuction.Config.QueryTypeJob1.Length; i++)
- {
- int type1 = fullServiceAuction.Config.QueryTypeJob1[i];
- for (int j = 0; job < typeIdlist.Length; j++)
- {
- int type2 = typeIdlist[j];
- if (type1 == type2)
- {
- index = i;
- }
- }
- }
- }
- else if (job == 2)
- {
- for (int i = 0; i < fullServiceAuction.Config.QueryTypeJob2.Length; i++)
- {
- int type1 = fullServiceAuction.Config.QueryTypeJob2[i];
- for (int j = 0; job < typeIdlist.Length; j++)
- {
- int type2 = typeIdlist[j];
- if (type1 == type2)
- {
- index = i;
- }
- }
- }
- }
- }
- return index;
- }
- if (!fullServiceAuction.JobTipBool)
- {
- for (int i = 0; i < fullServiceAuction.Config.QueryType.Length; i++)
- {
- int type1 = fullServiceAuction.Config.QueryType[i];
- for (int j = 0; job < typeIdlist.Length; j++)
- {
- int type2 = typeIdlist[j];
- if (type1 == type2)
- {
- index = i;
- }
- }
- }
- return index;
- }
- return index;
}
private void secondEvent()
--
Gitblit v1.8.0