private void SwitchBasketModelTexture(FLASH_TYPE targetRarityType)
 {
     //IL_0068: Unknown result type (might be due to invalid IL or missing references)
     if (basketModelTextureList == null)
     {
         Log.Error("Not found downloaded texture!!");
     }
     else
     {
         Texture2D val = basketModelTextureList[(int)targetRarityType];
         if (val == null)
         {
             Log.Error("Not found texture for basket model!!");
         }
         else
         {
             Material material = GetMaterial(basket);
             if (material != null)
             {
                 material.set_mainTexture(val);
                 material.SetColor("_SpeLightColor", Color.get_white());
             }
         }
     }
 }
    private FLASH_TYPE UpdateGachaModelEffectReam(int targetFlashCount)
    {
        FLASH_TYPE fLASH_TYPE = FLASH_TYPE.GREEN;

        switch (targetFlashCount)
        {
        case 2:
        {
            int numRarityData = GetNumRarityData10(RARITY_TYPE.A);
            if (numRarityData > 0)
            {
                fLASH_TYPE = FLASH_TYPE.SILVER;
                SwitchBasketBallColorReam(fLASH_TYPE, numRarityData * 2);
            }
            firstFlashType = fLASH_TYPE;
            break;
        }

        case 3:
        {
            fLASH_TYPE = firstFlashType;
            int num = GetNumRarityData10(RARITY_TYPE.SS) + GetNumRarityData10(RARITY_TYPE.S);
            if (num > 0)
            {
                fLASH_TYPE = FLASH_TYPE.GOLD;
                SwitchBasketBallColorReam(fLASH_TYPE, num * 2);
            }
            break;
        }
        }
        SwitchBasketModelTexture(fLASH_TYPE);
        PlayAUDIOFlash(fLASH_TYPE);
        return(fLASH_TYPE);
    }
 private void SwitchBasketBallColor(FLASH_TYPE targetFlashType)
 {
     //IL_0032: Unknown result type (might be due to invalid IL or missing references)
     //IL_0037: Expected O, but got Unknown
     //IL_005a: Unknown result type (might be due to invalid IL or missing references)
     //IL_005f: Expected O, but got Unknown
     //IL_0064: Unknown result type (might be due to invalid IL or missing references)
     //IL_007b: Unknown result type (might be due to invalid IL or missing references)
     foreach (GameObject ballObject in ballObjects)
     {
         MeshRenderer component = ballObject.GetComponent <MeshRenderer>();
         if (!(component == null))
         {
             Material val = component.get_material();
             if (!(val == null))
             {
                 MeshRenderer component2 = balls[(int)targetFlashType].GetComponent <MeshRenderer>();
                 Material     val2       = component2.get_material();
                 val.set_mainTexture(val2.get_mainTexture());
                 val.SetColor("_SpeLightColor", val2.GetColor("_SpeLightColor"));
                 val.SetFloat("_SpeWidth", val2.GetFloat("_SpeWidth"));
             }
         }
     }
 }
    private FLASH_TYPE UpdateGachaModelEffectSingle(int targetFlashCount)
    {
        FLASH_TYPE fLASH_TYPE = FLASH_TYPE.GREEN;

        if (targetFlashCount > 1)
        {
            if (CalcNumRarityData(RARITY_TYPE.SS, false, false) > 0 || CalcNumRarityData(RARITY_TYPE.S, false, false) > 0)
            {
                fLASH_TYPE = FLASH_TYPE.GOLD;
                if (targetFlashCount < 3)
                {
                    fLASH_TYPE = ((Random.Range(0, 100) <= 50) ? FLASH_TYPE.SILVER : FLASH_TYPE.GREEN);
                }
            }
            else if (CalcNumRarityData(RARITY_TYPE.A, false, false) > 0)
            {
                fLASH_TYPE = FLASH_TYPE.SILVER;
                if (targetFlashCount < 3)
                {
                    fLASH_TYPE = ((Random.Range(0, 100) <= 50) ? FLASH_TYPE.SILVER : FLASH_TYPE.GREEN);
                }
            }
        }
        PlayAUDIOFlash(fLASH_TYPE);
        SwitchBasketBallColor(fLASH_TYPE);
        SwitchBasketModelTexture(fLASH_TYPE);
        return(fLASH_TYPE);
    }
    private void PlayAUDIOFlash(FLASH_TYPE flash)
    {
        AUDIO audio = AUDIO.FLASH_RARITY_01;

        if (flash > FLASH_TYPE.GREEN)
        {
            audio = AUDIO.FLASH_RARITY_02;
        }
        PlayAUDIO(audio);
    }
    private FLASH_TYPE GetFlashTypeAtLast()
    {
        FLASH_TYPE result = FLASH_TYPE.GREEN;

        if (CheckContainRarityLast(RARITY_TYPE.SS) || CheckContainRarityLast(RARITY_TYPE.S))
        {
            result = FLASH_TYPE.GOLD;
        }
        else if (CheckContainRarityLast(RARITY_TYPE.A))
        {
            result = FLASH_TYPE.SILVER;
        }
        return(result);
    }
 private void EventFlashEffect(bool isSkip)
 {
     if (isSkip)
     {
         if (isReam)
         {
             flashCount++;
             UpdateGachaModelEffectReam(flashCount);
         }
     }
     else if (!(flashEffectPrefab == null) && flashEffectRarityPrefabs != null)
     {
         ApplyRandomVectorForBalls();
         flashCount++;
         GameObject val = flashEffectPrefab;
         if (isReam)
         {
             if (flashCount >= 4)
             {
                 FLASH_TYPE flashTypeAtLast = GetFlashTypeAtLast();
                 val = flashEffectRarityPrefabs[(int)flashTypeAtLast];
                 SwitchBasketModelTexture(flashTypeAtLast);
                 SwitchBasketBallColor(flashTypeAtLast);
                 PlayAUDIOFlash(flashTypeAtLast);
             }
             else
             {
                 FLASH_TYPE fLASH_TYPE = UpdateGachaModelEffectReam(flashCount);
                 val = flashEffectRarityPrefabs[(int)fLASH_TYPE];
             }
         }
         else
         {
             FLASH_TYPE fLASH_TYPE2 = UpdateGachaModelEffectSingle(flashCount);
             val = flashEffectRarityPrefabs[(int)fLASH_TYPE2];
         }
         if (val != null && flashEffectPosition != null)
         {
             Transform val2 = ResourceUtility.Realizes(val, flashEffectPosition, -1);
             if (val2 != null)
             {
                 flashEffectList.Add(val2);
             }
         }
     }
 }
    private void SwitchBasketBallColorReam(FLASH_TYPE targetFlashType, int numChange)
    {
        //IL_006b: Unknown result type (might be due to invalid IL or missing references)
        //IL_0070: Expected O, but got Unknown
        //IL_0095: Unknown result type (might be due to invalid IL or missing references)
        //IL_009a: Expected O, but got Unknown
        //IL_00a0: Unknown result type (might be due to invalid IL or missing references)
        //IL_00b8: Unknown result type (might be due to invalid IL or missing references)
        int num = 0;

        foreach (GameObject ballObject in ballObjects)
        {
            if (num >= numChange)
            {
                break;
            }
            MagiBall component = ballObject.GetComponent <MagiBall>();
            if (!(component == null) && component.FlashType == FLASH_TYPE.GREEN)
            {
                MeshRenderer component2 = ballObject.GetComponent <MeshRenderer>();
                if (!(component2 == null))
                {
                    Material val = component2.get_material();
                    if (!(val == null))
                    {
                        MeshRenderer component3 = balls[(int)targetFlashType].GetComponent <MeshRenderer>();
                        Material     val2       = component3.get_material();
                        val.set_mainTexture(val2.get_mainTexture());
                        val.SetColor("_SpeLightColor", val2.GetColor("_SpeLightColor"));
                        val.SetFloat("_SpeWidth", val2.GetFloat("_SpeWidth"));
                        component.FlashType = targetFlashType;
                        num++;
                    }
                }
            }
        }
    }