| | |
| | | [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>(); |
| | | private List<AuctionItem> AuctionRecordList = new List<AuctionItem>(); |
| | | ItemTipsModel itemTipsModel { get { return ModelCenter.Instance.GetModel<ItemTipsModel>(); } } |
| | | int AuctionType = 0; |
| | | int MaxCount = 0; |
| | |
| | | {
|
| | | int index = cell.index;
|
| | | var auctionRecord = AuctionRecordList[index];
|
| | | var itemConfig = ItemConfig.Get(auctionRecord.ItemID);
|
| | | var itemConfig = ItemConfig.Get(auctionRecord.itemId);
|
| | | if (itemConfig == null)
|
| | | {
|
| | | DebugEx.LogError("物品表没有找到该物品,物品ID为" + auctionRecord.ItemID);
|
| | | DebugEx.LogError("物品表没有找到该物品,物品ID为" + auctionRecord.itemId);
|
| | | return;
|
| | | }
|
| | | ItemCell itemCell = cell.transform.Find("ItemCell1").GetComponent<ItemCell>();
|
| | | Text textName = cell.transform.Find("ItemName").GetComponent<Text>();
|
| | | RichText transactionStatusText = cell.transform.Find("TransactionStatusText").GetComponent<RichText>();
|
| | | Text timeText = cell.transform.Find("TimeText").GetComponent<Text>();
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, true, (ulong)auctionRecord.ItemCount);
|
| | | ItemCellModel cellModel = new ItemCellModel(itemConfig.ID, true, (ulong)auctionRecord.itemCount);
|
| | |
|
| | | GameObject SuccessfulBiddingObj = cell.transform.Find("SuccessfulBiddingObj").gameObject;//竞拍成功(竞拍成功)
|
| | | TextEx SuccessfulBiddingText = cell.transform.Find("SuccessfulBiddingObj/SuccessfulBiddingText").GetComponent<TextEx>();
|
| | |
| | |
|
| | | GameObject AuctionFailedObj = cell.transform.Find("AuctionFailedObj").gameObject;//竞拍失败
|
| | | Text JadeMoney_1 = cell.transform.Find("AuctionFailedObj/JadeMoney").GetComponent<Text>();
|
| | | switch (auctionRecord.RecordResult)
|
| | | switch (auctionRecord.recordResult)
|
| | | {
|
| | | case 0://流拍
|
| | | transactionStatusText.gameObject.SetActive(true);
|
| | |
| | | SuccessfulBiddingObj.SetActive(true);
|
| | | transactionStatusText.gameObject.SetActive(false);
|
| | | AuctionFailedObj.SetActive(false);
|
| | | var name = UIHelper.ServerStringTrim(auctionRecord.BidderName);
|
| | | var name = UIHelper.ServerStringTrim(auctionRecord.biddingPlayerName);
|
| | | SuccessfulBiddingText.text = Language.Get("PMH_15", name);
|
| | | JadeMoney.text = auctionRecord.BidderPrice.ToString();
|
| | | JadeMoney.text = auctionRecord.biddingPrice.ToString();
|
| | | break;
|
| | | case 2://回收
|
| | | transactionStatusText.gameObject.SetActive(true);
|
| | |
| | | AuctionFailedObj.SetActive(false);
|
| | | string strName = string.Empty;
|
| | | SuccessfulBiddingText.text = Language.Get("PMH_13");
|
| | | JadeMoney.text = auctionRecord.BidderPrice.ToString();
|
| | | JadeMoney.text = auctionRecord.biddingPrice.ToString();
|
| | | break;
|
| | | case 4://竞价失败
|
| | | AuctionFailedObj.SetActive(true);
|
| | | SuccessfulBiddingObj.SetActive(false);
|
| | | transactionStatusText.gameObject.SetActive(false);
|
| | | JadeMoney_1.text = auctionRecord.BidderPrice.ToString();
|
| | | JadeMoney_1.text = auctionRecord.biddingPrice.ToString();
|
| | | break;
|
| | | case 5://仙盟流拍到全服
|
| | | transactionStatusText.gameObject.SetActive(true);
|
| | |
| | | itemCell.Init(cellModel);
|
| | | itemCell.button.SetListener(() =>
|
| | | {
|
| | | ItemAttrData attrData = new ItemAttrData(itemConfig.ID, true, (ulong)auctionRecord.ItemCount);
|
| | | ItemAttrData attrData = new ItemAttrData(itemConfig.ID, true, (ulong)auctionRecord.itemCount);
|
| | | itemTipsModel.SetItemTipsModel(attrData);
|
| | | });
|
| | | textName.text = itemConfig.ItemName;
|
| | | timeText.text = auctionRecord.TimeStr;
|
| | | timeText.text = auctionRecord.putAwayTime.ToString("yyyy-MM-dd HH:mm:ss");
|
| | | }
|
| | |
|
| | | private void OnCreateGridTypeCell(ScrollerController gridCtrl)
|
| | |
| | | AuctionRecordList.Clear();
|
| | | foreach (var value in model.PlayerAuctionRecordDic.Values)
|
| | | {
|
| | | if (value.RecordType == AuctionType)
|
| | | if (value.recordType == AuctionType)
|
| | | {
|
| | | AuctionRecordList.Add(value);
|
| | | }
|
| | | }
|
| | | AuctionRecordList.Sort(Compare);
|
| | | } |
| | | int Compare(AuctionItemClass x, AuctionItemClass y)
|
| | | int Compare(AuctionItem x, AuctionItem y)
|
| | | {
|
| | | if (x.Time.CompareTo(y.Time) != 0)//根据时间排序
|
| | | if (x.putAwayTime.CompareTo(y.putAwayTime) != 0)//根据时间排序
|
| | | {
|
| | | return -x.Time.CompareTo(y.Time);
|
| | | return -x.putAwayTime.CompareTo(y.putAwayTime);
|
| | | }
|
| | | return 1;
|
| | | } |