protected override void SetSelectedCharChg(MonsterData monsterData)
    {
        MonsterChipEquipData chipEquip = monsterData.GetChipEquip();

        int[] chipIdList = chipEquip.GetChipIdList();
        this.chipBaseSelect.SetSelectedCharChg(chipIdList, false, 0);
    }
Exemplo n.º 2
0
    private void SetCacheChipIconResources()
    {
        string selectDeckNum = DataMng.Instance().RespDataMN_DeckList.selectDeckNum;

        GameWebAPI.RespDataMN_GetDeckList.DeckList   deckList  = null;
        GameWebAPI.RespDataMN_GetDeckList.DeckList[] deckList2 = DataMng.Instance().RespDataMN_DeckList.deckList;
        for (int i = 0; i < deckList2.Length; i++)
        {
            if (selectDeckNum == deckList2[i].deckNum)
            {
                deckList = deckList2[i];
                break;
            }
        }
        int[] array = null;
        for (int j = 0; j < deckList.monsterList.Length; j++)
        {
            MonsterData userMonster = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(deckList.monsterList[j].userMonsterId);

            MonsterChipEquipData chipEquip = userMonster.GetChipEquip();
            array = chipEquip.GetChipIdList();
        }
        for (int k = 0; k < array.Length; k++)
        {
            GameWebAPI.RespDataMA_ChipM.Chip chipMainData = ChipDataMng.GetChipMainData(array[k]);
            string iconPath = chipMainData.GetIconPath();
            if (!AssetDataMng.Instance().IsAssetBundleData(iconPath))
            {
                UnityEngine.Object resource = AssetDataMng.Instance().LoadObject(iconPath, null, true);
                AssetDataCacheMng.Instance().AddCache(iconPath, AssetDataCacheMng.CACHE_TYPE.CHARA_PARTY, resource);
            }
        }
    }
    private static bool CheckExtraParams(MonsterData monsterData, GameWebAPI.RespDataMA_EventPointBonusM.EventPointBonus eventPointBonus)
    {
        if (float.Parse(eventPointBonus.effectValue) < 0f)
        {
            return(false);
        }
        ExtraEffectUtil.EventPointBonusTargetSubType eventPointBonusTargetSubType = (ExtraEffectUtil.EventPointBonusTargetSubType) int.Parse(eventPointBonus.targetSubType);
        switch (eventPointBonusTargetSubType)
        {
        case ExtraEffectUtil.EventPointBonusTargetSubType.MonsterTribe:
            if (monsterData.monsterMG.tribe.Equals(eventPointBonus.targetValue))
            {
                return(true);
            }
            break;

        case ExtraEffectUtil.EventPointBonusTargetSubType.MonsterGroup:
            if (monsterData.monsterMG.monsterGroupId.Equals(eventPointBonus.targetValue))
            {
                return(true);
            }
            break;

        case ExtraEffectUtil.EventPointBonusTargetSubType.GrowStep:
            if (monsterData.monsterMG.growStep.Equals(eventPointBonus.targetValue))
            {
                return(true);
            }
            break;

        case ExtraEffectUtil.EventPointBonusTargetSubType.SkillId:
            if (monsterData.GetCommonSkill() != null && monsterData.GetCommonSkill().skillId.Equals(eventPointBonus.targetValue))
            {
                return(true);
            }
            if (monsterData.GetLeaderSkill() != null && monsterData.GetLeaderSkill().skillId.Equals(eventPointBonus.targetValue))
            {
                return(true);
            }
            break;

        case ExtraEffectUtil.EventPointBonusTargetSubType.ChipId:
        {
            MonsterChipEquipData chipEquip = monsterData.GetChipEquip();
            int[] chipIdList = chipEquip.GetChipIdList();
            if (chipIdList.Where((int item) => item == eventPointBonus.targetValue.ToInt32()).Any <int>())
            {
                return(true);
            }
            break;
        }

        default:
            if (eventPointBonusTargetSubType == ExtraEffectUtil.EventPointBonusTargetSubType.MonsterIntegrationGroup)
            {
                GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup[] monsterIntegrationGroupM = MasterDataMng.Instance().ResponseMonsterIntegrationGroupMaster.monsterIntegrationGroupM;
                for (int i = 0; i < monsterIntegrationGroupM.Length; i++)
                {
                    if (eventPointBonus.targetValue.Equals(monsterIntegrationGroupM[i].monsterIntegrationId) && monsterIntegrationGroupM[i].monsterId.Equals(monsterData.monsterM.monsterId))
                    {
                        return(true);
                    }
                }
            }
            break;
        }
        return(false);
    }