Ejemplo n.º 1
0
    void ReinforceItemSuccess()
    {
        if (ItemDataViewer.DefaultInstance.GetCurrentTargetItem().GetItemType() == Item.E_TYPE.EQUIPMENT)
        {
            EquipmentItem item  = m_Item as EquipmentItem;
            EquipmentItem titem = ItemDataViewer.DefaultInstance.GetCurrentTargetItem() as EquipmentItem;

            if (!item || !titem)
            {
                return;
            }

            titem.IncreaseReinforceCount(item.GetReinforceCount() + 1);
        }
        else if (ItemDataViewer.DefaultInstance.GetCurrentTargetItem().GetItemType() == Item.E_TYPE.CHARACTER)
        {
            CharacterItem item  = m_Item as CharacterItem;
            CharacterItem titem = ItemDataViewer.DefaultInstance.GetCurrentTargetItem() as CharacterItem;

            if (!item || !titem)
            {
                return;
            }

            titem.IncreaseReinforceCount(item.GetReinforceCount() + 1);
        }

        InventoryManager.Instance.DestroyItem(m_Item);
        InventoryViewer.RefreshAllSlots();
        ItemDataViewer.DefaultInstance.Refresh();
        m_LobbyCanvasUI.GetStatusUI().Refresh();
    }