Exemple #1
0
    //public override void OnClick()
    //{
    //    SetSelect(!IsSelect, false);
    //    base.OnClick();
    //}

    public override void Release(bool depthRelease = true)
    {
        base.Release(depthRelease);
        if (null != m_baseGrid)
        {
            m_baseGrid.Release(false);
        }

        if (null != m_moneyIconCASD)
        {
            m_moneyIconCASD.Release(true);
        }

        if (null != m_propBorderCASD)
        {
            m_propBorderCASD.Release(true);
        }

        if (null != m_propIconCASD)
        {
            m_propIconCASD.Release(true);
        }

        compoundSelectData = null;
    }
Exemple #2
0
 /// <summary>
 /// 设置数据
 /// </summary>
 /// <param name="open"></param>
 /// <param name="data"></param>
 /// <param name="select"></param>
 /// <param name="freeGet"></param>
 public void SetData(bool open, EquipManager.CompoudSelectAttrData data = null, bool select = false, bool freeGet = true)
 {
     m_bSelect          = open && select;
     compoundSelectData = data;
     if (open)
     {
         OpenCard(false);
     }
     else
     {
         if (null != m_openAnim)
         {
             m_openAnim.ResetToBeginning();
         }
         UpdateCloseCostStatus(freeGet);
     }
 }
Exemple #3
0
    private void ShowResult()
    {
        GameCmd.stEquipComposeItemWorkUserCmd_CS compoundData = emgr.CompoundData;
        if (null == compoundData.index_info || compoundData.index_info.Count != cardArray.Length)
        {
            return;
        }

        table.EquipComposeDataBase equipComposeDB = DataManager.Manager <ItemManager>().GetLocalDataBase <table.EquipComposeDataBase>(compoundData.new_item);
        if (null == equipComposeDB)
        {
            return;
        }
        m_assistID      = equipComposeDB.assistId;
        m_assistNeedNum = equipComposeDB.assistNum;

        List <EquipManager.CompoudSelectAttrData> cardDatas = new List <EquipManager.CompoudSelectAttrData>();
        int replaceCoinNum = (int)DataManager.Manager <MallManager>().GetDQPriceByItem(m_assistID);

        List <GameCmd.PairNumber> attrs = null;
        bool isBind = false;

        GameCmd.PropIndexInfo tempIndexInfo = null;
        EquipManager.CompoudSelectAttrData tempSelectAttrData = null;;
        GameCmd.PairNumber             tempPair     = null;
        GameCmd.PropIndexInfo.PropPair tempPropPair = null;

        for (int i = 0, max = compoundData.index_info.Count; i < max; i++)
        {
            isBind                    = false;
            tempIndexInfo             = compoundData.index_info[i];
            tempSelectAttrData        = new EquipManager.CompoudSelectAttrData();
            tempSelectAttrData.Index  = tempIndexInfo.index;
            tempSelectAttrData.BaseID = compoundData.new_item;
            attrs = null;
            if (null != tempIndexInfo.value)
            {
                attrs = new List <GameCmd.PairNumber>();
                for (int j = 0, maxJ = tempIndexInfo.value.Count; j < maxJ; j++)
                {
                    tempPropPair = tempIndexInfo.value[j];
                    if (tempPropPair.key == (uint)GameCmd.eItemAttribute.Item_Attribute_FightPower)
                    {
                        continue;
                    }
                    if (tempPropPair.key == (uint)GameCmd.eItemAttribute.Item_Attribute_Bind)
                    {
                        if (ItemDefine.IsBind(tempPropPair.value))
                        {
                            isBind = true;
                        }
                        continue;
                    }
                    tempPair = new GameCmd.PairNumber()
                    {
                        id    = tempPropPair.key,
                        value = tempPropPair.value,
                    };
                    attrs.Add(tempPair);
                }
            }
            tempSelectAttrData.CostItemID           = equipComposeDB.assistId;
            tempSelectAttrData.CostItemNum          = (int)equipComposeDB.assistNum;
            tempSelectAttrData.ReplaceCostMoneyType = GameCmd.MoneyType.MoneyType_Coin;
            tempSelectAttrData.ReplaceCostMoneyNum  = replaceCoinNum;
            tempSelectAttrData.Attrs  = attrs;
            tempSelectAttrData.IsBind = isBind;
            cardDatas.Add(tempSelectAttrData);
        }
        bool isOpen  = false;
        bool freeGet = (emgr.CompoundSelectIndex == 0);
        bool select  = false;
        UICompoundSelectAttrGrid tempGrid = null;

        for (int i = 0, max = cardArray.Length; i < max; i++)
        {
            select   = false;
            isOpen   = false;
            tempGrid = cardArray[i];
            if (null == tempGrid)
            {
                continue;
            }
            tempSelectAttrData = cardDatas[i];
            if (!freeGet)
            {
                isOpen = emgr.IsEquipCompoundResultOpen(tempSelectAttrData.Index);
                if (isOpen)
                {
                    select = (emgr.CompoundSelectIndex == tempSelectAttrData.Index);
                }
            }

            tempGrid.SetData(isOpen, data: tempSelectAttrData, select: select, freeGet: freeGet);
        }
        UpdateAssistData();
    }