Exemplo n.º 1
0
        public static int CalcClusterForModeChange(string monsterId)
        {
            GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = MonsterMaster.GetMonsterMasterByMonsterId(monsterId).Group;
            int num      = 0;
            int num2     = 0;
            int growStep = group.growStep.ToInt32();

            if (MonsterGrowStepData.IsRipeScope(growStep))
            {
                num = ConstValue.MODE_CHANGE_COEFFICIENT_FOR_5;
            }
            else if (MonsterGrowStepData.IsPerfectScope(growStep))
            {
                num = ConstValue.MODE_CHANGE_COEFFICIENT_FOR_6;
            }
            else if (MonsterGrowStepData.IsUltimateScope(growStep))
            {
                num = ConstValue.MODE_CHANGE_COEFFICIENT_FOR_7;
            }
            else
            {
                Debug.Log("growStepの値が不正です");
            }
            GameWebAPI.RespDataMA_GetMonsterMS.MonsterM simple = MonsterMaster.GetMonsterMasterByMonsterId(monsterId).Simple;
            int arousal = simple.GetArousal();

            if (arousal >= 0 && arousal < ConstValue.MODE_CHANGE_COEFFICIENT_RARE.Length)
            {
                num2 = ConstValue.MODE_CHANGE_COEFFICIENT_RARE[arousal];
            }
            return(num2 * num);
        }
        public void SetEggStatus(MonsterData monsterData)
        {
            this.chipBaseSelect.SetSelectedCharChg(monsterData);
            string eggName = StringMaster.GetString("CharaStatus-06");
            int    num     = MasterDataMng.Instance().RespDataMA_MonsterEvolutionRouteM.monsterEvolutionRouteM.Length;

            for (int i = 0; i < num; i++)
            {
                GameWebAPI.RespDataMA_GetMonsterEvolutionRouteM.MonsterEvolutionRouteM monsterEvolutionRouteM = MasterDataMng.Instance().RespDataMA_MonsterEvolutionRouteM.monsterEvolutionRouteM[i];
                if (monsterEvolutionRouteM.monsterEvolutionRouteId == monsterData.userMonster.monsterEvolutionRouteId)
                {
                    GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = MonsterMaster.GetMonsterMasterByMonsterGroupId(monsterEvolutionRouteM.eggMonsterId).Group;
                    if (group != null)
                    {
                        eggName = group.monsterName;
                    }
                }
            }
            if (!MonsterStatusData.IsVersionUp(monsterData.GetMonsterMaster().Simple.rare))
            {
                this.skillInfo.ClearSkill();
            }
            else
            {
                this.extraSkillInfo.ClearSkill();
            }
            this.basicInfo.SetEggData(eggName, monsterData.monsterM.rare);
            this.statusList.ClearEggCandidateMedalValues();
            this.changeValueList.SetEggStatusValues();
            this.resistanceList.ClearValues();
            this.medalList.SetValues(monsterData.userMonster);
        }
        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);
        }
Exemplo n.º 4
0
    public static int GetExtraEffectCorrectionValue(int areaId, List <ExtraEffectStatus> extraEffectStatusList, int baseValue, MonsterData[] chipPlayers, MonsterData[] chipEnemys, MonsterData chipTarget, AffectEffectProperty affectEffectProperty, EffectStatusBase.ExtraEffectType effectType)
    {
        List <ExtraEffectStatus> list = ChipEffectStatus.CheckStageEffectInvalid(areaId, extraEffectStatusList, chipPlayers, chipEnemys, chipTarget);

        if (list.Count == 0)
        {
            return(baseValue);
        }
        bool flag = chipEnemys.Where((MonsterData item) => item.userMonster.userMonsterId == chipTarget.userMonster.userMonsterId).Any <MonsterData>();

        GameWebAPI.RespDataMA_GetMonsterMG.MonsterM         group = MonsterMaster.GetMonsterMasterByMonsterGroupId(chipTarget.monsterM.monsterGroupId).Group;
        GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster responseMonsterIntegrationGroupMaster = MasterDataMng.Instance().ResponseMonsterIntegrationGroupMaster;
        GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup[] source      = responseMonsterIntegrationGroupMaster.monsterIntegrationGroupM.Where((GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup item) => item.monsterId == chipTarget.monsterM.monsterId).ToArray <GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup>();
        string[] monsterIntegrationIds = source.Select((GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup item) => item.monsterIntegrationId).ToArray <string>();
        GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM        resistanceMaster     = MonsterResistanceData.GetResistanceMaster(chipTarget.monsterM.resistanceId);
        List <GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM> uniqueResistanceList = MonsterResistanceData.GetUniqueResistanceList(chipTarget.GetResistanceIdList());

        GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM data = MonsterResistanceData.AddResistanceFromMultipleTranceData(resistanceMaster, uniqueResistanceList);
        Tolerance tolerance = ServerToBattleUtility.ResistanceToTolerance(data);
        GrowStep  growStep  = MonsterGrowStepData.ToGrowStep(group.growStep);
        List <ExtraEffectStatus> totalExtraEffectStatusList = ExtraEffectStatus.GetTotalExtraEffectStatusList(list, monsterIntegrationIds, chipTarget.monsterM.monsterGroupId, tolerance, group.tribe, growStep, affectEffectProperty, null, (!flag) ? ExtraEffectStatus.ExtraTargetType.Player : ExtraEffectStatus.ExtraTargetType.Enemy, effectType);

        if (totalExtraEffectStatusList.Count > 0)
        {
            return((int)ExtraEffectStatus.GetCorrectionValue((float)baseValue, totalExtraEffectStatusList));
        }
        return(baseValue);
    }
    private string GetPresentName(GameWebAPI.RespDataMA_GetAssetCategoryM.AssetCategoryM masterAssetCategory, string objectId)
    {
        string result = StringMaster.GetString("Present-10");

        if (masterAssetCategory != null)
        {
            result = masterAssetCategory.assetTitle;
        }
        MasterDataMng.AssetCategory assetCategory = (MasterDataMng.AssetCategory)masterAssetCategory.assetCategoryId.ToInt32();
        switch (assetCategory)
        {
        case MasterDataMng.AssetCategory.FACILITY_KEY:
        {
            FacilityKeyM facilityKeyMaster = FarmDataManager.GetFacilityKeyMaster(objectId);
            if (facilityKeyMaster != null)
            {
                result = facilityKeyMaster.facilityKeyName;
            }
            break;
        }

        default:
            if (assetCategory != MasterDataMng.AssetCategory.MONSTER)
            {
                if (assetCategory == MasterDataMng.AssetCategory.ITEM)
                {
                    GameWebAPI.RespDataMA_GetItemM.ItemM itemM = MasterDataMng.Instance().RespDataMA_ItemM.GetItemM(objectId);
                    if (itemM != null)
                    {
                        result = itemM.name;
                    }
                }
            }
            else
            {
                GameWebAPI.RespDataMA_GetMonsterMS.MonsterM simple = MonsterMaster.GetMonsterMasterByMonsterId(objectId).Simple;
                if (simple != null)
                {
                    GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = MonsterMaster.GetMonsterMasterByMonsterGroupId(simple.monsterGroupId).Group;
                    if (group != null)
                    {
                        result = group.monsterName;
                    }
                }
            }
            break;

        case MasterDataMng.AssetCategory.DUNGEON_TICKET:
        {
            GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM dungeonTicketM = MasterDataMng.Instance().RespDataMA_DungeonTicketMaster.dungeonTicketM.FirstOrDefault((GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM x) => objectId == x.dungeonTicketId);
            if (dungeonTicketM != null)
            {
                result = dungeonTicketM.name;
            }
            break;
        }
        }
        return(result);
    }
 protected void UpdateCharacter()
 {
     if (this.Data != null)
     {
         GameWebAPI.RespDataMA_GetMonsterMG.MonsterM monsterMG = this.Data.monsterMG;
         float partyCharaPosX = 0f;
         float partyCharaPosY = 0f;
         float partyCharaPosZ = 0f;
         float partyCharaRotY = 0f;
         if (!string.IsNullOrEmpty(monsterMG.partyCharaPosX))
         {
             partyCharaPosX = (float)double.Parse(monsterMG.partyCharaPosX);
         }
         if (!string.IsNullOrEmpty(monsterMG.partyCharaPosY))
         {
             partyCharaPosY = (float)double.Parse(monsterMG.partyCharaPosY);
         }
         if (!string.IsNullOrEmpty(monsterMG.partyCharaPosZ))
         {
             partyCharaPosZ = (float)double.Parse(monsterMG.partyCharaPosZ);
         }
         if (!string.IsNullOrEmpty(monsterMG.partyCharaRotY))
         {
             partyCharaRotY = (float)double.Parse(monsterMG.partyCharaRotY);
         }
         if (this.csRender3DRT != null)
         {
             if (this.csRender3DRT.party_show_type == CommonRender3DRT.PARTY_SHOW_TYPE.CUSTOM)
             {
                 this.csRender3DRT.SetCharacterPositionForParty(partyCharaPosX, partyCharaPosY, partyCharaPosZ, partyCharaRotY);
             }
             else if (this.updateCharaCT > 0)
             {
                 this.csRender3DRT.SetCharacterPositionForParty(partyCharaPosX, partyCharaPosY, partyCharaPosZ, partyCharaRotY);
                 this.updateCharaCT--;
             }
             else
             {
                 Vector3 position    = base.transform.position;
                 Camera  orthoCamera = GUIMain.GetOrthoCamera();
                 Vector3 vector      = orthoCamera.WorldToScreenPoint(position);
                 if (this.minScreenX <= vector.x && vector.x <= this.maxScreenX)
                 {
                     if (!this.csRender3DRT.gameObject.activeSelf)
                     {
                         this.csRender3DRT.gameObject.SetActive(true);
                         this.csRender3DRT.ResumeAnimation();
                     }
                 }
                 else if (this.csRender3DRT.gameObject.activeSelf)
                 {
                     this.csRender3DRT.gameObject.SetActive(false);
                 }
             }
         }
     }
 }
Exemplo n.º 7
0
    private void SetDetails()
    {
        string groupId = this.monsterInfos[this.selectedIndex].groupId;

        GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = MonsterMaster.GetMonsterMasterByMonsterGroupId(groupId).Group;
        this.nameLabel.text   = group.monsterName;
        this.detailLabel.text = group.description;
        this.line.SetActive(true);
        this.GetLeftDigimonTransform().localPosition             = this.circleTrans.localPosition - Vector3.right * 5f;
        this.monsterTransforms[this.selectedIndex].localPosition = this.circleTrans.localPosition;
        this.GetRightDigimonTransform().localPosition            = this.circleTrans.localPosition + Vector3.right * 5f;
    }
 private void SetSortieLimitState(GameWebAPI.RespDataMA_GetMonsterMG.MonsterM monsterMaster)
 {
     if (!ClassSingleton <QuestData> .Instance.CheckSortieLimit(this.deckData.SortieLimitList.GetSortieLimitList(), monsterMaster.tribe, monsterMaster.growStep))
     {
         this.monsterIcon.Message.SetStateText(StringMaster.GetString("PartySortieLimitNG"));
         MonsterIconGrayout.SetGrayout(this.monsterIcon.GetRootObject(), GUIMonsterIcon.DIMM_LEVEL.NOTACTIVE);
     }
     else
     {
         this.monsterIcon.Message.ClearStateText();
         MonsterIconGrayout.SetGrayout(this.monsterIcon.GetRootObject(), GUIMonsterIcon.DIMM_LEVEL.ACTIVE);
     }
 }
Exemplo n.º 9
0
 private static GameWebAPI.RespDataMA_GetMonsterMG.MonsterM GetMonsterGroupMaster(string monsterGroupId)
 {
     GameWebAPI.RespDataMA_GetMonsterMG.MonsterM   result   = null;
     GameWebAPI.RespDataMA_GetMonsterMG.MonsterM[] monsterM = MasterDataMng.Instance().RespDataMA_MonsterMG.monsterM;
     for (int i = 0; i < monsterM.Length; i++)
     {
         if (monsterM[i] != null && monsterM[i].monsterGroupId == monsterGroupId)
         {
             result = monsterM[i];
             break;
         }
     }
     return(result);
 }
Exemplo n.º 10
0
 private static void CreateMonsterMasterClient(ref Dictionary <string, MonsterClientMaster> destSimpleMasterList, ref Dictionary <string, Dictionary <string, MonsterClientMaster> > destGroupMasterList)
 {
     GameWebAPI.RespDataMA_GetMonsterMS.MonsterM[] monsterM = MasterDataMng.Instance().RespDataMA_MonsterMS.monsterM;
     for (int i = 0; i < monsterM.Length; i++)
     {
         if (monsterM[i] != null)
         {
             GameWebAPI.RespDataMA_GetMonsterMG.MonsterM monsterGroupMaster = MonsterMaster.GetMonsterGroupMaster(monsterM[i].monsterGroupId);
             if (monsterGroupMaster != null)
             {
                 MonsterClientMaster monsterMaster = new MonsterClientMaster(monsterM[i], monsterGroupMaster);
                 MonsterMaster.AddMonsterSimpleMaster(monsterMaster, ref destSimpleMasterList);
                 MonsterMaster.AddMonsterGroupMaster(monsterMaster, ref destGroupMasterList);
             }
         }
     }
 }
    public void ShowCharacter()
    {
        if (this.Data == null)
        {
            this.ngTargetTex.gameObject.SetActive(false);
            this.ShowDet();
            return;
        }
        this.SetRenderPos();
        GameObject gameObject = GUIManager.LoadCommonGUI("Render3D/Render3DRT", null);

        this.csRender3DRT = gameObject.GetComponent <CommonRender3DRT>();
        string filePath = MonsterObject.GetFilePath(this.Data.GetMonsterMaster().Group.modelId);

        this.csRender3DRT.LoadChara(filePath, this.v3Chara.x, this.v3Chara.y, 0.1f, 0f, false);
        this.renderTex = this.csRender3DRT.SetRenderTarget(320, 378, 16);
        this.ngTargetTex.gameObject.SetActive(true);
        this.ngTargetTex.mainTexture = this.renderTex;
        GameWebAPI.RespDataMA_GetMonsterMG.MonsterM monsterMG = this.Data.monsterMG;
        float partyCharaPosX = 0f;
        float partyCharaPosY = 0f;
        float partyCharaPosZ = 0f;
        float partyCharaRotY = 0f;

        if (!string.IsNullOrEmpty(monsterMG.partyCharaPosX))
        {
            partyCharaPosX = (float)double.Parse(monsterMG.partyCharaPosX);
        }
        if (!string.IsNullOrEmpty(monsterMG.partyCharaPosY))
        {
            partyCharaPosY = (float)double.Parse(monsterMG.partyCharaPosY);
        }
        if (!string.IsNullOrEmpty(monsterMG.partyCharaPosZ))
        {
            partyCharaPosZ = (float)double.Parse(monsterMG.partyCharaPosZ);
        }
        if (!string.IsNullOrEmpty(monsterMG.partyCharaRotY))
        {
            partyCharaRotY = (float)double.Parse(monsterMG.partyCharaRotY);
        }
        this.csRender3DRT.SetCharacterPositionForParty(partyCharaPosX, partyCharaPosY, partyCharaPosZ, partyCharaRotY);
        this.updateCharaCT = 2;
        this.ShowDet();
    }
Exemplo n.º 12
0
        protected void SetGashaCutScene(GameWebAPI.RespDataGA_ExecGacha gashaResult, bool isTutorial)
        {
            GameWebAPI.RespDataGA_ExecGacha.GachaResultMonster[] userMonsterList = gashaResult.userMonsterList;
            string[] array  = new string[userMonsterList.Length];
            string[] array2 = new string[userMonsterList.Length];
            for (int i = 0; i < userMonsterList.Length; i++)
            {
                MonsterUserData userMonster = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(userMonsterList[i].userMonsterId);

                GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = userMonster.GetMonsterMaster().Group;
                array[i]  = group.modelId;
                array2[i] = group.growStep;
            }
            CutsceneDataGasha cutsceneDataGasha = new CutsceneDataGasha();

            cutsceneDataGasha.path         = "Cutscenes/Gasha";
            cutsceneDataGasha.modelIdList  = array;
            cutsceneDataGasha.growStepList = array2;
            CutsceneDataGasha cutsceneDataGasha2 = cutsceneDataGasha;

            if (ExecGashaMonster.< > f__mg$cache0 == null)
            {
                ExecGashaMonster.< > f__mg$cache0 = new Action(CutSceneMain.FadeReqCutSceneEnd);
            }
            cutsceneDataGasha2.endCallback = ExecGashaMonster.< > f__mg$cache0;
            CutsceneDataGasha cutsceneDataGasha3 = cutsceneDataGasha;

            Loading.Invisible();
            if (isTutorial)
            {
                this.showedGashaResultAction = new Action(Singleton <TutorialObserver> .Instance.ResumeScript);
            }
            CutsceneDataBase cutsceneData = cutsceneDataGasha3;

            if (ExecGashaMonster.< > f__mg$cache1 == null)
            {
                ExecGashaMonster.< > f__mg$cache1 = new Action(CMD_MonsterGashaResult.CreateDialog);
            }
            CutSceneMain.FadeReqCutScene(cutsceneData, ExecGashaMonster.< > f__mg$cache1, null, new Action <int>(this.OnShowedGashaResultDialog), 0.5f, 0.5f);
        }
Exemplo n.º 13
0
    public void SetBossInfo(GameWebAPI.RespDataWD_GetDungeonInfo.EncountEnemy enemy)
    {
        this.bossInfo = enemy;
        string text = enemy.monsterId.ToString();

        GameWebAPI.RespDataMA_GetMonsterMS.MonsterM simple = MonsterMaster.GetMonsterMasterByMonsterId(text).Simple;
        if (simple != null)
        {
            text = simple.monsterGroupId;
            GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = MonsterMaster.GetMonsterMasterByMonsterGroupId(text).Group;
            if (group != null)
            {
                this.monsterIcon.gameObject.SetActive(true);
                this.monsterIcon.SetImage(simple.iconId, group.growStep);
                UIWidget component = this.monsterIcon.GetComponent <UIWidget>();
                if (null != component)
                {
                    this.monsterIcon.SetSize(component.width, component.height);
                }
            }
        }
    }
    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);
    }
Exemplo n.º 15
0
        private void SetGashaResult(GameWebAPI.RespDataGA_ExecGacha gashaResult, int playCount)
        {
            UserHomeInfo.dirtyMyPage = true;
            ClassSingleton <MonsterUserDataMng> .Instance.AddUserMonsterData(gashaResult.userMonsterList);

            ClassSingleton <GUIMonsterIconList> .Instance.RefreshList(ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonsterList());

            for (int i = 0; i < gashaResult.userMonsterList.Length; i++)
            {
                if (Convert.ToBoolean(gashaResult.userMonsterList[i].isNew))
                {
                    MonsterUserData userMonster = ClassSingleton <MonsterUserDataMng> .Instance.GetUserMonster(gashaResult.userMonsterList[i].userMonsterId);

                    GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = userMonster.GetMonsterMaster().Group;
                    if (!MonsterPicturebookData.ExistPicturebook(group.monsterCollectionId))
                    {
                        MonsterPicturebookData.AddPictureBook(group.monsterCollectionId);
                    }
                }
            }
            base.UpdateUserAssetsInventory(playCount);
            base.UpdateGashaInfo(playCount);
        }
 public void SetItemDetailed(MonsterUserData monster)
 {
     this.monsterIcon.SetColosseumDeckMonsterDetailed(monster);
     GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = monster.GetMonsterMaster().Group;
     this.SetSortieLimitState(group);
 }
 public void ClearSelect(GameWebAPI.RespDataMA_GetMonsterMG.MonsterM monsterMaster)
 {
     this.SetSortieLimitState(monsterMaster);
 }
Exemplo n.º 18
0
    public static List <ExtraEffectStatus> CheckStageEffectInvalid(int areaId, List <ExtraEffectStatus> extraEffectStatusList, MonsterData[] chipPlayers, MonsterData[] chipEnemys, MonsterData chipTarget)
    {
        List <ExtraEffectStatus> list = new List <ExtraEffectStatus>();
        bool flag = chipEnemys.Where((MonsterData item) => item.userMonster.userMonsterId == chipTarget.userMonster.userMonsterId).Any <MonsterData>();

        GameWebAPI.RespDataMA_GetMonsterMG.MonsterM         group = MonsterMaster.GetMonsterMasterByMonsterGroupId(chipTarget.monsterM.monsterGroupId).Group;
        GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster responseMonsterIntegrationGroupMaster = MasterDataMng.Instance().ResponseMonsterIntegrationGroupMaster;
        GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup[] source      = responseMonsterIntegrationGroupMaster.monsterIntegrationGroupM.Where((GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup item) => item.monsterId == chipTarget.monsterM.monsterId).ToArray <GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup>();
        string[] monsterIntegrationIds = source.Select((GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup item) => item.monsterIntegrationId).ToArray <string>();
        GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM        resistanceMaster     = MonsterResistanceData.GetResistanceMaster(chipTarget.monsterM.resistanceId);
        List <GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM> uniqueResistanceList = MonsterResistanceData.GetUniqueResistanceList(chipTarget.GetResistanceIdList());

        GameWebAPI.RespDataMA_GetMonsterResistanceM.MonsterResistanceM data = MonsterResistanceData.AddResistanceFromMultipleTranceData(resistanceMaster, uniqueResistanceList);
        Tolerance tolerance = ServerToBattleUtility.ResistanceToTolerance(data);
        GrowStep  growStep  = MonsterGrowStepData.ToGrowStep(group.growStep);

        foreach (ExtraEffectStatus extraEffectStatus in extraEffectStatusList)
        {
            bool flag2 = true;
            for (int i = 0; i < chipPlayers.Length; i++)
            {
                MonsterData chipActer = chipPlayers[i];
                if (chipActer != null)
                {
                    ChipEffectStatus.TargetType targetType;
                    if (chipActer.userMonster.userMonsterId == chipTarget.userMonster.userMonsterId)
                    {
                        targetType = ChipEffectStatus.TargetType.Actor;
                    }
                    else if (!chipEnemys.Where((MonsterData item) => item.userMonster.userMonsterId == chipActer.userMonster.userMonsterId).Any <MonsterData>())
                    {
                        if (!flag)
                        {
                            targetType = ChipEffectStatus.TargetType.Player;
                        }
                        else
                        {
                            targetType = ChipEffectStatus.TargetType.Enemy;
                        }
                    }
                    else if (flag)
                    {
                        targetType = ChipEffectStatus.TargetType.Player;
                    }
                    else
                    {
                        targetType = ChipEffectStatus.TargetType.Enemy;
                    }
                    foreach (int num in chipActer.GetChipEquip().GetChipIdList())
                    {
                        GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] array = ChipDataMng.GetChipEffectData(num.ToString());
                        array = ChipEffectStatus.GetStageEffectInvalidList(areaId, array, extraEffectStatus).ToArray();
                        if (array.Length > 0)
                        {
                            List <GameWebAPI.RespDataMA_ChipEffectM.ChipEffect> totalChipEffectStatusList = ChipEffectStatus.GetTotalChipEffectStatusList(array, flag, monsterIntegrationIds, chipTarget.monsterM.monsterGroupId, tolerance, group.tribe, growStep, null, null, targetType, EffectStatusBase.ExtraEffectType.StageEffextInvalid);
                            if (totalChipEffectStatusList.Count > 0)
                            {
                                flag2 = false;
                                break;
                            }
                        }
                    }
                }
            }
            if (flag2)
            {
                list.Add(extraEffectStatus);
            }
        }
        return(list);
    }
Exemplo n.º 19
0
    public string GetPresentName(GameWebAPI.RespDataMA_GetAssetCategoryM.AssetCategoryM masterAssetCategory, string objectId, bool showDetail = false)
    {
        string result = StringMaster.GetString("Present-10");

        if (masterAssetCategory != null)
        {
            result = masterAssetCategory.assetTitle;
        }
        MasterDataMng.AssetCategory assetCategory = (MasterDataMng.AssetCategory)masterAssetCategory.assetCategoryId.ToInt32();
        switch (assetCategory)
        {
        case MasterDataMng.AssetCategory.FACILITY_KEY:
        {
            FacilityKeyM facilityKeyMaster = FarmDataManager.GetFacilityKeyMaster(objectId);
            if (facilityKeyMaster != null)
            {
                result = facilityKeyMaster.facilityKeyName;
            }
            break;
        }

        default:
            if (assetCategory != MasterDataMng.AssetCategory.MONSTER)
            {
                if (assetCategory == MasterDataMng.AssetCategory.ITEM)
                {
                    GameWebAPI.RespDataMA_GetItemM.ItemM itemM = MasterDataMng.Instance().RespDataMA_ItemM.GetItemM(objectId);
                    if (itemM != null)
                    {
                        result = itemM.name;
                    }
                }
            }
            else
            {
                GameWebAPI.RespDataMA_GetMonsterMS.MonsterM simple = MonsterMaster.GetMonsterMasterByMonsterId(objectId).Simple;
                if (simple != null)
                {
                    GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = MonsterMaster.GetMonsterMasterByMonsterGroupId(simple.monsterGroupId).Group;
                    if (group != null)
                    {
                        result = group.monsterName;
                    }
                }
            }
            break;

        case MasterDataMng.AssetCategory.DUNGEON_TICKET:
        {
            GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM dungeonTicketM = MasterDataMng.Instance().RespDataMA_DungeonTicketMaster.dungeonTicketM.FirstOrDefault((GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM x) => objectId == x.dungeonTicketId);
            if (dungeonTicketM != null)
            {
                result = dungeonTicketM.name;
            }
            break;
        }

        case MasterDataMng.AssetCategory.TITLE:
        {
            GameWebAPI.RespDataMA_TitleMaster.TitleM titleM = TitleDataMng.GetDictionaryTitleM()[int.Parse(objectId)];
            if (titleM != null)
            {
                result = titleM.name;
            }
            break;
        }
        }
        if (showDetail)
        {
            MasterDataMng.AssetCategory assetCategory2 = (MasterDataMng.AssetCategory)masterAssetCategory.assetCategoryId.ToInt32();
            if (assetCategory2 != MasterDataMng.AssetCategory.CHIP)
            {
                if (assetCategory2 == MasterDataMng.AssetCategory.SOUL)
                {
                    GameWebAPI.RespDataMA_GetSoulM.SoulM soulMasterBySoulId = VersionUpMaterialData.GetSoulMasterBySoulId(objectId);
                    result = soulMasterBySoulId.soulName;
                }
            }
            else
            {
                int chipId = int.Parse(objectId);
                GameWebAPI.RespDataMA_ChipM.Chip chipMaster = ChipDataMng.GetChipMaster(chipId);
                result = chipMaster.name;
            }
        }
        return(result);
    }
Exemplo n.º 20
0
 public MonsterClientMaster(GameWebAPI.RespDataMA_GetMonsterMS.MonsterM simple, GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group)
 {
     this.monsterSimpleMaster = simple;
     this.monsterGroupMaster  = group;
 }
Exemplo n.º 21
0
    private static int GetExtraChipValue(MonsterData monsterData, EffectStatusBase.ExtraEffectType effectType)
    {
        float num    = 0f;
        int   areaId = ExtraEffectUtil.GetAreaId();

        GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = MonsterMaster.GetMonsterMasterByMonsterGroupId(monsterData.monsterM.monsterGroupId).Group;
        foreach (int num2 in monsterData.GetChipEquip().GetChipIdList())
        {
            GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] chipEffectData = ChipDataMng.GetChipEffectData(num2.ToString());
            if (chipEffectData != null)
            {
                GameWebAPI.RespDataMA_ChipEffectM.ChipEffect[] invocationList = ChipEffectStatus.GetInvocationList(chipEffectData, EffectStatusBase.EffectTriggerType.Area, monsterData.monsterM.monsterGroupId.ToInt32(), null, areaId);
                int num3 = 0;
                EffectStatusBase.ExtraEffectType effectType2 = EffectStatusBase.ExtraEffectType.Non;
                switch (effectType)
                {
                case EffectStatusBase.ExtraEffectType.Atk:
                    num3        = monsterData.userMonster.attack.ToInt32();
                    effectType2 = EffectStatusBase.ExtraEffectType.Atk;
                    break;

                case EffectStatusBase.ExtraEffectType.Def:
                    num3        = monsterData.userMonster.defense.ToInt32();
                    effectType2 = EffectStatusBase.ExtraEffectType.Def;
                    break;

                case EffectStatusBase.ExtraEffectType.Hp:
                    num3        = monsterData.userMonster.hp.ToInt32();
                    effectType2 = EffectStatusBase.ExtraEffectType.Hp;
                    break;

                case EffectStatusBase.ExtraEffectType.Speed:
                    num3        = monsterData.userMonster.speed.ToInt32();
                    effectType2 = EffectStatusBase.ExtraEffectType.Speed;
                    break;

                case EffectStatusBase.ExtraEffectType.Satk:
                    num3        = monsterData.userMonster.spAttack.ToInt32();
                    effectType2 = EffectStatusBase.ExtraEffectType.Satk;
                    break;

                case EffectStatusBase.ExtraEffectType.Sdef:
                    num3        = monsterData.userMonster.spDefense.ToInt32();
                    effectType2 = EffectStatusBase.ExtraEffectType.Sdef;
                    break;

                default:
                    if (effectType == EffectStatusBase.ExtraEffectType.SkillPower || effectType == EffectStatusBase.ExtraEffectType.SkillHit)
                    {
                        num3        = 0;
                        effectType2 = EffectStatusBase.ExtraEffectType.Non;
                    }
                    break;
                }
                GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster responseMonsterIntegrationGroupMaster = MasterDataMng.Instance().ResponseMonsterIntegrationGroupMaster;
                GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup[] source      = responseMonsterIntegrationGroupMaster.monsterIntegrationGroupM.Where((GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup item) => item.monsterId == monsterData.monsterM.monsterId).ToArray <GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup>();
                string[] monsterIntegrationIds = source.Select((GameWebAPI.RespDataMA_MonsterIntegrationGroupMaster.MonsterIntegrationGroup item) => item.monsterIntegrationId).ToArray <string>();
                num += ChipEffectStatus.GetChipEffectValueToFloat(invocationList, (float)num3, false, monsterIntegrationIds, monsterData.monsterM.monsterGroupId, ExtraEffectUtil.ResistanceToTolerance(monsterData), group.tribe, MonsterGrowStepData.ToGrowStep(group.growStep), null, null, ChipEffectStatus.TargetType.Actor, effectType2, 0);
            }
        }
        return(Mathf.FloorToInt(num));
    }
Exemplo n.º 22
0
        private static string GetAssetValueName(int assetCategoryId, string assetValue)
        {
            string result = string.Empty;

            switch (assetCategoryId)
            {
            case 14:
            {
                GameWebAPI.RespDataMA_GetSoulM.SoulM soulMasterBySoulId = VersionUpMaterialData.GetSoulMasterBySoulId(assetValue);
                if (soulMasterBySoulId != null)
                {
                    result = soulMasterBySoulId.soulName;
                }
                break;
            }

            default:
                if (assetCategoryId != 1)
                {
                    if (assetCategoryId == 6)
                    {
                        GameWebAPI.RespDataMA_GetItemM.ItemM itemM = MasterDataMng.Instance().RespDataMA_ItemM.GetItemM(assetValue);
                        if (itemM != null)
                        {
                            result = itemM.name;
                        }
                    }
                }
                else
                {
                    GameWebAPI.RespDataMA_GetMonsterMS.MonsterM simple = MonsterMaster.GetMonsterMasterByMonsterId(assetValue).Simple;
                    if (simple != null)
                    {
                        GameWebAPI.RespDataMA_GetMonsterMG.MonsterM group = MonsterMaster.GetMonsterMasterByMonsterGroupId(simple.monsterGroupId).Group;
                        if (group != null)
                        {
                            result = group.monsterName;
                        }
                    }
                }
                break;

            case 16:
            {
                FacilityKeyM facilityKeyMaster = FarmDataManager.GetFacilityKeyMaster(assetValue);
                if (facilityKeyMaster != null)
                {
                    result = facilityKeyMaster.facilityKeyName;
                }
                break;
            }

            case 17:
            {
                int chipId = int.Parse(assetValue);
                GameWebAPI.RespDataMA_ChipM.Chip chipMaster = ChipDataMng.GetChipMaster(chipId);
                if (chipMaster != null)
                {
                    result = chipMaster.name;
                }
                break;
            }

            case 18:
            {
                GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM dungeonTicketM = MasterDataMng.Instance().RespDataMA_DungeonTicketMaster.dungeonTicketM.FirstOrDefault((GameWebAPI.RespDataMA_DungeonTicketMaster.DungeonTicketM x) => assetValue == x.dungeonTicketId);
                if (dungeonTicketM != null)
                {
                    result = dungeonTicketM.name;
                }
                break;
            }

            case 19:
            {
                GameWebAPI.RespDataMA_TitleMaster.TitleM titleM = TitleDataMng.GetDictionaryTitleM()[int.Parse(assetValue)];
                if (titleM != null)
                {
                    result = titleM.name;
                }
                break;
            }
            }
            return(result);
        }