| | |
| | | WindowCenter.Instance.Open<CommonGetItemWin>();
|
| | | }
|
| | |
|
| | | //通用显示获得的物品 和 更多的文本显示
|
| | | public void ShowGetItemRichText(List<Item> items, string info = "", int seconds = 3, string btnName = "", Action func = null, bool isNameShow = true, string eventName = "default")
|
| | | {
|
| | | if (getItemEventName != eventName)
|
| | | {
|
| | | if (WindowCenter.Instance.IsOpen<CommonGetItemRichTextWin>())
|
| | | WindowCenter.Instance.Close<CommonGetItemRichTextWin>();
|
| | |
|
| | | totalShowItems.Clear();
|
| | | getItemEventName = eventName;
|
| | | }
|
| | |
|
| | | //相同ID 合并数量显示
|
| | | for (int i = 0; i < items.Count; i++)
|
| | | {
|
| | | var id = items[i].id;
|
| | | if (totalShowItems.ContainsKey(id))
|
| | | {
|
| | | totalShowItems[id] = new Item(id, items[i].countEx + totalShowItems[id].countEx, items[i].bind, items[i].quality);
|
| | | }
|
| | | else
|
| | | {
|
| | | totalShowItems.Add(id, items[i]);
|
| | | }
|
| | | }
|
| | |
|
| | | getItemInfo = info;
|
| | | OnGetItem = func;
|
| | | if (btnName == "")
|
| | | btnName = Language.Get("PopConfirmWin_OK");
|
| | | getItemBtnText = btnName;
|
| | | closeSeconds = seconds;
|
| | | this.isNameShow = isNameShow;
|
| | | OnGetItemShowEvent?.Invoke();
|
| | | if (!WindowCenter.Instance.IsOpen<CommonGetItemRichTextWin>())
|
| | | WindowCenter.Instance.Open<CommonGetItemRichTextWin>();
|
| | | }
|
| | | |
| | |
|
| | | public void ClearGetItem()
|
| | | {
|
| | |
| | | mCTJGInfoClass.QuickAwardCount = info.QuickAwardCount;
|
| | | if (info.AwardType == 1)
|
| | | {
|
| | | string showStr = string.Empty;
|
| | | showStr += Language.Get("L2013", Language.Get("L2012"), info.Exp + (ulong)info.ExpPoint * Constants.ExpPointValue) + "</r>";
|
| | | List<Item> itemList = new List<Item>();
|
| | | itemList.Add(new Item()
|
| | | {
|
| | | id = GeneralDefine.expDisplayId,
|
| | | countEx = info.Exp + (ulong)info.ExpPoint * Constants.ExpPointValue,
|
| | | });
|
| | |
|
| | | for (int i = 0; i < info.MoneyLen; i++)
|
| | | {
|
| | | showStr += Language.Get("L2013", Language.Get("MoneyType_" + info.MoneyList[i].MoneyType), info.MoneyList[i].MoneyValue) + "</r>";
|
| | | itemList.Add(new Item()
|
| | | {
|
| | | id = GeneralDefine.moneyDisplayIds[info.MoneyList[i].MoneyType],
|
| | | countEx = info.MoneyList[i].MoneyValue,
|
| | | });
|
| | | }
|
| | |
|
| | | List<Item> itemList = new List<Item>();
|
| | | for (int i = 0; i < info.ItemLen; i++)
|
| | | {
|
| | | itemList.Add(new Item((int)info.ItemList[i].ItemID, info.ItemList[i].Count));
|
| | | }
|
| | |
|
| | | ItemLogicUtility.Instance.ShowGetItemRichText(itemList, showStr, 8);
|
| | | ItemLogicUtility.Instance.ShowGetItem(itemList, "", 0);
|
| | | }
|
| | | else
|
| | | {
|
| | |
| | | m_CloseBtn.AddListener(OnClickCloseButton);
|
| | | getBtn.AddListener(() =>
|
| | | {
|
| | | if (onHookModel.mCTJGInfoClass.Exp < 0)
|
| | | CloseClick();
|
| | | var seconds = TimeUtility.AllSeconds - onHookModel.startSeconds + onHookModel.mCTJGInfoClass.AwardSeconds;
|
| | | //时间太短不结算
|
| | | if (seconds < 65)
|
| | | return;
|
| | | onHookModel.GetAward(0);
|
| | | CloseClick();
|
| | | });
|
| | | buyBtn.AddListener(QuickBuy);
|
| | | }
|
| | |
| | | if (model.m_jumpAwardID == -1)
|
| | | return;
|
| | |
|
| | | if (model.quickGetAward)
|
| | | if (model.quickGetAward || PlayerDatas.Instance.baseData.LV > 100)
|
| | | {
|
| | | roleModel.GetCustomAward(model.m_jumpAwardID);
|
| | | m_AwardEffect.Play();
|