Example #1
0
        public void Initialize()
        {
            float num = 0.227450982f;

            this.grayOutTextColor   = new Color(num, num, num);
            this.selectedSpriteName = this.buttonSprite.spriteName;
            this.buttonCollider     = base.gameObject.GetComponent <BoxCollider>();
            if (0 < this.growList.Length && this.growList[0] != GrowStep.NONE)
            {
                this.label.text = string.Empty;
                for (int i = 0; i < this.growList.Length; i++)
                {
                    int num2 = (int)this.growList[i];
                    if (string.IsNullOrEmpty(this.label.text))
                    {
                        this.label.text = MonsterGrowStepData.GetGrowStepName(num2.ToString());
                    }
                    else
                    {
                        UILabel uilabel = this.label;
                        uilabel.text = uilabel.text + "\n" + MonsterGrowStepData.GetGrowStepName(num2.ToString());
                    }
                }
            }
        }
 protected void SetupEvolutionStep(CharacterStateControl characterStatus)
 {
     if (MonsterDataMng.Instance() != null)
     {
         string growStep = MonsterGrowStepData.ToGrowStepString(characterStatus.characterDatas.growStep);
         this.evolutionStep.text = MonsterGrowStepData.GetGrowStepName(growStep);
     }
 }
    public void SetParams(List <MonsterData> selectedMonsterDataList, string getCluster)
    {
        this.titleLabel.text         = StringMaster.GetString("SaleConfirmTitle");
        this.normalMessageLabel.text = StringMaster.GetString("SaleConfirmInfo");
        bool          flag  = MonsterUserDataMng.AnyChipEquipMonster(selectedMonsterDataList);
        bool          flag2 = MonsterUserDataMng.AnyHighGrowStepMonster(selectedMonsterDataList);
        List <string> list  = new List <string>();
        bool          flag3 = false;
        bool          flag4 = false;

        foreach (MonsterData monsterData in selectedMonsterDataList)
        {
            bool flag5 = MonsterStatusData.IsArousal(monsterData.GetMonsterMaster().Simple.rare);
            bool flag6 = MonsterStatusData.IsVersionUp(monsterData.GetMonsterMaster().Simple.rare);
            if (flag6)
            {
                flag4 = true;
            }
            else if (flag5)
            {
                flag3 = true;
            }
        }
        if (flag3)
        {
            list.Add(StringMaster.GetString("SaleCautionArousal"));
        }
        if (flag4)
        {
            list.Add(StringMaster.GetString("SaleCautionVersionUp"));
        }
        if (flag)
        {
            list.Add(StringMaster.GetString("SaleCautionChip"));
        }
        if (flag2)
        {
            string growStep     = ConstValue.GROW_STEP_HIGH.ToString();
            string growStepName = MonsterGrowStepData.GetGrowStepName(growStep);
            list.Add(string.Format(StringMaster.GetString("SaleCautionGrowth"), growStepName));
        }
        if (list.Count >= 3)
        {
            int num = (this.warningMessageLabel.fontSize + this.warningMessageLabel.spacingY) * (list.Count - 2);
            base.GetComponent <UIWidget>().height += num;
        }
        this.warningMessageLabel.text = string.Join("\n", list.ToArray());
        for (int i = 0; i < this.guiMonsterIcons.Length; i++)
        {
            if (selectedMonsterDataList.Count > i)
            {
                GUIMonsterIcon guimonsterIcon = this.guiMonsterIcons[i];
                MonsterData    md             = selectedMonsterDataList[i];
                this.CreateIcon(i, md, guimonsterIcon.gameObject);
            }
        }
        this.getClusterLabel.text = getCluster;
    }
 public void SetBossDetails(MonsterData monsterData, int resistanceId)
 {
     this.digimonNameLabel.text = monsterData.monsterMG.monsterName;
     this.tribeLabel.text       = MonsterTribeData.GetTribeName(monsterData.monsterMG.tribe);
     this.growStepLabel.text    = MonsterGrowStepData.GetGrowStepName(monsterData.monsterMG.growStep);
     GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM resistanceMaster = MonsterResistanceData.GetResistanceMaster(resistanceId.ToString());
     this.monsterResistanceList.SetValues(resistanceMaster);
     this.monsterInvalidResistanceList.SetInvalid(resistanceMaster);
 }
Example #5
0
 public void SetMonsterData(PicturebookDetailedInfo viewInfo)
 {
     this.monsterName.text  = viewInfo.monster.monsterMaster.Group.monsterName;
     this.specificType.text = MonsterSpecificTypeData.GetSpecificTypeName(viewInfo.monster.monsterMaster.Group.monsterStatusId);
     this.growStep.text     = MonsterGrowStepData.GetGrowStepName(viewInfo.monster.monsterMaster.Group.growStep);
     this.tribe.text        = MonsterTribeData.GetTribeName(viewInfo.monster.monsterMaster.Group.tribe);
     this.description.text  = viewInfo.monster.monsterMaster.Group.description;
     for (int i = 0; i < viewInfo.uniqueSkillCount; i++)
     {
         this.skillNameList[i].text        = viewInfo.skillGroupSubIdList[i].Simple.name;
         this.skillDescriptionList[i].text = viewInfo.skillGroupSubIdList[i].Simple.description;
     }
 }
 public void SetMonsterData(MonsterData monsterData)
 {
     if (null != this.monsterName)
     {
         this.monsterName.text = monsterData.monsterMG.monsterName;
     }
     this.growName.text  = MonsterGrowStepData.GetGrowStepName(monsterData.monsterMG.growStep);
     this.tribeName.text = MonsterTribeData.GetTribeName(monsterData.monsterMG.tribe);
     if (this.arousalUI.exist)
     {
         this.SetArousal(monsterData.monsterM.rare.ToInt32());
     }
     this.SetLevel(monsterData);
     this.specificTypeName.text = MonsterSpecificTypeData.GetSpecificTypeName(monsterData.monsterMG.monsterStatusId);
 }
Example #7
0
        protected override void OnUpdatedParts(int listPartsIndex)
        {
            List <EvolutionDiagramData.IconMonster> routeMapData = this.listRoot.GetRouteMapData();

            if (routeMapData != null && listPartsIndex < routeMapData.Count && routeMapData[listPartsIndex] != null)
            {
                EvolutionDiagramData.IconMonster iconMonster = routeMapData[listPartsIndex];
                this.monsterIcon.SetMonsterImage(iconMonster.master);
                if (!MonsterPicturebookData.ExistPicturebook(iconMonster.master.Group.monsterCollectionId))
                {
                    this.monsterIcon.Message.SetSortText(StringMaster.GetString("EvolutionUnkown"));
                }
                else
                {
                    this.monsterIcon.Message.ClearSortText();
                }
                this.growStep.text     = MonsterGrowStepData.GetGrowStepName(iconMonster.master.Group.growStep);
                this.monsterName.text  = iconMonster.master.Group.monsterName;
                this.specificName.text = MonsterSpecificTypeData.GetSpecificTypeName(iconMonster.master.Group.monsterStatusId);
            }
        }
    public void SetBossDetails(int monsterId, int resistanceId)
    {
        GameWebAPI.RespDataMA_GetMonsterMS.MonsterM simple = MonsterMaster.GetMonsterMasterByMonsterId(monsterId.ToString()).Simple;
        GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group  = MonsterMaster.GetMonsterMasterByMonsterGroupId(simple.monsterGroupId).Group;
        this.digimonNameLabel.text = group.monsterName;
        this.tribeLabel.text       = MonsterTribeData.GetTribeName(group.tribe);
        this.growStepLabel.text    = MonsterGrowStepData.GetGrowStepName(group.growStep);
        GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM monsterResistanceM = null;
        string b = resistanceId.ToString();

        GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM[] monsterResistanceM2 = MasterDataMng.Instance().RespDataMA_MonsterResistanceM.monsterResistanceM;
        for (int i = 0; i < monsterResistanceM2.Length; i++)
        {
            if (monsterResistanceM2[i].monsterResistanceId == b)
            {
                monsterResistanceM = monsterResistanceM2[i];
                break;
            }
        }
        this.monsterResistanceList.SetValues(monsterResistanceM);
        this.monsterInvalidResistanceList.SetInvalid(monsterResistanceM);
    }
Example #9
0
    private void SetGrowStepList(List <GameWebAPI.RespDataMA_WorldDungeonSortieLimit.WorldDungeonSortieLimit> limitList)
    {
        List <string> list = new List <string>();
        int           num  = 0;

        for (int i = 0; i < limitList.Count; i++)
        {
            string growStepName = MonsterGrowStepData.GetGrowStepName(limitList[i].growStep);
            if (!list.Contains(growStepName))
            {
                SortieLimitListItem growStepListItem = this.GetGrowStepListItem();
                if (null != growStepListItem)
                {
                    list.Add(growStepName);
                    growStepListItem.gameObject.SetActive(true);
                    growStepListItem.SetText(growStepName);
                    num++;
                }
            }
        }
        this.growStepRoot.columns = num;
        this.growStepRoot.Reposition();
    }
 private void ShowDetail()
 {
     if (!this.data.userMonster.IsEgg())
     {
         this.ngTX_NAME.text  = this.data.monsterMG.monsterName;
         this.ngTX_GRADE.text = MonsterGrowStepData.GetGrowStepName(this.data.monsterMG.growStep);
         if (CMD_DigiGarden.instance != null && CMD_DigiGarden.instance.IsOfflineModeFlag)
         {
             this.ngTX_EXP.text = StringMaster.GetString("Garden-13");
         }
     }
     else
     {
         string text = StringMaster.GetString("CharaStatus-06");
         foreach (GameWebAPI.RespDataMA_GetMonsterEvolutionRouteM.MonsterEvolutionRouteM monsterEvolutionRouteM2 in MasterDataMng.Instance().RespDataMA_MonsterEvolutionRouteM.monsterEvolutionRouteM)
         {
             if (monsterEvolutionRouteM2.monsterEvolutionRouteId == this.data.userMonster.monsterEvolutionRouteId)
             {
                 MonsterClientMaster monsterMasterByMonsterGroupId = MonsterMaster.GetMonsterMasterByMonsterGroupId(monsterEvolutionRouteM2.eggMonsterId);
                 text = monsterMasterByMonsterGroupId.Group.monsterName;
             }
         }
         this.ngTX_NAME.text  = text;
         this.ngTX_GRADE.text = StringMaster.GetString("CharaStatus-04");
         this.ngTX_EXP.text   = StringMaster.GetString("Garden-08");
         this.canEvolveParticle.SetActive(true);
     }
     if (this.data.userMonster.IsEgg())
     {
         this.ngTX_BTN.text = StringMaster.GetString("Garden-12");
     }
     else
     {
         this.ngTX_BTN.text = StringMaster.GetString("EvolutionTitle");
     }
 }
    public void SetParams(List <MonsterData> selectedMonsterDataList, string useCluster, int baseDigimonSkillNumber, int partnerDigimonSkillNumber)
    {
        if (partnerDigimonSkillNumber == 1)
        {
            this.monsterSuccessionSkill.SetCommonSkill(selectedMonsterDataList[0]);
        }
        else
        {
            this.monsterSuccessionSkill.SetCommonSkill2(selectedMonsterDataList[0]);
        }
        bool          flag  = MonsterUserDataMng.AnyChipEquipMonster(selectedMonsterDataList);
        bool          flag2 = MonsterUserDataMng.AnyHighGrowStepMonster(selectedMonsterDataList);
        List <string> list  = new List <string>();
        bool          flag3 = false;
        bool          flag4 = false;

        foreach (MonsterData monsterData in selectedMonsterDataList)
        {
            bool flag5 = MonsterStatusData.IsArousal(monsterData.GetMonsterMaster().Simple.rare);
            bool flag6 = MonsterStatusData.IsVersionUp(monsterData.GetMonsterMaster().Simple.rare);
            if (flag6)
            {
                flag4 = true;
            }
            else if (flag5)
            {
                flag3 = true;
            }
        }
        if (flag3)
        {
            list.Add(StringMaster.GetString("SuccessionCautionArousal"));
        }
        if (flag4)
        {
            list.Add(StringMaster.GetString("SuccessionCautionVersionUp"));
        }
        if (flag)
        {
            list.Add(StringMaster.GetString("CautionDisappearChip"));
        }
        if (flag2)
        {
            string growStep     = ConstValue.GROW_STEP_HIGH.ToString();
            string growStepName = MonsterGrowStepData.GetGrowStepName(growStep);
            list.Add(string.Format(StringMaster.GetString("SuccessionCautionGrowth"), growStepName));
        }
        if (list.Count >= 2)
        {
            int num = (this.warningMessageLabel.fontSize + this.warningMessageLabel.spacingY) * (list.Count - 1);
            this.warningMessageLabel.transform.SetLocalY(this.warningMessageLabel.transform.localPosition.y - (float)(num / 2));
            this.dialogPlate.transform.SetLocalY(this.dialogPlate.transform.localPosition.y - (float)(num / 2));
            this.dialogPlate.GetComponent <UIWidget>().height += num;
            this.btnGroup.transform.SetLocalY(this.btnGroup.transform.localPosition.y - (float)num);
        }
        this.warningMessageLabel.text = string.Join("\n", list.ToArray());
        this.useClusterLabel.text     = useCluster;
        string @string = StringMaster.GetString("SuccessionConfirmInfo");

        this.normalMessageLabel.text = string.Format(@string, baseDigimonSkillNumber);
    }
    public void SetSortLSMessage(MonsterSortType sortType)
    {
        for (int i = 0; i < this.monsterIconList.Count; i++)
        {
            this.monsterIconList[i].SetMessageLevel();
            this.monsterIconList[i].SetSortMessageColor(ConstValue.DIGIMON_GREEN);
            MonsterData data = this.monsterIconList[i].Data;
            switch (sortType)
            {
            case MonsterSortType.DATE:
            case MonsterSortType.AROUSAL:
            case MonsterSortType.LEVEL:
                this.monsterIconList[i].SortMess = string.Empty;
                break;

            case MonsterSortType.HP:
                this.monsterIconList[i].SetMonsterSortMessage(data.userMonster.hp);
                break;

            case MonsterSortType.ATK:
                this.monsterIconList[i].SetMonsterSortMessage(data.userMonster.attack);
                break;

            case MonsterSortType.DEF:
                this.monsterIconList[i].SetMonsterSortMessage(data.userMonster.defense);
                break;

            case MonsterSortType.S_ATK:
                this.monsterIconList[i].SetMonsterSortMessage(data.userMonster.spAttack);
                break;

            case MonsterSortType.S_DEF:
                this.monsterIconList[i].SetMonsterSortMessage(data.userMonster.spDefense);
                break;

            case MonsterSortType.SPD:
                this.monsterIconList[i].SetMonsterSortMessage(data.userMonster.speed);
                break;

            case MonsterSortType.LUCK:
                this.monsterIconList[i].SetMonsterSortMessage(data.userMonster.luck);
                break;

            case MonsterSortType.GROW_STEP:
                if (data.userMonster.IsEgg())
                {
                    this.monsterIconList[i].SortMess = MonsterGrowStepData.GetGrowStepName(MonsterGrowStepData.ToGrowStepString(GrowStep.EGG));
                }
                else
                {
                    this.monsterIconList[i].SortMess = MonsterGrowStepData.GetGrowStepName(data.monsterMG.growStep);
                }
                break;

            case MonsterSortType.TRIBE:
            {
                string tribeName = MonsterTribeData.GetTribeName(data.monsterMG.tribe);
                this.monsterIconList[i].SetMonsterSortMessage(tribeName);
                break;
            }
            }
        }
    }
    private ChipSphereIconButton.Parameter CreateParameter(int myGrowStep, int myArousal, int buttonNo)
    {
        int type = 0;

        CMD_ChipSphere.MenuType menuType = CMD_ChipSphere.MenuType.Empty;
        string chipName   = string.Empty;
        string chipDetail = string.Empty;
        int    userChipId = 0;
        int    itemCount  = 0;

        GameWebAPI.RespDataCS_MonsterSlotInfoListLogic.Manage slotStatus = CMD_ChipSphere.DataChg.GetChipEquip().GetSlotStatus();
        int num = slotStatus.maxSlotNum + slotStatus.extraSlotNum;

        if (buttonNo == 1)
        {
            if (MonsterGrowStepData.IsRipeScope(myGrowStep) || MonsterGrowStepData.IsPerfectScope(myGrowStep) || MonsterGrowStepData.IsUltimateScope(myGrowStep))
            {
                menuType = CMD_ChipSphere.MenuType.Empty;
            }
            else
            {
                menuType = CMD_ChipSphere.MenuType.NotYet;
                string growStepName = MonsterGrowStepData.GetGrowStepName(5.ToString());
                chipName = growStepName;
                string @string = StringMaster.GetString("ChipInstallingEvolutionInfo");
                chipDetail = string.Format(@string, growStepName);
            }
        }
        else if (buttonNo == 2)
        {
            if (MonsterGrowStepData.IsPerfectScope(myGrowStep) || MonsterGrowStepData.IsUltimateScope(myGrowStep))
            {
                menuType = CMD_ChipSphere.MenuType.Empty;
            }
            else
            {
                menuType = CMD_ChipSphere.MenuType.NotYet;
                string growStepName2 = MonsterGrowStepData.GetGrowStepName(6.ToString());
                chipName = growStepName2;
                string string2 = StringMaster.GetString("ChipInstallingEvolutionInfo");
                chipDetail = string.Format(string2, growStepName2);
            }
        }
        else if (buttonNo == 3)
        {
            if (MonsterGrowStepData.IsUltimateScope(myGrowStep))
            {
                menuType = CMD_ChipSphere.MenuType.Empty;
            }
            else
            {
                menuType = CMD_ChipSphere.MenuType.NotYet;
                string growStepName3 = MonsterGrowStepData.GetGrowStepName(7.ToString());
                chipName = growStepName3;
                string string3 = StringMaster.GetString("ChipInstallingEvolutionInfo");
                chipDetail = string.Format(string3, growStepName3);
                this.chipSphereLines.OpenMiddleToLeftUp(ChipSphereLines.LineType.None);
            }
        }
        else if (buttonNo == 4)
        {
            if (myArousal >= 2)
            {
                menuType = CMD_ChipSphere.MenuType.Empty;
            }
            else
            {
                menuType = CMD_ChipSphere.MenuType.NotYet;
                string string4 = StringMaster.GetString("CharaStatus-23");
                chipName   = string.Format("{0}{1}", string4, 2);
                chipDetail = string4;
                this.chipSphereLines.OpenMiddleToRightDown(ChipSphereLines.LineType.None);
            }
        }
        else if (buttonNo == 5)
        {
            if (myArousal >= 4)
            {
                menuType = CMD_ChipSphere.MenuType.Empty;
            }
            else
            {
                menuType = CMD_ChipSphere.MenuType.NotYet;
                string string5 = StringMaster.GetString("CharaStatus-23");
                chipName   = string.Format("{0}{1}", string5, 4);
                chipDetail = string5;
                this.chipSphereLines.OpenMiddleToRightUp(ChipSphereLines.LineType.None);
            }
        }
        else if (buttonNo >= 6)
        {
            type      = 1;
            itemCount = ConstValue.CHIP_EXTEND_SLOT_NEEDS[buttonNo - 6];
            if (buttonNo <= num)
            {
                menuType = CMD_ChipSphere.MenuType.Empty;
            }
            else
            {
                menuType = CMD_ChipSphere.MenuType.Extendable;
            }
        }
        if (CMD_ChipSphere.DataChg.GetSlotEquip() == null)
        {
            global::Debug.Log("装着はありません.");
        }
        else
        {
            foreach (GameWebAPI.RespDataCS_MonsterSlotInfoListLogic.Equip equip in CMD_ChipSphere.DataChg.GetSlotEquip())
            {
                int num2 = ChipTools.ConvertToButtonNo(equip);
                if (buttonNo == num2)
                {
                    menuType   = CMD_ChipSphere.MenuType.Detail;
                    userChipId = equip.userChipId;
                    break;
                }
            }
        }
        return(new ChipSphereIconButton.Parameter
        {
            type = type,
            buttonNo = buttonNo,
            menuType = menuType,
            itemCount = itemCount,
            chipName = chipName,
            chipDetail = chipDetail,
            userChipId = userChipId
        });
    }
Example #14
0
    public void SetParams(List <MonsterData> selectedMonsterDataList, string useCluster, string beforeLevel, string afterLevel, string plusLevel, bool isLevelMax)
    {
        string format = string.Empty;

        if (isLevelMax)
        {
            format = StringMaster.GetString("ReinforcementInfoLvMax");
        }
        else
        {
            format = StringMaster.GetString("ReinforcementInfo");
        }
        this.normalMessageLabel.text = string.Format(format, StringMaster.GetString("ReinforcementTitle"));
        bool          flag  = MonsterUserDataMng.AnyChipEquipMonster(selectedMonsterDataList);
        bool          flag2 = MonsterUserDataMng.AnyHighGrowStepMonster(selectedMonsterDataList);
        List <string> list  = new List <string>();
        bool          flag3 = false;
        bool          flag4 = false;

        foreach (MonsterData monsterData in selectedMonsterDataList)
        {
            bool flag5 = MonsterStatusData.IsArousal(monsterData.GetMonsterMaster().Simple.rare);
            bool flag6 = MonsterStatusData.IsVersionUp(monsterData.GetMonsterMaster().Simple.rare);
            if (flag6)
            {
                flag4 = true;
            }
            else if (flag5)
            {
                flag3 = true;
            }
        }
        if (flag3)
        {
            list.Add(StringMaster.GetString("ReinforcementCautionArousal"));
        }
        if (flag4)
        {
            list.Add(StringMaster.GetString("ReinforcementCautionVersionUp"));
        }
        if (flag)
        {
            list.Add(StringMaster.GetString("CautionDisappearChip"));
        }
        if (flag2)
        {
            string growStep     = ConstValue.GROW_STEP_HIGH.ToString();
            string growStepName = MonsterGrowStepData.GetGrowStepName(growStep);
            list.Add(string.Format(StringMaster.GetString("ReinforcementCautionGrowth"), growStepName));
        }
        if (list.Count >= 2)
        {
            int num = (this.warningMessageLabel.fontSize + this.warningMessageLabel.spacingY) * (list.Count - 1);
            this.warningMessageLabel.transform.SetLocalY(this.warningMessageLabel.transform.localPosition.y - (float)(num / 2));
            this.dialogPlate.transform.SetLocalY(this.dialogPlate.transform.localPosition.y - (float)(num / 2));
            this.dialogPlate.GetComponent <UIWidget>().height += num;
            this.btnGroup.transform.SetLocalY(this.btnGroup.transform.localPosition.y - (float)num);
        }
        this.warningMessageLabel.text = string.Join("\n", list.ToArray());
        for (int i = 0; i < this.guiMonsterIcons.Length; i++)
        {
            if (selectedMonsterDataList.Count > i)
            {
                GUIMonsterIcon guimonsterIcon = this.guiMonsterIcons[i];
                MonsterData    md             = selectedMonsterDataList[i];
                this.CreateIcon(i, md, guimonsterIcon.gameObject);
            }
        }
        this.useClusterLabel.text  = useCluster;
        this.beforeLevelLabel.text = beforeLevel;
        this.afterLevelLabel.text  = afterLevel;
        this.plusLevelLabel.text   = plusLevel;
    }