public void SetViewNextEvolutionMonster(string monsterId, GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList userMonster)
        {
            GameWebAPI.RespDataMA_GetMonsterMS.MonsterM simple = MonsterMaster.GetMonsterMasterByMonsterId(monsterId).Simple;
            GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group  = MonsterMaster.GetMonsterMasterByMonsterGroupId(simple.monsterGroupId).Group;
            DataMng.ExperienceInfo experienceInfo = DataMng.Instance().GetExperienceInfo(0);
            MonsterData            monsterData    = new MonsterData(new GameWebAPI.RespDataUS_GetMonsterList.UserMonsterList(userMonster)
            {
                monsterId   = monsterId,
                level       = "1",
                ex          = "0",
                levelEx     = "0",
                nextLevelEx = experienceInfo.expLevNext.ToString()
            });

            if (!string.IsNullOrEmpty(group.leaderSkillId) && "0" != group.leaderSkillId)
            {
                monsterData.userMonster.leaderSkillId = group.leaderSkillId;
                monsterData.InitSkillInfo();
            }
            StatusValue statusValue = MonsterStatusData.GetStatusValue(monsterId, "1");

            statusValue.luck = int.Parse(userMonster.luck);
            monsterData.SetStatus(statusValue);
            CMD_CharacterDetailed.DataChg = monsterData;
            GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM resistanceMaster = MonsterResistanceData.GetResistanceMaster(monsterData.monsterM.resistanceId);
            bool active = this.AnyMatchStrongResistance(resistanceMaster, userMonster.tranceResistance, userMonster.tranceStatusAilment);

            this.nextMonsterResistanceAlert.gameObject.SetActive(active);
        }
    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);
    }
Exemple #3
0
    public void SetValues(MonsterData monsterData)
    {
        StatusValue statusValue = MonsterStatusData.GetStatusValue(monsterData.userMonster.monsterId, monsterData.userMonster.level);
        StatusValue status      = monsterData.GetStatus();

        this.SetPlusParameter(this.hpLabel, status.hp - statusValue.hp);
        this.SetPlusParameter(this.attackLabel, status.attack - statusValue.attack);
        this.SetPlusParameter(this.defenseLabel, status.defense - statusValue.defense);
        this.SetPlusParameter(this.magicAttackLabel, status.magicAttack - statusValue.magicAttack);
        this.SetPlusParameter(this.magicDefenseLabel, status.magicDefense - statusValue.magicDefense);
        this.SetPlusParameter(this.speedLabel, status.speed - statusValue.speed);
    }
 public void SetValues(MonsterData monsterData, bool setBaseStatus = false, bool showMaxLuck = false)
 {
     if (!setBaseStatus)
     {
         this.hpLabel.text           = monsterData.userMonster.hp;
         this.attackLabel.text       = monsterData.userMonster.attack;
         this.defenseLabel.text      = monsterData.userMonster.defense;
         this.magicAttackLabel.text  = monsterData.userMonster.spAttack;
         this.magicDefenceLabel.text = monsterData.userMonster.spDefense;
         this.speedLabel.text        = monsterData.userMonster.speed;
     }
     else
     {
         StatusValue statusValue = MonsterStatusData.GetStatusValue(monsterData.userMonster.monsterId, monsterData.userMonster.level);
         this.hpLabel.text           = statusValue.hp.ToString();
         this.attackLabel.text       = statusValue.attack.ToString();
         this.defenseLabel.text      = statusValue.defense.ToString();
         this.magicAttackLabel.text  = statusValue.magicAttack.ToString();
         this.magicDefenceLabel.text = statusValue.magicDefense.ToString();
         this.speedLabel.text        = statusValue.speed.ToString();
     }
     GameWebAPI.RespDataMA_GetMonsterMS.MonsterM simple = MonsterMaster.GetMonsterMasterByMonsterId(monsterData.userMonster.monsterId).Simple;
     if (showMaxLuck)
     {
         this.luckLabel.text = string.Format(StringMaster.GetString("SystemFraction"), monsterData.userMonster.luck, simple.maxLuck);
     }
     else
     {
         this.luckLabel.text = monsterData.userMonster.luck.ToString();
     }
     if (!this.disableFriendshipMaxValue)
     {
         this.friendshipLabel.text = MonsterFriendshipData.GetMaxFriendshipFormat(monsterData.userMonster.friendship, monsterData.monsterMG.growStep);
     }
     else
     {
         this.friendshipLabel.text = monsterData.userMonster.friendship;
     }
 }
    private void DisplayDifference()
    {
        bool flag = false;
        MonsterClientMaster monsterMasterByMonsterId = MonsterMaster.GetMonsterMasterByMonsterId(this.userMonster.monsterId);

        if (this.levelUpLabel != null)
        {
            string text = string.Empty;
            if (this.displayLevel > this.defaultLevel)
            {
                text = string.Format(StringMaster.GetString("SystemFraction"), this.displayLevel.ToString(), monsterMasterByMonsterId.Simple.maxLevel);
            }
            this.levelUpLabel.text = text;
            flag = true;
        }
        int         bonusStep            = int.Parse(this.userMonster.friendship) / ConstValue.RIZE_CONDITION_FRENDSHIPSTATUS;
        StatusValue friendshipBonusValue = MonsterFriendshipData.GetFriendshipBonusValue(monsterMasterByMonsterId.Simple, bonusStep);
        StatusValue statusValue          = MonsterStatusData.GetStatusValue(this.userMonster.monsterId, this.displayLevel.ToString());
        StatusValue statusValue2         = MonsterStatusData.GetStatusValue(this.userMonster.monsterId, this.userMonster.level);

        if (this.hpUpLabel != null)
        {
            float num  = 0f;
            float num2 = 0f;
            int   num3 = 0;
            if (int.TryParse(this.userMonster.hpAbility, out num3))
            {
                num  = Mathf.Floor((float)statusValue.hp * (float)num3 / 100f);
                num2 = Mathf.Floor((float)statusValue2.hp * (float)num3 / 100f);
            }
            int num4 = int.Parse(this.userMonster.hp) - (statusValue2.hp + friendshipBonusValue.hp + (int)num2);
            this.hpUpLabel.text = this.GetTextStatusUpValue(this.userMonster.hp, statusValue.hp + friendshipBonusValue.hp + (int)num + num4);
            flag = true;
        }
        if (this.atkUpLabel != null)
        {
            float num5 = 0f;
            float num6 = 0f;
            int   num7 = 0;
            if (int.TryParse(this.userMonster.attackAbility, out num7))
            {
                num5 = Mathf.Floor((float)statusValue.attack * (float)num7 / 100f);
                num6 = Mathf.Floor((float)statusValue2.attack * (float)num7 / 100f);
            }
            int num8 = int.Parse(this.userMonster.attack) - (statusValue2.attack + friendshipBonusValue.attack + (int)num6);
            this.atkUpLabel.text = this.GetTextStatusUpValue(this.userMonster.attack, statusValue.attack + friendshipBonusValue.attack + (int)num5 + num8);
            flag = true;
        }
        if (this.defUpLabel != null)
        {
            float num9  = 0f;
            float num10 = 0f;
            int   num11 = 0;
            if (int.TryParse(this.userMonster.defenseAbility, out num11))
            {
                num9  = Mathf.Floor((float)statusValue.defense * (float)num11 / 100f);
                num10 = Mathf.Floor((float)statusValue2.defense * (float)num11 / 100f);
            }
            int num12 = int.Parse(this.userMonster.defense) - (statusValue2.defense + friendshipBonusValue.defense + (int)num10);
            this.defUpLabel.text = this.GetTextStatusUpValue(this.userMonster.defense, statusValue.defense + friendshipBonusValue.defense + (int)num9 + num12);
            flag = true;
        }
        if (this.sAtkUpLabel != null)
        {
            float num13 = 0f;
            float num14 = 0f;
            int   num15 = 0;
            if (int.TryParse(this.userMonster.spAttackAbility, out num15))
            {
                num13 = Mathf.Floor((float)statusValue.magicAttack * (float)num15 / 100f);
                num14 = Mathf.Floor((float)statusValue2.magicAttack * (float)num15 / 100f);
            }
            int num16 = int.Parse(this.userMonster.spAttack) - (statusValue2.magicAttack + friendshipBonusValue.magicAttack + (int)num14);
            this.sAtkUpLabel.text = this.GetTextStatusUpValue(this.userMonster.spAttack, statusValue.magicAttack + friendshipBonusValue.magicAttack + (int)num13 + num16);
            flag = true;
        }
        if (this.sDefUpLabel != null)
        {
            float num17 = 0f;
            float num18 = 0f;
            int   num19 = 0;
            if (int.TryParse(this.userMonster.spDefenseAbility, out num19))
            {
                num17 = Mathf.Floor((float)statusValue.magicDefense * (float)num19 / 100f);
                num18 = Mathf.Floor((float)statusValue2.magicDefense * (float)num19 / 100f);
            }
            int num20 = int.Parse(this.userMonster.spDefense) - (statusValue2.magicDefense + friendshipBonusValue.magicDefense + (int)num18);
            this.sDefUpLabel.text = this.GetTextStatusUpValue(this.userMonster.spDefense, statusValue.magicDefense + friendshipBonusValue.magicDefense + (int)num17 + num20);
            flag = true;
        }
        if (this.spdUpLabel != null)
        {
            float num21 = 0f;
            float num22 = 0f;
            int   num23 = 0;
            if (int.TryParse(this.userMonster.speedAbility, out num23))
            {
                num21 = Mathf.Floor((float)statusValue.speed * (float)num23 / 100f);
                num22 = Mathf.Floor((float)statusValue2.speed * (float)num23 / 100f);
            }
            int num24 = int.Parse(this.userMonster.speed) - (statusValue2.speed + friendshipBonusValue.speed + (int)num22);
            this.spdUpLabel.text = this.GetTextStatusUpValue(this.userMonster.speed, statusValue.speed + friendshipBonusValue.speed + (int)num21 + num24);
            flag = true;
        }
        if (this.luckUpLabel != null)
        {
            this.luckUpLabel.text = this.GetTextStatusUpValue("0", this.luckUpValue);
            flag = true;
        }
        if (flag && this.animationCoroutine == null)
        {
            this.animationCoroutine = AppCoroutine.Start(this.PlayStatusUpAnimation(), false);
        }
    }
Exemple #6
0
    public void MonsterDataSet(MonsterData mData, DataMng.ExperienceInfo experienceInfo, int chipSlotNum, string exchangeId)
    {
        this.viewExtraSkillPage = MonsterStatusData.IsVersionUp(mData.GetMonsterMaster().Simple.rare);
        this.monsterStatusList.ClearValues();
        this.monsterStatusList.SetValues(mData, true, false);
        this.monsterBasicInfo.ClearMonsterData();
        this.monsterBasicInfo.SetMonsterData(mData, experienceInfo);
        this.monsterResistance.ClearValues();
        this.monsterResistance.SetValues(mData);
        if (this.viewExtraSkillPage)
        {
            this.ver2LeaderSkill.ClearSkill();
            this.ver2LeaderSkill.SetSkill(mData);
            this.ver2LearnSkill1.ClearSkill();
            this.ver2LearnSkill1.SetSkill(mData);
            this.ver2LearnSkill2.ClearSkill();
            this.ver2LearnSkill2.SetSkill(mData);
            this.ver2LearnSkill3.ClearSkill();
            this.ver2LearnSkill3.SetSkill(mData);
        }
        else
        {
            this.leaderSkill.ClearSkill();
            this.leaderSkill.SetSkill(mData);
            this.learnSkill1.ClearSkill();
            this.learnSkill1.SetSkill(mData);
            this.learnSkill2.ClearSkill();
            this.learnSkill2.SetSkill(mData);
        }
        StatusValue statusValue = MonsterStatusData.GetStatusValue(mData.userMonster.monsterId, mData.userMonster.level);

        this.SetMedalParameter(this.hpUpLabel, mData.userMonster.hpAbility, (float)statusValue.hp);
        this.SetMedalParameter(this.attackUpLabel, mData.userMonster.attackAbility, (float)statusValue.attack);
        this.SetMedalParameter(this.defenseUpLabel, mData.userMonster.defenseAbility, (float)statusValue.defense);
        this.SetMedalParameter(this.spAttackUpLabel, mData.userMonster.spAttackAbility, (float)statusValue.magicAttack);
        this.SetMedalParameter(this.spDefenseUpLabel, mData.userMonster.spDefenseAbility, (float)statusValue.magicDefense);
        this.SetMedalParameter(this.speedUpLabel, mData.userMonster.speedAbility, (float)statusValue.speed);
        this.monsterMedal.SetActive(true);
        this.monsterMedal.SetValues(mData.userMonster);
        chipSlotNum += 5;
        for (int i = 0; i < this.chipObjList.Count; i++)
        {
            this.chipObjList[i].SetActive(false);
        }
        for (int j = 0; j < chipSlotNum; j++)
        {
            if (j >= this.chipObjList.Count)
            {
                break;
            }
            this.chipObjList[j].SetActive(true);
        }
        if (int.Parse(exchangeId) >= 10000)
        {
            this.browTypeLabel1.gameObject.SetActive(true);
            this.browTypeLabel2.gameObject.SetActive(true);
            this.browTypeLabel1.text = string.Format(StringMaster.GetString("ExchangeSkillTypeDetile"), mData.userMonster.defaultSkillGroupSubId);
            this.browTypeLabel2.text = string.Format(StringMaster.GetString("ExchangeSkillTypeDetile"), mData.userMonster.defaultSkillGroupSubId);
        }
        else
        {
            this.browTypeLabel1.gameObject.SetActive(false);
            this.browTypeLabel2.gameObject.SetActive(false);
        }
    }