Ejemplo n.º 1
0
    private void Preview(MarketItem data)
    {
        preview = data;
        int id = ItemEffectData.dataMap[ItemMaterialData.dataMap[data.resData.itemId].effectId].reward1[13];

        m_myself.PreviewWing(id);
        WingData      d     = WingData.dataMap.Get(id);
        WingLevelData ld    = d.GetLevelData(1);
        List <string> attrs = ld.GetPropertEffect();

        WingUIPreviewInMarketUILogicManager.Instance.SetTitle(LanguageData.GetContent(d.name));
        WingUIPreviewInMarketUILogicManager.Instance.SetTipAttr(attrs);
        WingUIPreviewInMarketUILogicManager.Instance.SetWingAttr(attrs);
        WingUIPreviewInMarketUILogicManager.Instance.SetUIDirty();
        MFUIManager.GetSingleton().SwitchUIWithLoad(MFUIManager.MFUIID.WingPreviewInMarketUI);
    }
Ejemplo n.º 2
0
    private void OpenTip(int idx)
    {
        WingGridData d = m_grids[idx];

        if (page == 0)
        {
            d = m_common[idx];
        }
        else if (page == 1)
        {
            d = m_magic[idx];
        }
        m_self.PreviewWing(d.wingId);
        WingData wd = WingData.dataMap.Get(d.wingId);

        tipData = wd;
        WingLevelData wld  = wd.GetLevelData(1);
        WingLevelData wnld = wd.GetLevelData(2);

        if (m_wings.ContainsKey(wd.id))
        {
            wld  = wd.GetLevelData(m_wings[wd.id].level);
            wnld = wd.GetLevelData(m_wings[wd.id].level + 1);
        }
        if (m_wings.ContainsKey(d.wingId))
        {
            WingUIViewManager.Instance.ShowTipUpgradeBtn(wd.type == 1);
            if (wd.type == 1)
            {
                WingUIViewManager.Instance.ShowTipBuyBtn(d.wingId != dressed);
            }
            else
            {
                WingUIViewManager.Instance.ShowTipBuyBtn(d.wingId != dressed && d.IsActive);
            }
            WingUIViewManager.Instance.SetBuyText(LanguageData.GetContent(47281));
        }
        else
        {
            WingUIViewManager.Instance.ShowTipUpgradeBtn(false);
            WingUIViewManager.Instance.ShowTipBuyBtn(false); //wd.type == 1);
            WingUIViewManager.Instance.SetBuyText(LanguageData.GetContent(1026));
        }
        WingUIViewManager.Instance.SetWingTipTitle(LanguageData.GetContent(wd.name));
        List <string>      attrs     = wld.GetPropertEffect();
        PropertyEffectData a         = wld.GetProperEffectData();
        List <string>      nextAttrs = null;

        if (wnld != null)
        {
            nextAttrs = wnld.GetPropertEffect();
        }
        for (int i = 0; i < attrs.Count; i++)
        {
            WingUIViewManager.Instance.SetWingTipAttrDescripe("", i);
            WingUIViewManager.Instance.SetWingTipCurAttr(attrs[i], i);
            if (nextAttrs != null)
            {
                WingUIViewManager.Instance.SetWingTipNextAttr(nextAttrs[i], i);
            }
            else
            {
                WingUIViewManager.Instance.SetWingTipNextAttr("", i);
            }
        }
    }