public void ModifyDeck(Deck userDeck)
 {
     isDirty   = false;
     auxDeck   = userDeck;
     isEditing = true;
     OnDeckChange?.Invoke(auxDeck);
 }
    public void OnTryRemoveRibbonCardFromDeck(RibbonData ribbonData)
    {
        if (isEditing == false)
        {
            return;
        }

        if (auxDeck == null)
        {
            if (debugOn)
            {
                Debug.Log("NO AUX DECK");
            }
            return;
        }
        auxDeck.RemoveCard(ribbonData.cardData);
        ribbonData.pCardSlotUI.cardSlot.RestDeckAmount();
        if (auxDeck.GetCardAmount(ribbonData.cardData) <= 0)
        {
            ribbonManager.RemoveRibbon(ribbonData);
        }
        else
        {
            ribbonManager.RestRibbon(ribbonData);
        }
        OnDeckChange?.Invoke(auxDeck);
        isDirty = true;
    }
    public void OnTryToAddCardToDeck(CardData cardData, CardSlotUI pCardSlotUI)
    {
        if (isEditing == false)
        {
            return;
        }

        if (auxDeck == null)
        {
            if (debugOn)
            {
                Debug.Log("NO AUX DECK");
            }
            return;
        }

        // REHABILITAR CUANDO SE ACTUALIZEN BIEN LOS DATOS DE LA BD ONLINE
        //if (cardData.IsAvailable == false)
        //{
        //    if (debugOn) Debug.Log("CARD NOT AVAILABLE YET");
        //    return;
        //}

        if (pCardSlotUI.cardSlot.userCollectionAmount <= 0)
        {
            if (debugOn)
            {
                Debug.Log("NO QUEDAN DE ESAS CARDS EN LA COLECCION");
            }
            return;
        }

        if (auxDeck.totalCards >= CardPropertiesDatabase.maxAmountOfCardsPerDeck)
        {
            if (debugOn)
            {
                Debug.Log("SE SUPERO EL LIMITE DE CARDS POR MAZO");
            }
            return;
        }

        if (auxDeck.GerCardAmountByRarity(cardData.CardRarity) >= CardPropertiesDatabase.GetAmountPerCardPerLevelPerDeck()[cardData.CardRarity])
        {
            if (debugOn)
            {
                Debug.Log("SE SUPERO EL LIMITE DE CARDS POR TIPO DE RAREZA");
            }
            return;
        }

        if (auxDeck.GetCardAmount(cardData) >= cardData.AmountPerDeck)
        {
            if (debugOn)
            {
                Debug.Log("SE SUPERO EL LIMITE DE CARDS POR TIPO ESE TIPO DE CARD");
            }
            return;
        }

        auxDeck.AddCard(cardData);
        pCardSlotUI.cardSlot.AddDeckAmount();
        RibbonData ribbonData = new RibbonData(cardData.CardName, pCardSlotUI.cardSlot.deckAmount, cardData, pCardSlotUI);

        ribbonManager.AddRibbon(ribbonData, this);
        if (debugOn)
        {
            Debug.Log("CARD ADDED " + cardData.CardName);
        }

        OnDeckChange?.Invoke(auxDeck);
        isDirty = true;
    }