protected void SetupSpecies(CharacterStateControl characterStatus)
 {
     if (MonsterDataMng.Instance() != null)
     {
         this.species.text = MonsterTribeData.GetTribeName(characterStatus.characterDatas.tribe);
     }
 }
示例#2
0
    private int GetCountCanVersionUpMonster()
    {
        List <MonsterData> list = MonsterDataMng.Instance().GetMonsterDataList();

        list = MonsterFilter.Filter(list, MonsterFilterType.CAN_VERSION_UP);
        return(list.Count);
    }
        public void SetIconGrayOutUserMonsterList(MonsterData baseMonster)
        {
            List <MonsterData> monsterDataList = MonsterDataMng.Instance().GetMonsterDataList();

            for (int i = 0; i < monsterDataList.Count; i++)
            {
                if (this.IsNotSelectedMonster(baseMonster, monsterDataList[i]))
                {
                    GUIMonsterIcon icon = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(monsterDataList[i]);

                    if (baseMonster == null)
                    {
                        this.iconGrayOut.ResetState(icon);
                    }
                    else if (monsterDataList[i].userMonster.IsLocked || MonsterStatusData.IsSpecialTrainingType(monsterDataList[i].GetMonsterMaster().Group.monsterType))
                    {
                        this.iconGrayOut.BlockLockIcon(icon);
                    }
                    else
                    {
                        this.iconGrayOut.CancelLockIcon(icon);
                    }
                }
            }
        }
    protected override void EndSuccess()
    {
        int  num = int.Parse(this.baseDigimon.userMonster.friendship);
        int  friendshipMaxValue = MonsterFriendshipData.GetFriendshipMaxValue(this.baseDigimon.monsterMG.growStep);
        bool isArousal          = num >= friendshipMaxValue;
        bool isResetEquipChip   = false;

        if (this.baseDigimon.GetChipEquip().IsAttachedChip())
        {
            isResetEquipChip = true;
            base.RemoveEquipChip(false, this.baseDigimon.userMonster.userMonsterId);
        }
        if (this.partnerDigimon.GetChipEquip().IsAttachedChip())
        {
            isResetEquipChip = true;
            base.RemoveEquipChip(false, this.partnerDigimon.userMonster.userMonsterId);
        }
        string[] userMonsterIdList = new string[]
        {
            this.baseDigimon.userMonster.userMonsterId,
            this.partnerDigimon.userMonster.userMonsterId
        };
        ClassSingleton <MonsterUserDataMng> .Instance.DeleteUserMonsterData(userMonsterIdList);

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

        GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList userMonsterData = this.GetUserMonsterData();
        MonsterData userMonster = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(userMonsterData.userMonsterId);

        CutsceneDataFusion cutsceneDataFusion = new CutsceneDataFusion();

        cutsceneDataFusion.path            = "Cutscenes/Fusion";
        cutsceneDataFusion.baseModelId     = this.baseDigimon.GetMonsterMaster().Group.modelId;
        cutsceneDataFusion.materialModelId = this.partnerDigimon.GetMonsterMaster().Group.modelId;
        cutsceneDataFusion.eggModelId      = ClassSingleton <EvolutionData> .Instance.GetEggType(userMonster.userMonster.monsterEvolutionRouteId);

        cutsceneDataFusion.upArousal = isArousal;
        CutsceneDataFusion cutsceneDataFusion2 = cutsceneDataFusion;

        if (CMD_Laboratory.< > f__mg$cache1 == null)
        {
            CMD_Laboratory.< > f__mg$cache1 = new Action(CutSceneMain.FadeReqCutSceneEnd);
        }
        cutsceneDataFusion2.endCallback = CMD_Laboratory.< > f__mg$cache1;
        CutsceneDataFusion cutsceneData = cutsceneDataFusion;

        Loading.Invisible();
        CutSceneMain.FadeReqCutScene(cutsceneData, delegate()
        {
            this.OnStartCutScene(isArousal, isResetEquipChip);
        }, delegate()
        {
            this.characterDetailed.StartAnimation();
            if (!isResetEquipChip)
            {
                RestrictionInput.EndLoad();
            }
        }, 0.5f, 0.5f);
    }
    protected override bool CanEnter()
    {
        List <MonsterData> list = MonsterDataMng.Instance().GetMonsterDataList();

        list = MonsterFilter.Filter(list, MonsterFilterType.GROWING_IN_GARDEN);
        return(list.Count < ConstValue.MAX_CHILD_MONSTER);
    }
示例#6
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>();
        }
    }
示例#7
0
    private void ShowParam()
    {
        this.md_favo = MonsterDataMng.Instance().CreateMonsterDataByMID(CMD_PartsFriendCheckScreen.data.monsterData.monsterId);
        GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(this.md_favo, this.goMN_ICON.transform.localScale, this.goMN_ICON.transform.localPosition, this.goMN_ICON.transform.parent, true, false);

        this.goMN_ICON_2 = guimonsterIcon.gameObject;
        this.goMN_ICON_2.SetActive(true);
        guimonsterIcon.Data = this.md_favo;
        guimonsterIcon.SetTouchAct_S(new Action <MonsterData>(this.actMIconLong));
        guimonsterIcon.SetTouchAct_L(new Action <MonsterData>(this.actMIconLong));
        UIWidget component  = this.goMN_ICON.GetComponent <UIWidget>();
        UIWidget component2 = guimonsterIcon.gameObject.GetComponent <UIWidget>();

        if (component != null && component2 != null)
        {
            int             add        = component.depth - component2.depth;
            DepthController component3 = guimonsterIcon.gameObject.GetComponent <DepthController>();
            component3.AddWidgetDepth(guimonsterIcon.transform, add);
        }
        this.goMN_ICON.SetActive(false);
        TitleDataMng.SetTitleIcon(CMD_PartsFriendCheckScreen.data.userData.titleId, this.goTITLE_ICON.GetComponent <UITexture>());
        this.ngTX_NICKNAME.text   = CMD_PartsFriendCheckScreen.data.userData.nickname;
        this.ngTX_EXP.text        = CMD_PartsFriendCheckScreen.data.userData.description;
        this.ngTX_LAST_LOGIN.text = StringMaster.GetString("Friend-12") + CMD_PartsFriendCheckScreen.data.userData.loginTime;
    }
示例#8
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);
    }
示例#9
0
    private void StartCutSceneCallBack()
    {
        if (CMD_BaseSelect.instance != null)
        {
            CMD_BaseSelect.instance.InitMonsterList(false);
            CMD_BaseSelect.instance.ChipNumUpdate();
            CMD_BaseSelect.instance.SetEmpty();
            CMD_BaseSelect.instance.SetDecideButton(false);
        }
        MonsterData afterMonster = MonsterDataMng.Instance().GetMonsterDataByUserMonsterID(this.evolveDataBK.md.userMonster.userMonsterId, true);

        base.SetCloseAction(delegate(int inx)
        {
            CMD_Evolution $this             = this;
            MonsterData afterMonster        = afterMonster;
            string effectType               = this.evolveDataBK.mem.effectType;
            bool reviewFirstEvolution       = this.execEvolutionReviewStatus == CMD_Evolution.EvolutionReviewStatus.FIRST_EVOLUTION_REVIEW;
            bool reviewFirstUltimaEvolution = this.execEvolutionReviewStatus == CMD_Evolution.EvolutionReviewStatus.FIRST_ULTIMA_EVOLUTION_REVIEW;
            if (CMD_Evolution.< > f__mg$cache4 == null)
            {
                CMD_Evolution.< > f__mg$cache4 = new Action(RestrictionInput.EndLoad);
            }
            $this.detailedWindow = CMD_CharacterDetailed.CreateWindow(afterMonster, effectType, reviewFirstEvolution, reviewFirstUltimaEvolution, CMD_Evolution.< > f__mg$cache4);
        });
        this.ClosePanel(false);
    }
 private void UpdateMonsterIcon()
 {
     if (!this.isUpdate)
     {
         if (this.RespDataChatMessageDataResult.type != 3)
         {
             this.ngTX_USERNAME.text = this.RespDataChatMessageDataResult.userInfo.nickname;
             TitleDataMng.SetTitleIcon(this.RespDataChatMessageDataResult.userInfo.titleId, this.ngTITLE_ICON.GetComponent <UITexture>());
             this.thumbMid = this.RespDataChatMessageDataResult.userInfo.monsterId;
             MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.thumbMid);
             if (monsterData != null)
             {
                 GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.ngMONSTER_ICON.transform.localScale, this.ngMONSTER_ICON.transform.localPosition, this.ngMONSTER_ICON.transform.parent, true, true);
                 guimonsterIcon.onTouchEnded += delegate(Touch touch, Vector2 pos, bool flag)
                 {
                     this.OnThumbnailClicked();
                 };
                 DepthController depthController = guimonsterIcon.GetDepthController();
                 depthController.AddWidgetDepth(guimonsterIcon.transform, 1200);
             }
         }
         if (this.RespDataChatMessageDataResult.type == 4 && DataMng.Instance().UserId != this.RespDataChatMessageDataResult.userId)
         {
             this.ngMULTICODE_BCOL.size = new Vector3(this.ngMULTICODE_BCOL.size.x, this.ngMULTICODE_BCOL.size.y, 5f);
         }
         this.isUpdate = true;
     }
 }
示例#11
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();
    }
示例#12
0
    private void InitMonsterList()
    {
        ClassSingleton <GUIMonsterIconList> .Instance.ResetIconState();

        List <MonsterData> list = MonsterDataMng.Instance().GetMonsterDataList();

        list = MonsterFilter.Filter(list, MonsterFilterType.ALL_OUT_GARDEN);
        MonsterDataMng.Instance().SortMDList(list);
        MonsterDataMng.Instance().SetSortLSMessage();
        this.csSelectPanelMonsterIcon.initLocation = true;
        Vector3 localScale = this.goMN_ICON_LIST[0].transform.localScale;

        if (null != CMD_MultiRecruitPartyWait.Instance)
        {
            this.SetDimmByMonsterDataList(list, CMD_DeckList.SelectMonsterData);
        }
        else
        {
            this.SetDimmByMonsterDataList(CMD_PartyEdit.instance.GetSelectedMD(), CMD_DeckList.SelectMonsterData);
        }
        this.csSelectPanelMonsterIcon.useLocationRecord = true;
        this.csSelectPanelMonsterIcon.SetCheckEnablePushAction(new Func <MonsterData, bool>(this.CheckEnablePush));
        this.targetMonsterList = list;
        list = MonsterDataMng.Instance().SelectionMDList(list);
        this.csSelectPanelMonsterIcon.AllBuild(list, localScale, new Action <MonsterData>(this.ActMIconLong), new Action <MonsterData>(this.ActMIconShort), false);
        this.csSelectPanelMonsterIcon.SetIconDungeonBonus(this.questBonusPack, this.bonusTargetCheck);
        if (this.sortieLimitList != null)
        {
            this.csSelectPanelMonsterIcon.SetIconSortieLimitParts(this.sortieLimitList);
        }
        BtnSort[] componentsInChildren = base.GetComponentsInChildren <BtnSort>(true);
        this.sortButton = componentsInChildren[0];
        this.sortButton.OnChangeSortType      = new Action(this.OnChangeSortSetting);
        this.sortButton.SortTargetMonsterList = this.targetMonsterList;
    }
示例#13
0
    private void InitMonsterList(bool initLoc = true)
    {
        ClassSingleton <GUIMonsterIconList> .Instance.ResetIconState();

        MonsterDataMng     monsterDataMng = MonsterDataMng.Instance();
        List <MonsterData> list           = monsterDataMng.GetMonsterDataList();

        list = MonsterFilter.Filter(list, MonsterFilterType.ALL_OUT_GARDEN);
        monsterDataMng.SortMDList(list);
        monsterDataMng.SetSortLSMessage();
        this.csSelectPanelMonsterIcon.initLocation = initLoc;
        Vector3 localScale = this.goMN_ICON_LIST[0].transform.localScale;

        ClassSingleton <GUIMonsterIconList> .Instance.SetLockIcon();

        this.csSelectPanelMonsterIcon.SetCheckEnablePushAction(null);
        this.csSelectPanelMonsterIcon.useLocationRecord = true;
        this.targetMonsterList = list;
        list = MonsterDataMng.Instance().SelectionMDList(list);
        this.csSelectPanelMonsterIcon.AllBuild(list, localScale, new Action <MonsterData>(this.ActMIconLong), new Action <MonsterData>(this.ActMIconShort), false);
        this.csSelectPanelMonsterIcon.ClearIconDungeonBonus();
        BtnSort[] componentsInChildren = base.GetComponentsInChildren <BtnSort>(true);
        this.sortButton = componentsInChildren[0];
        this.sortButton.OnChangeSortType      = new Action(this.OnChangeSortSetting);
        this.sortButton.SortTargetMonsterList = this.targetMonsterList;
    }
示例#14
0
 private void SetDigimonIcon()
 {
     if (this.data.leaderMonsterId == "0")
     {
         this.data.leaderMonsterId = "81";
     }
     if (string.IsNullOrEmpty(this.data.leaderMonsterId))
     {
         this.goMONSTER_ICON.SetActive(false);
         return;
     }
     if (this.digimonData == null)
     {
         this.digimonData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.leaderMonsterId);
         this.csMonsIcon  = GUIMonsterIcon.MakePrefabByMonsterData(this.digimonData, this.goMONSTER_ICON.transform.localScale, this.goMONSTER_ICON.transform.localPosition, this.goMONSTER_ICON.transform.parent, true, true);
         UIWidget component  = this.goMONSTER_ICON.GetComponent <UIWidget>();
         UIWidget component2 = this.csMonsIcon.gameObject.GetComponent <UIWidget>();
         if (component != null && component2 != null)
         {
             int             add        = component.depth - component2.depth;
             DepthController component3 = this.csMonsIcon.gameObject.GetComponent <DepthController>();
             component3.AddWidgetDepth(this.csMonsIcon.transform, add);
         }
         this.goMONSTER_ICON.SetActive(false);
     }
     else
     {
         this.digimonData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.leaderMonsterId);
         this.csMonsIcon.RefreshPrefabByMonsterData(this.digimonData);
     }
 }
 protected void SetupEvolutionStep(CharacterStateControl characterStatus)
 {
     if (MonsterDataMng.Instance() != null)
     {
         string growStep = MonsterGrowStepData.ToGrowStepString(characterStatus.characterDatas.growStep);
         this.evolutionStep.text = MonsterGrowStepData.GetGrowStepName(growStep);
     }
 }
示例#16
0
    public IEnumerator CreateDigimon(string userMonsterId)
    {
        MonsterData monsterData = MonsterDataMng.Instance().GetMonsterDataByUserMonsterID(userMonsterId, false);

        yield return(base.StartCoroutine(this.CreateDigimon(monsterData)));

        yield break;
    }
        private void OnChangeSortSetting()
        {
            MonsterDataMng.Instance().SortMDList(this.targetMonsterList);
            MonsterDataMng.Instance().SetSortLSMessage();
            List <MonsterData> dts = MonsterDataMng.Instance().SelectionMDList(this.targetMonsterList);

            this.csSelectPanelMonsterIcon.ReAllBuild(dts);
        }
    protected override bool CanSelectMonster(int idx)
    {
        MonsterDataMng     monsterDataMng = MonsterDataMng.Instance();
        List <MonsterData> list           = monsterDataMng.GetMonsterDataList();

        list = MonsterFilter.Filter(list, MonsterFilterType.RESEARCH_TARGET);
        monsterDataMng.SortMDList(list);
        return(list.Count > 1);
    }
    private void ShowInfo()
    {
        GameWebAPI.RespDataWD_GetDungeonInfo.Dungeons dungeon = this.dungeonData.dungeon;
        ClassSingleton <PartyBossIconsAccessor> .Instance.StageEnemies = dungeon.encountEnemies;
        this.ngTX_A_STAGE_DNG_NUMBER.text   = this.dungeonNo;
        this.ngTX_A_STAGE_DNG_TITLE.text    = this.dungeonData.worldDungeonM.name;
        this.ngTX_A_STAGE_DNG_DESCRIPT.text = this.dungeonData.worldDungeonM.description;
        this.getEXPLabel.text     = dungeon.exp.ToString();
        this.getClusterLabel.text = StringFormat.Cluster(dungeon.money);
        int num = 0;
        int i;

        for (i = 0; i < dungeon.encountEnemies.Length; i++)
        {
            if (num >= this.goENCOUNT_MONS_LIST.Count)
            {
                break;
            }
            GameWebAPI.RespDataWD_GetDungeonInfo.EncountEnemy encountEnemy = dungeon.encountEnemies[i];
            if (encountEnemy.type == 2 || encountEnemy.type == 4)
            {
                string text = encountEnemy.monsterId.ToString();
                if (!string.IsNullOrEmpty(text))
                {
                    MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(text);
                    if (monsterData != null)
                    {
                        GUIMonsterIcon  guimonsterIcon  = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goENCOUNT_MONS_LIST[num].transform.localScale, this.goENCOUNT_MONS_LIST[num].transform.localPosition, this.goENCOUNT_MONS_LIST[num].transform.parent, true, false);
                        DepthController depthController = guimonsterIcon.GetDepthController();
                        depthController.AddWidgetDepth(guimonsterIcon.transform, 40);
                        guimonsterIcon.SetTouchAct_S(delegate(MonsterData tappedMonsterData)
                        {
                            this.ActCallBackEncMons(tappedMonsterData, encountEnemy.resistanceId);
                        });
                        this.goENCOUNT_MONS_LIST[num].SetActive(false);
                        num++;
                    }
                }
            }
        }
        if (this.dungeonData.dungeon.isExtraWave == 1 && num < this.goENCOUNT_MONS_LIST.Count)
        {
            GUIMonsterIcon guimonsterIcon2 = GUIMonsterIcon.MakeQuestionPrefab(this.goENCOUNT_MONS_LIST[num].transform.localScale, this.goENCOUNT_MONS_LIST[num].transform.localPosition, (int)(this.goENCOUNT_MONS_LIST[num].transform.localPosition.z + 35f), this.goENCOUNT_MONS_LIST[num].transform.parent);
            guimonsterIcon2.SetTouchAct_S(null);
            guimonsterIcon2.SetTouchAct_L(null);
        }
        while (i < this.goENCOUNT_MONS_LIST.Count)
        {
            this.goENCOUNT_MONS_LIST[i].SetActive(false);
            i++;
        }
        this.ShowDropItems();
        this.goContentsROOT.SetActive(true);
        this.goPointContentsROOT.SetActive(true);
        this.bonusPointUI.Initialize(this.areaId, this.dungeonData.worldDungeonM.worldStageId, this.dungeonData.worldDungeonM.worldDungeonId);
        this.bonusPointUI.SetBonusUI();
    }
 private void GetLastMonsterId(string[] userMonsterIds, bool isEvolvePage = false)
 {
     for (int i = 0; i < userMonsterIds.Length; i++)
     {
         if (!string.IsNullOrEmpty(userMonsterIds[i]))
         {
             MonsterData monsterDataByUserMonsterID = MonsterDataMng.Instance().GetMonsterDataByUserMonsterID(userMonsterIds[i], isEvolvePage);
             this.lastMonstreIDs[i] = monsterDataByUserMonsterID.monsterM.monsterId;
         }
     }
 }
示例#21
0
        public void ClearGrayOutBlockMonster()
        {
            List <MonsterData> monsterDataList = MonsterDataMng.Instance().GetMonsterDataList();

            for (int i = 0; i < monsterDataList.Count; i++)
            {
                GUIMonsterIcon icon = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(monsterDataList[i]);

                this.iconGrayOut.ResetState(icon);
            }
        }
    private int[] GetFiriendShipAddPoints()
    {
        int[] array = new int[this.deckData.monsterList.Length];
        int   i     = 0;

        while (i < this.deckData.monsterList.Length)
        {
            string tgtId = string.Empty;
            int    num   = -1;
            if (!this.isMulti)
            {
                tgtId = this.deckData.monsterList[i].userMonsterId;
                GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList userMonsterList = this.memoryMonsterList.Single((GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList x) => x.userMonsterId == tgtId);
                num = userMonsterList.friendship.ToInt32();
                goto IL_15F;
            }
            GameWebAPI.RespData_WorldMultiStartInfo respData_WorldMultiStartInfo = DataMng.Instance().RespData_WorldMultiStartInfo;
            int partyIndex   = DataMng.Instance().GetPartyIndex(i);
            int monsterIndex = DataMng.Instance().GetMonsterIndex(i);
            GameWebAPI.Common_MonsterData common_MonsterData = respData_WorldMultiStartInfo.party[partyIndex].userMonsters[monsterIndex];
            if (int.Parse(common_MonsterData.userId) == DataMng.Instance().RespDataCM_Login.playerInfo.UserId)
            {
                tgtId = respData_WorldMultiStartInfo.party[partyIndex].userMonsters[monsterIndex].userMonsterId;
                for (int j = 0; j < this.oldMonsterInfoList.Length; j++)
                {
                    if (this.oldMonsterInfoList != null && tgtId == this.oldMonsterInfoList[j].userMonsterId)
                    {
                        num = this.oldMonsterInfoList[j].friendship.ToInt32();
                        break;
                    }
                }
                goto IL_15F;
            }
            array[i] = 0;
IL_1C1:
            i++;
            continue;
IL_15F:
            MonsterData monsterDataByUserMonsterID = MonsterDataMng.Instance().GetMonsterDataByUserMonsterID(tgtId, false);
            if (string.IsNullOrEmpty(monsterDataByUserMonsterID.userMonster.friendship))
            {
                monsterDataByUserMonsterID.userMonster.friendship = "0";
            }
            int num2 = int.Parse(monsterDataByUserMonsterID.userMonster.friendship);
            if (num == -1)
            {
                num = num2;
            }
            int num3 = num2 - num;
            array[i] = num3;
            goto IL_1C1;
        }
        return(array);
    }
    private void OfflineGrow_Step2(MonsterData monsterData)
    {
        MonsterClientMaster monsterMaster = monsterData.GetMonsterMaster();
        string modelId                 = monsterMaster.Group.modelId;
        string growStep                = monsterMaster.Group.growStep;
        string userMonsterId           = monsterData.GetMonster().userMonsterId;
        string monsterEvolutionRouteId = monsterData.GetMonster().monsterEvolutionRouteId;

        foreach (GameWebAPI.RespDataMA_GetMonsterEvolutionRouteM.MonsterEvolutionRouteM monsterEvolutionRouteM2 in MasterDataMng.Instance().RespDataMA_MonsterEvolutionRouteM.monsterEvolutionRouteM)
        {
            if (monsterEvolutionRouteId == monsterEvolutionRouteM2.monsterEvolutionRouteId)
            {
                monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(monsterEvolutionRouteM2.growthMonsterId);
                break;
            }
        }
        MonsterDataMng.Instance().GetMonsterDataList()[0].userMonster.growEndDate = string.Empty;
        monsterData.userMonster.ex                  = "0";
        monsterData.userMonster.hpAbilityFlg        = "0";
        monsterData.userMonster.attackAbilityFlg    = "0";
        monsterData.userMonster.defenseAbilityFlg   = "0";
        monsterData.userMonster.spAttackAbilityFlg  = "0";
        monsterData.userMonster.spDefenseAbilityFlg = "0";
        monsterData.userMonster.speedAbilityFlg     = "0";
        monsterData.userMonster.friendship          = "0";
        StatusValue statusValue = MonsterStatusData.GetStatusValue(monsterData.userMonster.monsterId, monsterData.userMonster.level);

        statusValue.luck = 1;
        monsterData.SetStatus(statusValue);
        monsterData.userMonster.userMonsterId = userMonsterId;
        ClassSingleton <MonsterUserDataMng> .Instance.UpdateUserMonsterData(monsterData.userMonster);

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

        monsterData = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(userMonsterId);

        monsterMaster = monsterData.GetMonsterMaster();
        CutsceneDataEvolution cutsceneDataEvolution = new CutsceneDataEvolution();

        cutsceneDataEvolution.path           = "Cutscenes/Evolution";
        cutsceneDataEvolution.beforeModelId  = modelId;
        cutsceneDataEvolution.beforeGrowStep = growStep;
        cutsceneDataEvolution.afterModelId   = monsterMaster.Group.modelId;
        cutsceneDataEvolution.afterGrowStep  = monsterMaster.Group.growStep;
        cutsceneDataEvolution.endCallback    = delegate()
        {
            FarmCameraControlForCMD.On();
            CutSceneMain.FadeReqCutSceneEnd();
        };
        CutsceneDataEvolution cutsceneData = cutsceneDataEvolution;

        this.CallEvolutionCutScene(monsterData, cutsceneData);
    }
示例#24
0
    protected virtual IEnumerator CreateHomeData()
    {
        GUIPlayerStatus.RefreshParams_S(false);
        ClassSingleton <GUIMonsterIconList> .Instance.RefreshList(MonsterDataMng.Instance().GetMonsterDataList());

        ClassSingleton <FaceMissionAccessor> .Instance.faceMission.MissionTapCheck();

        ClassSingleton <FaceMissionAccessor> .Instance.faceMission.SetBadge(false);

        ClassSingleton <FacePresentAccessor> .Instance.facePresent.SetBadgeOnly();

        ClassSingleton <FaceNewsAccessor> .Instance.faceNews.SetBadgeOnly();

        ClassSingleton <PartsMenuFriendIconAccessor> .Instance.partsMenuFriendIcon.FrinedListCheck();

        if (ConstValue.IS_CHAT_OPEN != 1)
        {
            ClassSingleton <FaceChatNotificationAccessor> .Instance.faceChatNotification.gameObject.SetActive(false);
        }
        GUIFace.SetFacilityShopButtonBadge();
        PartsMenu.SetMenuButtonAlertBadge();
        this.DownloadMenuBanner();
        while (!TextureManager.instance.isLoadSaveData)
        {
            yield return(null);
        }
        GameWebAPI.RespDataCM_LoginBonus respDataCM_LoginBonus = DataMng.Instance().RespDataCM_LoginBonus;
        if (respDataCM_LoginBonus.loginBonus != null && respDataCM_LoginBonus.loginBonus.campaign != null)
        {
            GameWebAPI.RespDataCM_LoginBonus.LoginBonus[] campaign2 = respDataCM_LoginBonus.loginBonus.campaign;
            for (int i = 0; i < campaign2.Length; i++)
            {
                GameWebAPI.RespDataCM_LoginBonus.LoginBonus campaign = campaign2[i];
                bool   isLoadEnd = false;
                string path      = CMD_LoginCampaign.GetBgPathForFTP(campaign.backgroundImg);
                TextureManager.instance.Load(path, delegate(Texture2D texture)
                {
                    isLoadEnd = true;
                }, 30f, true);
                while (!isLoadEnd)
                {
                    yield return(null);
                }
            }
        }
        yield return(base.StartCoroutine(this.CreateFarm()));

        this.StartCacheBattle();
        this.StartCacheParty();
        LeadCapture.Instance.CheckCaptureUpdate();
        this.ShowCampaignFacilityIcon();
        yield break;
    }
    private void CreateDigimonThumbnail()
    {
        if (!this.isMulti)
        {
            int[] aliveInfo = DataMng.Instance().WD_ReqDngResult.aliveInfo;
            for (int i = 0; i < this.deckData.monsterList.Length; i++)
            {
                this.digimonInfos[i].DigimonNo = i;
                GameWebAPI.RespDataMN_GetDeckList.MonsterList monsterList = this.deckData.monsterList[i];
                MonsterData userMonster = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(monsterList.userMonsterId);

                MonsterData    monsterData    = MonsterDataMng.Instance().CreateMonsterDataByMID(userMonster.GetMonster().monsterId);
                Transform      iconLocator    = this.digimonInfos[i].GetIconLocator();
                GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, iconLocator.localScale, iconLocator.localPosition, iconLocator.parent, true, false);
                guimonsterIcon.name           = "DigimonIcon" + i;
                guimonsterIcon.activeCollider = false;
                int depth = guimonsterIcon.GetComponent <UIWidget>().depth;
                this.digimonInfos[i].SetDepth(depth);
                if (aliveInfo.Length > i && aliveInfo[i] == 0)
                {
                    guimonsterIcon.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.NOTACTIVE);
                }
            }
        }
        else
        {
            int[] aliveInfo2 = DataMng.Instance().WD_ReqDngResult.aliveInfo;
            GameWebAPI.RespData_WorldMultiStartInfo respData_WorldMultiStartInfo = DataMng.Instance().RespData_WorldMultiStartInfo;
            for (int j = 0; j < this.digimonInfos.Length; j++)
            {
                this.digimonInfos[j].DigimonNo = j;
                int            partyIndex      = DataMng.Instance().GetPartyIndex(j);
                int            monsterIndex    = DataMng.Instance().GetMonsterIndex(j);
                MonsterData    monsterData2    = MonsterDataMng.Instance().CreateMonsterDataByMID(respData_WorldMultiStartInfo.party[partyIndex].userMonsters[monsterIndex].monsterId);
                Transform      iconLocator2    = this.digimonInfos[j].GetIconLocator();
                GUIMonsterIcon guimonsterIcon2 = GUIMonsterIcon.MakePrefabByMonsterData(monsterData2, iconLocator2.localScale, iconLocator2.localPosition, iconLocator2.parent, true, false);
                guimonsterIcon2.name           = "DigimonIcon" + j;
                guimonsterIcon2.activeCollider = false;
                int depth2 = guimonsterIcon2.GetComponent <UIWidget>().depth;
                this.digimonInfos[j].SetDepth(depth2);
                guimonsterIcon2.SetPlayerIcon(partyIndex + 1);
                if (aliveInfo2.Length > j && aliveInfo2[j] == 0)
                {
                    guimonsterIcon2.SetGrayout(GUIMonsterIcon.DIMM_LEVEL.NOTACTIVE);
                }
            }
        }
        foreach (BattleResultDigimonInfo battleResultDigimonInfo in this.digimonInfos)
        {
            NGUITools.SetActiveSelf(battleResultDigimonInfo.gameObject, false);
        }
    }
    private APIRequestTask RequestUserMonsterData()
    {
        int num = int.Parse(DataMng.Instance().RespDataMN_DeckList.selectDeckNum) - 1;

        GameWebAPI.RespDataMN_GetDeckList.DeckList deckList = DataMng.Instance().RespDataMN_DeckList.deckList[num];
        int[] aliveInfo = DataMng.Instance().WD_ReqDngResult.aliveInfo;
        GameWebAPI.RespData_WorldMultiStartInfo respData_WorldMultiStartInfo = DataMng.Instance().RespData_WorldMultiStartInfo;
        List <int>         aliveUserMonsterIds = new List <int>();
        List <MonsterData> list = new List <MonsterData>();
        int i = 0;

        while (i < aliveInfo.Length)
        {
            string text = string.Empty;
            if (respData_WorldMultiStartInfo == null)
            {
                goto IL_D6;
            }
            int partyIndex   = DataMng.Instance().GetPartyIndex(i);
            int monsterIndex = DataMng.Instance().GetMonsterIndex(i);
            GameWebAPI.Common_MonsterData common_MonsterData = respData_WorldMultiStartInfo.party[partyIndex].userMonsters[monsterIndex];
            if (int.Parse(common_MonsterData.userId) == DataMng.Instance().RespDataCM_Login.playerInfo.UserId)
            {
                text = common_MonsterData.userMonsterId;
                goto IL_D6;
            }
IL_137:
            i++;
            continue;
IL_D6:
            if (aliveInfo[i] == 1 && deckList.monsterList.Length > i)
            {
                string      text2 = (respData_WorldMultiStartInfo != null) ? text : deckList.monsterList[i].userMonsterId;
                MonsterData monsterDataByUserMonsterID = MonsterDataMng.Instance().GetMonsterDataByUserMonsterID(text2, false);
                list.Add(monsterDataByUserMonsterID);
                aliveUserMonsterIds.Add(int.Parse(text2));
                goto IL_137;
            }
            goto IL_137;
        }
        GameWebAPI.RequestMonsterList requestMonsterList = new GameWebAPI.RequestMonsterList();
        requestMonsterList.SetSendData = delegate(GameWebAPI.ReqDataUS_GetMonsterList param)
        {
            param.userMonsterIds = aliveUserMonsterIds.ToArray();
        };
        requestMonsterList.OnReceived = delegate(GameWebAPI.RespDataUS_GetMonsterList response)
        {
            ClassSingleton <MonsterUserDataMng> .Instance.UpdateUserMonsterData(response.userMonsterList);
        };
        GameWebAPI.RequestMonsterList request = requestMonsterList;
        return(new APIRequestTask(request, true));
    }
示例#27
0
    private void OnChangeSortSetting()
    {
        MonsterDataMng.Instance().SortMDList(this.targetMonsterList);
        MonsterDataMng.Instance().SetSortLSMessage();
        List <MonsterData> dts = MonsterDataMng.Instance().SelectionMDList(this.targetMonsterList);

        this.csSelectPanelMonsterIcon.ReAllBuild(dts);
        if (this.baseDigimon != null)
        {
            this.monsterList.SetGrayOutDeckMonster(this.baseDigimon);
            this.monsterList.SetGrayOutUserMonsterList(this.baseDigimon);
        }
    }
示例#28
0
 public void SetUI(QuestBonusPack questBonus, QuestBonusTargetCheck checker)
 {
     PartsPartyMonsInfo[] array = this.CreateMonsterInfo();
     this.ppmiList = new List <PartsPartyMonsInfo>();
     GameWebAPI.RespDataMN_GetDeckList.MonsterList[] monsterList = this.deckList.monsterList;
     for (int i = 0; i < monsterList.Length; i++)
     {
         array[i].SetQuestBonus(questBonus, checker);
         array[i].Data = MonsterDataMng.Instance().GetMonsterDataByUserMonsterID(monsterList[i].userMonsterId, false);
         array[i].ShowGUI();
         this.ppmiList.Add(array[i]);
     }
 }
示例#29
0
    private void SetInitLabel()
    {
        this.lbUserName.text = this.data.ownerName;
        this.lbComment.text  = this.data.introduction;
        TitleDataMng.SetTitleIcon(this.data.titleId, this.goTitleIcon.GetComponent <UITexture>());
        GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM[] worldStageM  = MasterDataMng.Instance().RespDataMA_WorldStageM.worldStageM;
        GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM   worldStageM2 = worldStageM.SingleOrDefault((GameWebAPI.RespDataMA_GetWorldStageM.WorldStageM x) => x.worldStageId == this.data.worldStageId);
        this.lbQuestName.text = worldStageM2.name + "\n" + this.data.dungeonName;
        string moodType = this.data.moodType;

        if (moodType != null)
        {
            if (moodType == "1")
            {
                this.lbMoodType.text = StringMaster.GetString("RecruitRule-06");
                goto IL_125;
            }
            if (moodType == "2")
            {
                this.lbMoodType.text = StringMaster.GetString("RecruitRule-07");
                goto IL_125;
            }
            if (!(moodType == "3"))
            {
            }
        }
        this.lbMoodType.text = StringMaster.GetString("RecruitRule-08");
IL_125:
        this.lbNowMemberNum.text = string.Format(StringMaster.GetString("SystemFraction"), this.data.memberCount, 3);
        if (!this.isOpenedQuest)
        {
            this.bgFrame.color     = ConstValue.DEFAULT_COLOR;
            this.lbUserName.color  = ConstValue.DEACTIVE_BUTTON_LABEL;
            this.lbQuestName.color = ConstValue.DEACTIVE_BUTTON_LABEL;
            this.lbComment.color   = ConstValue.DEACTIVE_BUTTON_LABEL;
        }
        if (this.data.ownerMonsterId != null)
        {
            MonsterData monsterData = MonsterDataMng.Instance().CreateMonsterDataByMID(this.data.ownerMonsterId);
            if (monsterData != null)
            {
                GUIMonsterIcon guimonsterIcon = GUIMonsterIcon.MakePrefabByMonsterData(monsterData, this.goMasterIcon.transform.localScale, this.goMasterIcon.transform.localPosition, this.goMasterIcon.transform.parent, true, false);
                UIWidget       component      = base.gameObject.GetComponent <UIWidget>();
                if (component != null)
                {
                    DepthController depthController = guimonsterIcon.GetDepthController();
                    depthController.AddWidgetDepth(guimonsterIcon.transform, component.depth + 2);
                }
            }
        }
    }
示例#30
0
        public void ClearIconGrayOutPartnerMonster(MonsterData baseDigimon, List <MonsterData> partnerMonsterList)
        {
            List <MonsterData> monsterDataList = MonsterDataMng.Instance().GetMonsterDataList();

            for (int i = 0; i < monsterDataList.Count; i++)
            {
                if (monsterDataList[i] != baseDigimon && !partnerMonsterList.Contains(monsterDataList[i]))
                {
                    GUIMonsterIcon icon = ClassSingleton <GUIMonsterIconList> .Instance.GetIcon(monsterDataList[i]);

                    this.iconGrayOut.SetIdleIcon(icon);
                }
            }
        }