少年修仙传客户端代码仓库
client_Lhy
2019-06-22 320dcb4e5a7c9c60910ca0ad6ad7d45a465d0bef
4226 【2.0】【bug】橙装兑换仙盟活跃令二次确认弹窗错误
2个文件已修改
52 ■■■■■ 已修改文件
System/FairyAu/ExchangeActiveTokenModel.cs 15 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/ExchangeEquipCell.cs 37 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
System/FairyAu/ExchangeActiveTokenModel.cs
@@ -48,17 +48,18 @@
        {
            return false;
        }
        var equipGUID = m_EquipModel.GetEquip(new Int2(1, item.config.Type - 100));
        var equipGUID = m_EquipModel.GetEquip(new Int2(item.config.LV, item.config.EquipPlace));
        var equip = m_PackModel.GetItemByGuid(equipGUID);
        if(equip == null)
        if (equip == null)
        {
            return true;
        }
        if(equip.config.LV < item.config.LV)
        {
            return true;
        }
        if(equip.score < item.score)
        //if(equip.config.LV < item.config.LV)
        //{
        //    return true;
        //}
        if (equip.score < item.score)
        {
            return true;
        }
System/FairyAu/ExchangeEquipCell.cs
@@ -10,7 +10,7 @@
{
    [SerializeField] ItemCell m_ItemCell;
    [SerializeField] Image m_ChoseImg;
    [SerializeField] LongPressButton m_LongBtn;
    LongPressButton m_LongBtn;
    private ItemModel m_ItemModel;
    private ExchangeActiveTokenModel m_Model { get { return ModelCenter.Instance.GetModel<ExchangeActiveTokenModel>(); } }
    private DateTime m_PressTime;
@@ -39,34 +39,17 @@
                    m_ChoseImg.gameObject.SetActive(m_Model.ChoseEquips.Contains(m_ItemModel));
                });        
        });
        var et = m_ItemCell.button.gameObject.GetComponent<EventTrigger>();
        if(et == null)
        if(m_LongBtn == null)
        {
            et = m_ItemCell.button.gameObject.AddComponent<EventTrigger>();
            EventTrigger.Entry entry_1 = new EventTrigger.Entry();
            entry_1.eventID = EventTriggerType.PointerDown;
            entry_1.callback.AddListener((data) =>
            {
                m_IE_LongPress = PointLongPress();
                StartCoroutine(m_IE_LongPress);
            });
            et.triggers.Add(entry_1);
            m_LongBtn = m_ItemCell.itemIcon.AddMissingComponent<LongPressButton>();
        }
        m_LongBtn.onPress.RemoveAllListeners();
        m_LongBtn.onPress.AddListener(()=>ItemTipUtility.Show(m_ItemModel.guid, false));
        m_LongBtn.targetGraphic = m_ItemCell.itemIcon;
    }
    IEnumerator PointLongPress()
    {
        float time = 0;
        while (Input.GetMouseButton(0))
        {
            time += Time.deltaTime;
            if(time > 0.5f)
            {
                ItemTipUtility.Show(m_ItemModel.guid, false);
                break;
            }
            yield return 0;
        }
    }
}