protected void SetupEvolutionStep(CharacterStateControl characterStatus)
 {
     if (MonsterDataMng.Instance() != null)
     {
         string growStep = MonsterGrowStepData.ToGrowStepString(characterStatus.characterDatas.growStep);
         this.evolutionStep.text = MonsterGrowStepData.GetGrowStepName(growStep);
     }
 }
Пример #2
0
    public void ApplyMonsterDescription(bool isShow, CharacterStateControl characterStatus)
    {
        NGUITools.SetActiveSelf(base.gameObject, isShow);
        if (!isShow)
        {
            return;
        }
        this.monsterName.text = characterStatus.name;
        this.level.text       = characterStatus.level.ToString();
        base.SetupEvolutionStep(characterStatus);
        base.SetupSpecies(characterStatus);
        int num = 0;

        num           += this.ApplyValue(characterStatus.maxHp, characterStatus.extraMaxHp, this.hp, this.hpUpObject, this.hpDownObject);
        num           += this.ApplyValue(characterStatus.attackPower, characterStatus.extraAttackPower, this.atk, this.atkUpObject, this.atkDownObject);
        num           += this.ApplyValue(characterStatus.defencePower, characterStatus.extraDefencePower, this.def, this.defUpObject, this.defDownObject);
        num           += this.ApplyValue(characterStatus.specialAttackPower, characterStatus.extraSpecialAttackPower, this.satk, this.satkUpObject, this.satkDownObject);
        num           += this.ApplyValue(characterStatus.specialDefencePower, characterStatus.extraSpecialDefencePower, this.sdef, this.sdefUpObject, this.sdefDownObject);
        num           += this.ApplyValue(characterStatus.speed, characterStatus.extraSpeed, this.speed, this.speedUpObject, this.speedDownObject);
        this.luck.text = characterStatus.luck.ToString();
        if (MonsterDataMng.Instance() != null)
        {
            this.friendshipLevel.text = MonsterFriendshipData.GetMaxFriendshipFormat(characterStatus.friendshipLevel.ToString(), MonsterGrowStepData.ToGrowStepString(characterStatus.characterDatas.growStep));
        }
        if (characterStatus.isHavingLeaderSkill)
        {
            this.leaderSkillName.text        = characterStatus.leaderSkillStatus.name;
            this.leaderSkillDescription.text = characterStatus.leaderSkillStatus.description;
        }
        else
        {
            this.leaderSkillName.text        = StringMaster.GetString("SystemNone");
            this.leaderSkillDescription.text = string.Empty;
        }
        characterStatus.InitializeSkillExtraStatus();
        if (characterStatus.skillStatus.Length > 1)
        {
            this.deathblow.name.text        = characterStatus.skillStatus[1].name;
            this.deathblow.description.text = characterStatus.skillStatus[1].description;
            int powerFirst = characterStatus.skillStatus[1].GetPowerFirst(characterStatus);
            int extraValue = powerFirst;
            AffectEffectProperty affectEffectFirst = characterStatus.skillStatus[1].GetAffectEffectFirst();
            if (affectEffectFirst != null && AffectEffectProperty.IsDamage(affectEffectFirst.type))
            {
                extraValue = characterStatus.extraDeathblowSkillPower;
            }
            num += this.ApplyValue(powerFirst, extraValue, null, this.deathblow.upObject, this.deathblow.downObject);
        }
        else
        {
            this.deathblow.name.text        = StringMaster.GetString("SystemNone");
            this.deathblow.description.text = "-";
            this.ApplyValue(0, 0, null, this.deathblow.upObject, this.deathblow.downObject);
        }
        if (characterStatus.skillStatus.Length > 2)
        {
            this.inheritance1.name.text        = characterStatus.skillStatus[2].name;
            this.inheritance1.description.text = characterStatus.skillStatus[2].description;
            int powerFirst2 = characterStatus.skillStatus[2].GetPowerFirst(characterStatus);
            int extraValue2 = powerFirst2;
            AffectEffectProperty affectEffectFirst2 = characterStatus.skillStatus[2].GetAffectEffectFirst();
            if (affectEffectFirst2 != null && AffectEffectProperty.IsDamage(affectEffectFirst2.type))
            {
                extraValue2 = characterStatus.extraInheritanceSkillPower;
            }
            num += this.ApplyValue(powerFirst2, extraValue2, null, this.inheritance1.upObject, this.inheritance1.downObject);
        }
        else
        {
            this.inheritance1.name.text        = StringMaster.GetString("SystemNone");
            this.inheritance1.description.text = "-";
            this.ApplyValue(0, 0, null, this.inheritance1.upObject, this.inheritance1.downObject);
        }
        if (characterStatus.isVersionUp)
        {
            this.inheritance2.root.SetActive(true);
        }
        else
        {
            this.inheritance2.root.SetActive(false);
        }
        if (characterStatus.skillStatus.Length > 3)
        {
            this.inheritance2.name.text        = characterStatus.skillStatus[3].name;
            this.inheritance2.description.text = characterStatus.skillStatus[3].description;
            int powerFirst3 = characterStatus.skillStatus[3].GetPowerFirst(characterStatus);
            int extraValue3 = powerFirst3;
            AffectEffectProperty affectEffectFirst3 = characterStatus.skillStatus[3].GetAffectEffectFirst();
            if (affectEffectFirst3 != null && AffectEffectProperty.IsDamage(affectEffectFirst3.type))
            {
                extraValue3 = characterStatus.extraInheritanceSkillPower2;
            }
            num += this.ApplyValue(powerFirst3, extraValue3, null, this.inheritance2.upObject, this.inheritance2.downObject);
        }
        else
        {
            this.inheritance2.name.text        = StringMaster.GetString("SystemNone");
            this.inheritance2.description.text = "-";
            this.ApplyValue(0, 0, null, this.inheritance2.upObject, this.inheritance2.downObject);
        }
        this.stageGimmickObject.SetActive(num > 0 || characterStatus.isChipServerAddValue || characterStatus.isEffectiveBonus());
        this.SetArousal(characterStatus.arousal);
        base.SetupTolerance(characterStatus);
        this.MonsterMedalList.SetValues(characterStatus.talent);
        for (int i = 0; i < this.chipIcons.Length; i++)
        {
            if (i < characterStatus.chipIds.Length)
            {
                GameWebAPI.RespDataMA_ChipM.Chip chipMainData = ChipDataMng.GetChipMainData(characterStatus.chipIds[i].ToString());
                this.chipIcons[i].SetData(chipMainData, -1, -1);
                this.chipIcons[i].SetActive(true);
                this.chipIcons[i].transform.localScale = new Vector3(0.6f, 0.6f, 1f);
            }
            else
            {
                this.chipIcons[i].SetActive(false);
            }
        }
        if (MonsterDataMng.Instance() != null)
        {
            string monsterStatusId  = characterStatus.characterDatas.monsterStatusId;
            string specificTypeName = MonsterSpecificTypeData.GetSpecificTypeName(monsterStatusId);
            this.specificType.text = specificTypeName;
        }
        else
        {
            this.specificType.text = "-";
        }
    }
    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;
            }
            }
        }
    }
Пример #4
0
    public void CheckEffectiveBonus()
    {
        BattleStateManager current = BattleStateManager.current;

        if (!current.onServerConnect)
        {
            return;
        }
        string b = string.Empty;

        if (current.battleMode == BattleMode.Multi)
        {
            b = DataMng.Instance().RespData_WorldMultiStartInfo.worldDungeonId;
        }
        else if (current.battleMode == BattleMode.PvP)
        {
            b = ClassSingleton <MultiBattleData> .Instance.PvPField.worldDungeonId;
        }
        else
        {
            b = ClassSingleton <QuestData> .Instance.RespDataWD_DungeonStart.worldDungeonId;
        }
        List <GameWebAPI.RespDataMA_EventPointBonusM.EventPointBonus> list = new List <GameWebAPI.RespDataMA_EventPointBonusM.EventPointBonus>();

        GameWebAPI.RespDataMA_EventPointBonusM respDataMA_EventPointBonusMaster = MasterDataMng.Instance().RespDataMA_EventPointBonusMaster;
        foreach (GameWebAPI.RespDataMA_EventPointBonusM.EventPointBonus eventPointBonus2 in respDataMA_EventPointBonusMaster.eventPointBonusM)
        {
            if (eventPointBonus2.worldDungeonId == b && eventPointBonus2.effectType != "0")
            {
                list.Add(eventPointBonus2);
            }
        }
        using (List <GameWebAPI.RespDataMA_EventPointBonusM.EventPointBonus> .Enumerator enumerator = list.GetEnumerator())
        {
            while (enumerator.MoveNext())
            {
                GameWebAPI.RespDataMA_EventPointBonusM.EventPointBonus eventPointBonus = enumerator.Current;
                ExtraEffectUtil.EventPointBonusTargetSubType           eventPointBonusTargetSubType = (ExtraEffectUtil.EventPointBonusTargetSubType) int.Parse(eventPointBonus.targetSubType);
                switch (eventPointBonusTargetSubType)
                {
                case ExtraEffectUtil.EventPointBonusTargetSubType.MonsterTribe:
                    if (this.characterDatas.tribe.Equals(eventPointBonus.targetValue))
                    {
                        this._effectiveBonus = true;
                        return;
                    }
                    break;

                case ExtraEffectUtil.EventPointBonusTargetSubType.MonsterGroup:
                    if (this.characterStatus.groupId.Equals(eventPointBonus.targetValue))
                    {
                        this._effectiveBonus = true;
                        return;
                    }
                    break;

                case ExtraEffectUtil.EventPointBonusTargetSubType.GrowStep:
                {
                    string text = MonsterGrowStepData.ToGrowStepString(this.characterDatas.growStep);
                    if (text.Equals(eventPointBonus.targetValue))
                    {
                        this._effectiveBonus = true;
                        return;
                    }
                    break;
                }

                case ExtraEffectUtil.EventPointBonusTargetSubType.SkillId:
                    if (this.skillStatus.Length > 2 && this.skillStatus[2].skillId.Equals(eventPointBonus.targetValue))
                    {
                        this._effectiveBonus = true;
                        return;
                    }
                    if (this.leaderSkillStatus.leaderSkillId.Equals(eventPointBonus.targetValue))
                    {
                        this._effectiveBonus = true;
                        return;
                    }
                    break;

                case ExtraEffectUtil.EventPointBonusTargetSubType.ChipId:
                    if (this.chipIds.Where((int item) => item == eventPointBonus.targetValue.ToInt32()).Any <int>())
                    {
                        this._effectiveBonus = true;
                        return;
                    }
                    break;

                default:
                    if (eventPointBonusTargetSubType == ExtraEffectUtil.EventPointBonusTargetSubType.MonsterIntegrationGroup)
                    {
                        foreach (string value in this.characterStatus.monsterIntegrationIds)
                        {
                            if (eventPointBonus.targetValue.Equals(value))
                            {
                                this._effectiveBonus = true;
                                return;
                            }
                        }
                    }
                    break;
                }
            }
        }
        if (this.IsBonusQuest(this.characterStatus.groupId))
        {
            this._effectiveBonus = true;
            return;
        }
        this._effectiveBonus = false;
    }