private void CheckPartnerMonster()
    {
        CMD_ResearchModalAlert popup = null;

        if (MonsterStatusData.IsVersionUp(this.partnerDigimon.GetMonsterMaster().Simple.rare))
        {
            popup = this.OpenAlertTargetMonster(this.partnerDigimon, StringMaster.GetString("LaboratoryResearchAlertInfo2"));
        }
        else if (MonsterStatusData.IsArousal(this.partnerDigimon.monsterM.rare))
        {
            popup = this.OpenAlertTargetMonster(this.partnerDigimon, StringMaster.GetString("LaboratoryResearchAlertInfo"));
        }
        if (null != popup)
        {
            popup.SetActionYesButton(delegate
            {
                popup.SetCloseAction(delegate(int noop)
                {
                    this.OpenConfirmResearch();
                });
            });
        }
        else
        {
            this.OpenConfirmResearch();
        }
    }
Example #2
0
    private void OnPushDecide()
    {
        CMD_ResearchModalAlert popup = null;

        if (MonsterStatusData.IsVersionUp(this.partnerDigimon.GetMonsterMaster().Simple.rare))
        {
            popup = this.OpenAlertPartnerMonster(this.partnerDigimon, StringMaster.GetString("MedalInheritAlertInfo2"));
        }
        else if (MonsterStatusData.IsArousal(this.partnerDigimon.monsterM.rare))
        {
            popup = this.OpenAlertPartnerMonster(this.partnerDigimon, StringMaster.GetString("MedalInheritAlertInfo"));
        }
        if (null != popup)
        {
            popup.SetActionYesButton(delegate
            {
                popup.SetCloseAction(delegate(int noop)
                {
                    this.OpenConfirmMedalInheritance();
                });
            });
        }
        else
        {
            this.OpenConfirmMedalInheritance();
        }
    }
    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;
    }
    private bool AnyArousalMonster(List <MonsterData> monsterDataList)
    {
        bool result = false;

        for (int i = 0; i < monsterDataList.Count; i++)
        {
            if (MonsterStatusData.IsArousal(monsterDataList[i].GetMonsterMaster().Simple.rare))
            {
                result = true;
                break;
            }
        }
        return(result);
    }
Example #5
0
 public static void DispArousal(string arousal, GameObject goArousal, UISprite spArousal)
 {
     if (MonsterStatusData.IsArousal(arousal))
     {
         if (!goArousal.activeSelf)
         {
             goArousal.SetActive(true);
         }
         spArousal.spriteName = MonsterDetailUtil.GetArousalSpriteName(int.Parse(arousal));
     }
     else if (goArousal.activeSelf)
     {
         goArousal.SetActive(false);
     }
 }
    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);
    }
Example #7
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;
    }