Example #1
0
 private GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] SetGashaResult(GameWebAPI.RespDataGA_ExecChip gashaResult, int playCount)
 {
     UserHomeInfo.dirtyMyPage = true;
     GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] array = new GameWebAPI.RespDataCS_ChipListLogic.UserChipList[gashaResult.userAssetList.Length];
     for (int i = 0; i < array.Length; i++)
     {
         int num  = 0;
         int num2 = 0;
         if (int.TryParse(gashaResult.userAssetList[i].assetValue, out num) && int.TryParse(gashaResult.userAssetList[i].userAssetId, out num2))
         {
             array[i] = new GameWebAPI.RespDataCS_ChipListLogic.UserChipList
             {
                 chipId        = num,
                 userChipId    = num2,
                 userMonsterId = 0
             };
         }
         global::Debug.Assert(null != array[i], string.Concat(new object[]
         {
             "ガシャ排出された強化チップのIDが不正です:chipId=",
             num,
             ", userChipId=",
             num2
         }));
     }
     ChipDataMng.AddUserChipList(array);
     base.UpdateUserAssetsInventory(playCount);
     base.UpdateGashaInfo(playCount);
     return(array);
 }
Example #2
0
    protected void SetIcons(string path, List <UISprite> list, GameWebAPI.RespDataCM_LoginBonus.LoginReward[] rewardList)
    {
        int    num  = 1;
        string name = path + num;

        if (base.transform.Find(name) == null)
        {
            return;
        }
        UISprite component = base.transform.Find(name).GetComponent <UISprite>();

        while (component != null)
        {
            list.Add(component);
            if (rewardList.Length < num)
            {
                component.gameObject.SetActive(false);
            }
            else
            {
                int    num2            = num - 1;
                string rewardIcon      = this.GetRewardIcon(rewardList[num2]);
                string assetCategoryId = rewardList[num2].assetCategoryId;
                string assetValue      = rewardList[num2].assetValue;
                if (string.IsNullOrEmpty(assetCategoryId) || string.IsNullOrEmpty(rewardIcon) || this.textureCategoryList.Contains(assetCategoryId.ToInt32()))
                {
                    component.gameObject.SetActive(false);
                }
                else if (assetCategoryId.ToInt32() == 17)
                {
                    GameWebAPI.RespDataMA_ChipM.Chip chipMainData = ChipDataMng.GetChipMainData(assetValue);
                    ChipDataMng.MakePrefabByChipData(chipMainData, component.gameObject, component.transform.localPosition, component.transform.localScale, null, -1, -1, true);
                }
                else if (assetCategoryId.ToInt32() == 1)
                {
                    this.monsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(MonsterDataMng.Instance().CreateMonsterDataByMID(assetValue), Vector3.one, Vector3.zero, component.transform, true, false);
                    this.monsterIcon.ResizeIcon(component.width, component.height);
                    if (null != this.monsterIcon)
                    {
                        DepthController depthController = this.monsterIcon.GetDepthController();
                        if (null != depthController)
                        {
                            depthController.AddWidgetDepth(this.monsterIcon.transform, component.depth + 1);
                        }
                    }
                }
                else
                {
                    component.spriteName = rewardIcon;
                }
            }
            num++;
            name = path + num;
            if (!(base.transform.Find(name) != null))
            {
                break;
            }
            component = base.transform.Find(name).GetComponent <UISprite>();
        }
    }
Example #3
0
    private void SetCacheChipIconResources()
    {
        string selectDeckNum = DataMng.Instance().RespDataMN_DeckList.selectDeckNum;

        GameWebAPI.RespDataMN_GetDeckList.DeckList   deckList  = null;
        GameWebAPI.RespDataMN_GetDeckList.DeckList[] deckList2 = DataMng.Instance().RespDataMN_DeckList.deckList;
        for (int i = 0; i < deckList2.Length; i++)
        {
            if (selectDeckNum == deckList2[i].deckNum)
            {
                deckList = deckList2[i];
                break;
            }
        }
        int[] array = null;
        for (int j = 0; j < deckList.monsterList.Length; j++)
        {
            MonsterData userMonster = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(deckList.monsterList[j].userMonsterId);

            MonsterChipEquipData chipEquip = userMonster.GetChipEquip();
            array = chipEquip.GetChipIdList();
        }
        for (int k = 0; k < array.Length; k++)
        {
            GameWebAPI.RespDataMA_ChipM.Chip chipMainData = ChipDataMng.GetChipMainData(array[k]);
            string iconPath = chipMainData.GetIconPath();
            if (!AssetDataMng.Instance().IsAssetBundleData(iconPath))
            {
                UnityEngine.Object resource = AssetDataMng.Instance().LoadObject(iconPath, null, true);
                AssetDataCacheMng.Instance().AddCache(iconPath, AssetDataCacheMng.CACHE_TYPE.CHARA_PARTY, resource);
            }
        }
    }
    public void AllBuild(int widthLength, Vector2 windowSize, GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] dataList, bool shouldDim = false, bool isInitLocation = false)
    {
        Rect  listWindowViewRect = default(Rect);
        float num  = windowSize.x * 0.5f;
        float num2 = windowSize.y * 0.5f;

        listWindowViewRect.xMin    = -num;
        listWindowViewRect.xMax    = num;
        listWindowViewRect.yMin    = -num2 - GUIMain.VerticalSpaceSize;
        listWindowViewRect.yMax    = num2 + GUIMain.VerticalSpaceSize;
        base.ListWindowViewRect    = listWindowViewRect;
        this.fRecycleViewMaxY      = num2 * 1.5f;
        this.fRecycleViewMinY      = -num2 * 1.5f;
        this.PARTS_CT_MN           = widthLength;
        this.RecycleViewSectorSize = 4;
        List <string> myDigimonChipGroupIds = null;

        if (shouldDim)
        {
            myDigimonChipGroupIds = CMD_ChipSphere.DataChg.GetChipEquip().GetChipGroupList();
        }
        GUISelectPanelChipList.partsDataList = new List <GUIListChipParts.Data>();
        for (int i = 0; i < dataList.Length; i++)
        {
            GUIListChipParts.Data data = new GUIListChipParts.Data();
            data.index                 = i;
            data.userChip              = dataList[i];
            data.masterChip            = ChipDataMng.GetChipMainData(dataList[i].chipId.ToString());
            data.shouldDim             = shouldDim;
            data.myDigimonChipGroupIds = myDigimonChipGroupIds;
            GUISelectPanelChipList.partsDataList.Add(data);
        }
        base.initLocation = isInitLocation;
        base.AllBuild(dataList.Length, isInitLocation, 1f, 1f, null, null, true);
    }
 public static GameWebAPI.MonsterSlotInfoListLogic RequestAPIMonsterSlotInfo(int[] userMonsterIdList)
 {
     return(new GameWebAPI.MonsterSlotInfoListLogic
     {
         SetSendData = delegate(GameWebAPI.ReqDataCS_MonsterSlotInfoListLogic param)
         {
             param.userMonsterId = userMonsterIdList;
         },
         OnReceived = delegate(GameWebAPI.RespDataCS_MonsterSlotInfoListLogic response)
         {
             if (response != null)
             {
                 ChipDataMng.GetUserChipSlotData().UpdateMonsterSlotList(response.slotInfo);
                 if (userMonsterIdList == null || userMonsterIdList.Length == 0)
                 {
                     ClassSingleton <MonsterUserDataMng> .Instance.RefreshMonsterSlot();
                 }
                 else
                 {
                     ClassSingleton <MonsterUserDataMng> .Instance.RefreshMonsterSlot(userMonsterIdList);
                 }
             }
         }
     });
 }
    public static bool IsExtraEffectMonster(MonsterData monsterData, GameWebAPI.RespDataMA_GetWorldDungeonExtraEffectM.WorldDungeonExtraEffectM[] effectArray)
    {
        if (MonsterGrowStepData.IsGardenDigimonScope(monsterData.monsterMG.growStep))
        {
            return(false);
        }
        int areaId = ExtraEffectUtil.GetAreaId();

        foreach (int num in monsterData.GetChipEquip().GetChipIdList())
        {
            GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] chipEffectData = ChipDataMng.GetChipEffectData(num.ToString());
            if (chipEffectData != null)
            {
                GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] invocationList = ChipEffectStatus.GetInvocationList(chipEffectData, EffectStatusBase.EffectTriggerType.Area, monsterData.monsterM.monsterGroupId.ToInt32(), null, areaId);
                if (invocationList.Length > 0)
                {
                    return(true);
                }
            }
        }
        GameWebAPI.RespDataMA_EventPointBonusM.EventPointBonus[] eventPointBonuses = ExtraEffectUtil.GetEventPointBonuses(ExtraEffectUtil.GetDungeonId().ToString());
        foreach (GameWebAPI.RespDataMA_EventPointBonusM.EventPointBonus eventPointBonus in eventPointBonuses)
        {
            bool flag = ExtraEffectUtil.CheckExtraParams(monsterData, eventPointBonus);
            if (flag)
            {
                return(true);
            }
        }
        return(ExtraEffectUtil.CheckExtraStageParams(monsterData, effectArray));
    }
    private static bool CheckStageEffectInvalid(CharacterStateControl chipTarget, ExtraEffectStatus extraEffectStatus)
    {
        BattleStateManager current = BattleStateManager.current;

        CharacterStateControl[] totalCharacters = current.battleStateData.GetTotalCharacters();
        foreach (CharacterStateControl characterStateControl in totalCharacters)
        {
            if (!(characterStateControl == null))
            {
                ChipEffectStatus.TargetType targetType = ChipEffectStatus.GetTargetType(characterStateControl, chipTarget);
                foreach (int num in characterStateControl.chipIds)
                {
                    GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] array2 = ChipDataMng.GetChipEffectData(num.ToString());
                    array2 = ChipEffectStatus.GetStageEffectInvalidList(BattleStateManager.current.hierarchyData.areaId, array2, extraEffectStatus).ToArray();
                    if (array2.Length > 0)
                    {
                        List <GameWebAPI.RespDataMA_ChipEffectM.ChipEffect> totalChipEffectStatusList = ChipEffectStatus.GetTotalChipEffectStatusList(array2, chipTarget.isEnemy, chipTarget.characterStatus.monsterIntegrationIds, chipTarget.groupId, chipTarget.tolerance, chipTarget.characterDatas.tribe, chipTarget.characterDatas.growStep, null, null, targetType, EffectStatusBase.ExtraEffectType.StageEffextInvalid);
                        if (totalChipEffectStatusList.Count > 0)
                        {
                            return(true);
                        }
                    }
                }
            }
        }
        return(false);
    }
Example #8
0
    private void Send(GameWebAPI.RespDataCS_ChipListLogic.UserChipList baseChip)
    {
        RestrictionInput.StartLoad(RestrictionInput.LoadType.SMALL_IMAGE_MASK_ON);
        int userChipId = baseChip.userChipId;

        GameWebAPI.RespDataMA_ChipM.Chip baseMaterChip = ChipDataMng.GetChipMainData(baseChip);
        int num = baseMaterChip.needChip.ToInt32();

        int[] array = null;
        if (num > 0)
        {
            array = new int[num];
            int num2 = 0;
            foreach (GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChipList2 in ChipDataMng.userChipData.userChipList)
            {
                if (userChipId != userChipList2.userChipId && userChipList2.chipId == baseChip.chipId && userChipList2.userMonsterId == 0)
                {
                    array[num2] = userChipList2.userChipId;
                    num2++;
                    if (num2 >= array.Length)
                    {
                        break;
                    }
                }
            }
        }
        Action callback = delegate()
        {
            GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] array2 = this.ConvertChipList(ChipDataMng.userChipData);
            this.chipList.ReAllBuild(array2, false, false);
            this.chipList.SetShortTouchCallback(new Action <GUIListChipParts.Data>(this.OnShortTouchChip));
            this.chipList.SetLongTouchCallback(new Action <GUIListChipParts.Data>(this.OnLongTouchChip));
            this.messageLabel.gameObject.SetActive(array2.Count <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>() == 0);
            this.listCountLabel.text = string.Format(StringMaster.GetString("SystemFraction"), ChipDataMng.userChipData.userChipList.Length, DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.chipLimitMax);
            GameWebAPI.RespDataMA_ChipM.Chip chipEnhancedData = ChipDataMng.GetChipEnhancedData(baseMaterChip.chipId);
            CMD_ChipReinforcementAnimation.Create(this.gameObject, chipEnhancedData, null);
        };
        int            resultCode = 0;
        APIRequestTask task       = ChipDataMng.RequestAPIChipFusion(baseChip.userChipId, array, delegate(int res)
        {
            resultCode = res;
        });

        AppCoroutine.Start(task.Run(delegate
        {
            if (resultCode == 1)
            {
                callback();
            }
            else
            {
                string @string = StringMaster.GetString("SystemDataMismatchTitle");
                string message = string.Format(StringMaster.GetString("ChipDataMismatchMesage"), resultCode);
                AlertManager.ShowModalMessage(delegate(int modal)
                {
                }, @string, message, AlertManager.ButtonActionType.Close, false);
            }
            RestrictionInput.EndLoad();
        }, null, null), false);
    }
Example #9
0
    private void EndSale(GameWebAPI.RespDataMN_SaleExec response)
    {
        string[] userMonsterIdList = this.sellMonsterList.Select((MonsterData x) => x.userMonster.userMonsterId).ToArray <string>();
        ChipDataMng.GetUserChipSlotData().RemoveMonsterChipData(userMonsterIdList);
        ClassSingleton <MonsterUserDataMng> .Instance.DeleteUserMonsterData(userMonsterIdList);

        ClassSingleton <GUIMonsterIconList> .Instance.RefreshList(MonsterDataMng.Instance().GetMonsterDataList());

        this.InitMonsterList(false);
        this.sellMonsterList.Clear();
        this.monsterList.SetGrayOutBlockMonster();
        if (CMD_FarewellListRun.Mode == CMD_FarewellListRun.MODE.SELL)
        {
            this.monsterList.SetGrayOutPartyUsed();
        }
        else if (CMD_FarewellListRun.Mode == CMD_FarewellListRun.MODE.GARDEN_SELL)
        {
            this.monsterList.SetGrayOutGrowing(this.targetMonsterList);
        }
        this.ShowHaveMonster();
        int num  = int.Parse(DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.gamemoney);
        int num2 = num + this.chip_bak;

        DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.gamemoney = num2.ToString();
        this.BTSeleOn();
        this.UpdateDigicoin();
    }
Example #10
0
    private float GetSkillHitRateCorrectionValue(CharacterStateControl attacker)
    {
        float num = 0f;
        List <ExtraEffectStatus> extraEffectStatus = BattleStateManager.current.battleStateData.extraEffectStatus;
        List <ExtraEffectStatus> invocationList    = ExtraEffectStatus.GetInvocationList(extraEffectStatus, EffectStatusBase.EffectTriggerType.Usually);

        num += ExtraEffectStatus.GetSkillHitRateCorrectionValue(invocationList, this, attacker) - this.hitRate;
        num += attacker.chipAddHit;
        foreach (int num2 in attacker.potencyChipIdList.Keys)
        {
            GameWebAPI.RespDataMA_ChipEffectM.ChipEffect   chipEffectDataToId = ChipDataMng.GetChipEffectDataToId(num2.ToString());
            GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] chipEffects        = new GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[]
            {
                chipEffectDataToId
            };
            num += ChipEffectStatus.GetSkillHitRateCorrectionValue(chipEffects, this, attacker);
        }
        SufferStateProperty sufferStateProperty = attacker.currentSufferState.GetSufferStateProperty(SufferStateProperty.SufferType.HitRateUp);

        if (sufferStateProperty.isActive)
        {
            num += sufferStateProperty.upPercent;
        }
        SufferStateProperty sufferStateProperty2 = attacker.currentSufferState.GetSufferStateProperty(SufferStateProperty.SufferType.HitRateDown);

        if (sufferStateProperty2.isActive)
        {
            num -= sufferStateProperty2.downPercent;
        }
        num += attacker.leaderSkillResult.hitRateUpPercent;
        return(num);
    }
Example #11
0
    public static GameWebAPI.ChipEquipLogic RequestAPIChipEquip(GameWebAPI.ReqDataCS_ChipEquipLogic equip, Action <int> callBack = null)
    {
        return(new GameWebAPI.ChipEquipLogic
        {
            SetSendData = delegate(GameWebAPI.ReqDataCS_ChipEquipLogic param)
            {
                param.act = equip.act;
                param.dispNum = equip.dispNum;
                param.type = equip.type;
                param.userChipId = equip.userChipId;
                param.userMonsterId = equip.userMonsterId;
            },
            OnReceived = delegate(GameWebAPI.RespDataCS_ChipEquipLogic resData)
            {
                if (resData.resultCode == 1)
                {
                    GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChip = ChipDataMng.GetUserChip(equip.userChipId);
                    userChip.userChipId = equip.userChipId;
                    userChip.userMonsterId = ((equip.GetActEnum() != GameWebAPI.ReqDataCS_ChipEquipLogic.ACT.ATTACH) ? 0 : equip.userMonsterId);
                    MonsterData userMonster = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(equip.userMonsterId.ToString());

                    userMonster.GetChipEquip().UpdateEquipList(equip);
                    if (equip.GetActEnum() == GameWebAPI.ReqDataCS_ChipEquipLogic.ACT.REMOVE)
                    {
                        Singleton <UserDataMng> .Instance.UpdateUserItemNum(7, -1);
                    }
                    ClassSingleton <MonsterUserDataMng> .Instance.UpdateUserMonsterData(resData.userMonster);
                }
                if (callBack != null)
                {
                    callBack(resData.resultCode);
                }
            }
        });
    }
Example #12
0
    private void EndSuccession(string materialMonsterModelId, string materialMonsterGrowStep)
    {
        string[] userMonsterIdList = this.selecterPartnerDigimons.Select((MonsterData x) => x.userMonster.userMonsterId).ToArray <string>();
        ClassSingleton <MonsterUserDataMng> .Instance.DeleteUserMonsterData(userMonsterIdList);

        ChipDataMng.GetUserChipSlotData().RemoveMonsterChipData(userMonsterIdList);
        ClassSingleton <GUIMonsterIconList> .Instance.RefreshList(MonsterDataMng.Instance().GetMonsterDataList());

        this.InitMonsterList(false);
        CutsceneDataInheritance cutsceneDataInheritance = new CutsceneDataInheritance();

        cutsceneDataInheritance.path            = "Cutscenes/Inheritance";
        cutsceneDataInheritance.baseModelId     = this.baseDigimon.GetMonsterMaster().Group.modelId;
        cutsceneDataInheritance.materialModelId = materialMonsterModelId;
        CutsceneDataInheritance cutsceneDataInheritance2 = cutsceneDataInheritance;

        if (CMD_Succession.< > f__mg$cache1 == null)
        {
            CMD_Succession.< > f__mg$cache1 = new Action(CutSceneMain.FadeReqCutSceneEnd);
        }
        cutsceneDataInheritance2.endCallback = CMD_Succession.< > f__mg$cache1;
        CutsceneDataInheritance cutsceneData = cutsceneDataInheritance;

        Loading.Invisible();
        CutSceneMain.FadeReqCutScene(cutsceneData, new Action(this.StartCutSceneCallBack), null, delegate(int index)
        {
            this.detailedWindow.StartAnimation();
            RestrictionInput.EndLoad();
        }, 0.5f, 0.5f);
    }
Example #13
0
 public static void DeleteEquipChip(string[] userMonsterIdList)
 {
     foreach (string userMonsterId in userMonsterIdList)
     {
         GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] monsterChipList = ChipDataMng.GetMonsterChipList(userMonsterId);
         ChipDataMng.DeleteUserChip(monsterChipList);
     }
 }
Example #14
0
 public static GameWebAPI.RespDataMA_ChipM.Chip GetChipMainData(GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChip)
 {
     GameWebAPI.RespDataMA_ChipM.Chip chip = null;
     ChipDataMng.GetDictionaryChipM().TryGetValue(userChip.chipId, out chip);
     chip = ChipDataMng.SetChipIconPath(chip);
     chip = ChipDataMng.SetChipSellPrice(chip);
     return(chip);
 }
Example #15
0
 public static GameWebAPI.RespDataMA_ChipM.Chip GetChipMainData(int chipId)
 {
     GameWebAPI.RespDataMA_ChipM.Chip chip = null;
     if (ChipDataMng.GetDictionaryChipM().TryGetValue(chipId, out chip))
     {
         chip = ChipDataMng.SetChipIconPath(chip);
         chip = ChipDataMng.SetChipSellPrice(chip);
     }
     return(chip);
 }
Example #16
0
    private static int ComparerRarityOrderByDesc(GameWebAPI.RespDataCS_ChipListLogic.UserChipList x, GameWebAPI.RespDataCS_ChipListLogic.UserChipList y)
    {
        GameWebAPI.RespDataMA_ChipM.Chip chipMainData  = ChipDataMng.GetChipMainData(x);
        GameWebAPI.RespDataMA_ChipM.Chip chipMainData2 = ChipDataMng.GetChipMainData(y);
        int num  = chipMainData.rank.ToInt32();
        int num2 = chipMainData2.rank.ToInt32();
        int num3 = num2 - num;

        return((num3 != 0) ? num3 : (y.chipId - x.chipId));
    }
Example #17
0
 public static void DeleteUserChip(GameWebAPI.RespDataCS_ChipListLogic.UserChipList[] chipList)
 {
     if (chipList != null)
     {
         foreach (GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChipList in chipList)
         {
             ChipDataMng.DeleteUserChipData(userChipList.userChipId);
         }
     }
 }
        public override IEnumerator Exec(GameWebAPI.GA_Req_ExecGacha playGashaRequestParam, bool isTutorial)
        {
            GameWebAPI.RespDataGA_ExecGacha gashaResult = null;
            int[] userMonsterIdList = null;
            GameWebAPI.RequestGA_GashaExec playGashaRequest = new GameWebAPI.RequestGA_GashaExec
            {
                SetSendData = delegate(GameWebAPI.GA_Req_ExecGacha param)
                {
                    param.gachaId   = playGashaRequestParam.gachaId;
                    param.playCount = playGashaRequestParam.playCount;
                    param.itemCount = playGashaRequestParam.itemCount;
                },
                OnReceived = delegate(GameWebAPI.RespDataGA_ExecGacha response)
                {
                    gashaResult       = response;
                    userMonsterIdList = new int[gashaResult.userMonsterList.Length];
                    for (int i = 0; i < gashaResult.userMonsterList.Length; i++)
                    {
                        int num = 0;
                        if (int.TryParse(gashaResult.userMonsterList[i].userMonsterId, out num))
                        {
                            userMonsterIdList[i] = num;
                        }
                    }
                    this.SetGashaResult(gashaResult, playGashaRequestParam.playCount);
                }
            };
            GameWebAPI.MonsterSlotInfoListLogic monsterSlotRequest = new GameWebAPI.MonsterSlotInfoListLogic
            {
                SetSendData = delegate(GameWebAPI.ReqDataCS_MonsterSlotInfoListLogic param)
                {
                    param.userMonsterId = userMonsterIdList;
                },
                OnReceived = delegate(GameWebAPI.RespDataCS_MonsterSlotInfoListLogic response)
                {
                    ChipDataMng.GetUserChipSlotData().UpdateMonsterSlotList(response.slotInfo);
                    ClassSingleton <MonsterUserDataMng> .Instance.RefreshMonsterSlot(userMonsterIdList);
                }
            };
            RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
            APIRequestTask task = new APIRequestTask(playGashaRequest, true);

            task.Add(new APIRequestTask(monsterSlotRequest, true));
            yield return(AppCoroutine.Start(task.Run(delegate
            {
                this.SetGashaResultWindow(gashaResult, userMonsterIdList, isTutorial);
                this.SetGashaCutScene(gashaResult, isTutorial);
            }, delegate(Exception noop)
            {
                RestrictionInput.EndLoad();
                GUIManager.CloseAllCommonDialog(null);
            }, null), false));

            yield break;
        }
 private void OnTapYes()
 {
     RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
     this.equip.act = 1;
     GameWebAPI.ChipEquipLogic request = ChipDataMng.RequestAPIChipEquip(this.equip, new Action <int>(this.EndAttachment));
     base.StartCoroutine(request.Run(null, delegate(Exception noop)
     {
         RestrictionInput.EndLoad();
         GUIMain.BarrierOFF();
     }, null));
 }
 public ChipClientSlotInfo(GameWebAPI.RespDataCS_MonsterSlotInfoListLogic.SlotInfo slotInfo)
 {
     this.monsterSlotInfo = slotInfo;
     this.equipList       = new List <ChipClientEquip>();
     if (slotInfo.equip != null)
     {
         for (int i = 0; i < slotInfo.equip.Length; i++)
         {
             GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChip = ChipDataMng.GetUserChip(slotInfo.equip[i].userChipId);
             this.equipList.Add(new ChipClientEquip(slotInfo.equip[i], userChip.chipId));
         }
     }
 }
Example #21
0
    public static APIRequestTask RequestAPIChipFusion(int baseUserChipId, int[] materialChipIds, Action <int> onCompleted)
    {
        GameWebAPI.ChipFusionLogic chipFusionLogic = new GameWebAPI.ChipFusionLogic
        {
            SetSendData = delegate(GameWebAPI.ReqDataCS_ChipFusionLogic param)
            {
                param.baseChip     = baseUserChipId;
                param.materialChip = materialChipIds;
            }
        };
        APIRequestTask task = new APIRequestTask(chipFusionLogic, true);

        chipFusionLogic.OnReceived = delegate(GameWebAPI.RespDataCS_ChipFusionLogic resData)
        {
            if (resData.resultCode == 1)
            {
                List <GameWebAPI.RespDataCS_ChipListLogic.UserChipList> list = ChipDataMng.userChipData.userChipList.ToList <GameWebAPI.RespDataCS_ChipListLogic.UserChipList>();
                int[] materialChipIds2 = materialChipIds;
                for (int i = 0; i < materialChipIds2.Length; i++)
                {
                    int materialChip = materialChipIds2[i];
                    list.RemoveAll((GameWebAPI.RespDataCS_ChipListLogic.UserChipList c) => c.userChipId == materialChip);
                }
                ChipDataMng.userChipData.userChipList = list.ToArray();
                GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChipInfo = ChipDataMng.GetUserChip(baseUserChipId);
                userChipInfo.chipId = resData.userChip.chipId;
                if (userChipInfo.userMonsterId != 0)
                {
                    ChipClientSlotInfo slotInfo        = ChipDataMng.userChipSlotData.GetSlotInfo(userChipInfo.userMonsterId.ToString());
                    ChipClientEquip    chipClientEquip = slotInfo.FindChipEquip(baseUserChipId);
                    chipClientEquip.chipId = resData.userChip.chipId;
                    TaskBase task = task;
                    GameWebAPI.RequestMonsterList requestMonsterList = new GameWebAPI.RequestMonsterList();
                    requestMonsterList.SetSendData = delegate(GameWebAPI.ReqDataUS_GetMonsterList param)
                    {
                        param.userMonsterIds = new int[]
                        {
                            userChipInfo.userMonsterId
                        };
                    };
                    requestMonsterList.OnReceived = delegate(GameWebAPI.RespDataUS_GetMonsterList response)
                    {
                        ClassSingleton <MonsterUserDataMng> .Instance.UpdateUserMonsterData(response.userMonsterList);
                    };
                    task.Add(new APIRequestTask(requestMonsterList, true));
                }
            }
            onCompleted(resData.resultCode);
        };
        return(task);
    }
Example #22
0
        public void RemoveChipData(string userMonsterIdList, bool delete = true)
        {
            ChipClientSlotInfo slotInfo = this.GetSlotInfo(userMonsterIdList);

            foreach (ChipClientEquip chipClientEquip in slotInfo.GetChipEquip())
            {
                GameWebAPI.RespDataCS_ChipListLogic.UserChipList userChip = ChipDataMng.GetUserChip(chipClientEquip.userChipId);
                userChip.resetUserMonsterID();
            }
            if (delete)
            {
                this.DeleteMonsterSlot(userMonsterIdList);
            }
        }
Example #23
0
 private void InitChipEffectCount(string value)
 {
     foreach (int num in this.characterStateControl.chipIds)
     {
         GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] chipEffectData = ChipDataMng.GetChipEffectData(num.ToString());
         foreach (GameWebAPI.RespDataMA_ChipEffectM.ChipEffect chipEffect in chipEffectData)
         {
             if (chipEffect.effectTurnType == value && this.chipEffectCount.ContainsKey(chipEffect.chipEffectId.ToInt32()))
             {
                 this.chipEffectCount[chipEffect.chipEffectId.ToInt32()] = chipEffect.effectTurn.ToInt32();
             }
         }
     }
 }
Example #24
0
    public static GameWebAPI.RespDataMA_ChipM.Chip GetChipEnhancedData(string chipId)
    {
        GameWebAPI.RespDataMA_ChipM.Chip beforeChip = null;
        ChipDataMng.GetDictionaryChipM().TryGetValue(int.Parse(chipId), out beforeChip);
        IEnumerable <GameWebAPI.RespDataMA_ChipM.Chip> source = MasterDataMng.Instance().RespDataMA_ChipMaster.chipM.Where((GameWebAPI.RespDataMA_ChipM.Chip c) => c.chipGroupId == beforeChip.chipGroupId && int.Parse(c.rank) > int.Parse(beforeChip.rank));

        GameWebAPI.RespDataMA_ChipM.Chip chip = null;
        if (source.Count <GameWebAPI.RespDataMA_ChipM.Chip>() > 0)
        {
            chip = source.OrderBy((GameWebAPI.RespDataMA_ChipM.Chip c) => int.Parse(c.rank)).ToArray <GameWebAPI.RespDataMA_ChipM.Chip>()[0];
            chip = ChipDataMng.SetChipIconPath(chip);
            chip = ChipDataMng.SetChipSellPrice(chip);
        }
        return(chip);
    }
Example #25
0
    protected IEnumerator GetChipSlotInfo()
    {
        GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList[] monsterList = new GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList[]
        {
            this.GetUserMonsterData()
        };
        GameWebAPI.MonsterSlotInfoListLogic request = ChipDataMng.RequestAPIMonsterSlotInfo(monsterList);
        yield return(AppCoroutine.Start(request.Run(new Action(this.EndSuccess), delegate(Exception noop)
        {
            RestrictionInput.EndLoad();
            this.ClosePanel(true);
        }, null), false));

        yield break;
    }
Example #26
0
 public void ClearCache()
 {
     AlertMaster.ClearCache();
     StringMaster.ClearCache();
     EvolutionMaterialData.ClearCache();
     ChipDataMng.ClearCache();
     TitleDataMng.ClearCache();
     DataMng.Instance().StageGimmick.ZeroClear();
     MasterBase[] array = this.masterList.Values.ToArray <MasterBase>();
     for (int i = 0; i < array.Length; i++)
     {
         array[i].ClearData();
     }
     MonsterPicturebookData.Initialize();
 }
Example #27
0
        private bool SetChipIcon(string assetsValue, GameObject parent, int width, int height)
        {
            bool result = false;

            GameWebAPI.RespDataMA_ChipM.Chip chipMainData = ChipDataMng.GetChipMainData(assetsValue);
            if (chipMainData != null)
            {
                Transform transform = parent.transform;
                GameWebAPI.RespDataMA_ChipM.Chip masterChip = chipMainData;
                Vector3 localPosition = transform.localPosition;
                Vector3 localScale    = transform.localScale;
                ChipDataMng.MakePrefabByChipData(masterChip, parent, localPosition, localScale, null, width, height, true);
                result = true;
            }
            return(result);
        }
Example #28
0
 private void InitializeChipEffectCount()
 {
     foreach (int num in this.characterStateControl.characterStatus.chipIds)
     {
         GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] chipEffectData = ChipDataMng.GetChipEffectData(num.ToString());
         if (chipEffectData != null)
         {
             foreach (GameWebAPI.RespDataMA_ChipEffectM.ChipEffect chipEffect in chipEffectData)
             {
                 if (chipEffect.effectTurn.ToInt32() > 0)
                 {
                     this.chipEffectCount[chipEffect.chipEffectId.ToInt32()] = chipEffect.effectTurn.ToInt32();
                 }
             }
         }
     }
 }
    private void OnPushedExtendConfirmYesButton()
    {
        RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
        int dispNum = this.selectedChipParameter.ConvertDispNum();

        GameWebAPI.ChipUnlockExtraSlotLogic chipUnlockExtraSlotLogic = ChipDataMng.RequestAPIChipUnlockExtraSlot(CMD_ChipSphere.DataChg, dispNum, this.consumeItemCount, new Action <int>(this.EndExtend));
        RequestBase request = chipUnlockExtraSlotLogic;

        if (CMD_ChipSphere.< > f__mg$cache0 == null)
        {
            CMD_ChipSphere.< > f__mg$cache0 = new Action(RestrictionInput.EndLoad);
        }
        base.StartCoroutine(request.Run(CMD_ChipSphere.< > f__mg$cache0, delegate(Exception noop)
        {
            RestrictionInput.EndLoad();
        }, null));
    }
Example #30
0
    protected override void EndSuccess()
    {
        bool isEquipChip = this.baseDigimon.GetChipEquip().IsAttachedChip();

        if (isEquipChip)
        {
            base.RemoveEquipChip(false, this.baseDigimon.userMonster.userMonsterId);
        }
        string modelId = this.baseDigimon.GetMonsterMaster().Group.modelId;

        this.DeleteUsedSoul();
        ClassSingleton <MonsterUserDataMng> .Instance.DeleteUserMonsterData(this.baseDigimon.userMonster.userMonsterId);

        ChipDataMng.GetUserChipSlotData().DeleteMonsterSlot(this.baseDigimon.userMonster.userMonsterId);
        GooglePlayGamesTool.Instance.Laboratory();
        ClassSingleton <GUIMonsterIconList> .Instance.RefreshList(ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonsterList());

        MonsterData userMonster = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(this.updatedUserMonster_bk.userMonsterId);

        CutsceneDataVersionUp cutsceneDataVersionUp = new CutsceneDataVersionUp();

        cutsceneDataVersionUp.path          = "Cutscenes/VersionUp";
        cutsceneDataVersionUp.beforeModelId = modelId;
        cutsceneDataVersionUp.afterModelId  = userMonster.GetMonsterMaster().Group.modelId;
        CutsceneDataVersionUp cutsceneDataVersionUp2 = cutsceneDataVersionUp;

        if (CMD_VersionUP.< > f__mg$cache1 == null)
        {
            CMD_VersionUP.< > f__mg$cache1 = new Action(CutSceneMain.FadeReqCutSceneEnd);
        }
        cutsceneDataVersionUp2.endCallback = CMD_VersionUP.< > f__mg$cache1;
        CutsceneDataVersionUp cutsceneData = cutsceneDataVersionUp;

        Loading.Invisible();
        CutSceneMain.FadeReqCutScene(cutsceneData, delegate()
        {
            this.OnStartCutScene(isEquipChip);
        }, delegate()
        {
            this.characterDetailed.StartAnimation();
            if (!isEquipChip)
            {
                RestrictionInput.EndLoad();
            }
        }, 0.5f, 0.5f);
    }