コード例 #1
0
    private void CallEvolutionCutScene(MonsterData monsterData, CutsceneDataEvolution cutsceneData)
    {
        CMD_CharacterDetailed detailedWindow = null;

        CutSceneMain.FadeReqCutScene(cutsceneData, delegate()
        {
            FarmCameraControlForCMD.Off();
            detailedWindow = CMD_CharacterDetailed.CreateWindow(monsterData);
            this.DestroyRender3DRT();
            if (!this.IsOfflineModeFlag)
            {
                this.InitMonsterList();
                if (this.gardenInfoList != null)
                {
                    TimeSpan timeSpan    = this.endDateTime - ServerDateTime.Now;
                    int shortenTimeValue = this.GetShortenTimeValue(this.gardenInfoList, monsterData.userMonster.userMonsterId);
                    this.growNeedStone   = this.GetCostEvolution(shortenTimeValue, timeSpan);
                }
                DkLog.W(string.Format("デジストーン {0} : {1}", DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.point, this.growNeedStone), false);
                DataMng.Instance().RespDataUS_PlayerInfo.playerInfo.point -= this.growNeedStone;
            }
        }, delegate()
        {
            detailedWindow.StartAnimation();
            RestrictionInput.EndLoad();
            if (this.finishedActionCutScene != null)
            {
                this.finishedActionCutScene();
                this.finishedActionCutScene = null;
            }
        }, 0.5f, 0.5f);
    }
コード例 #2
0
 private void SetOpenStatus()
 {
     this.InitializeBannerTex();
     if (this.worldStageData.wdi.timeLeft == 0 && (this.worldStageData.wdi.dungeons == null || this.worldStageData.wdi.dungeons.Length == 0))
     {
         this.timeLabel.gameObject.SetActive(false);
         this.bannerTex.material.SetFloat("_Rate", 1f);
         this.bannerTex.color = this.closeBannerCol;
         this.goCloseKey.SetActive(true);
         this.ngCloseKey.enabled = false;
         this.closedTextLabel.transform.parent.gameObject.SetActive(true);
         this.closedTextLabel.text = StringMaster.GetString("QuestPointRankingClosed");
         DkLog.W("worldStageData.isViewRanking : " + this.worldStageData.isViewRanking, false);
         DkLog.W("worldStageData.isCounting : " + this.worldStageData.isCounting, false);
         bool active = this.worldStageData.isViewRanking && this.worldStageData.isCounting;
         this.aggregatingLabel.gameObject.SetActive(active);
         this.aggregatingLabel.text = StringMaster.GetString("QuestPointRankingCounting");
     }
     else if (this.worldStageData.wdi.isOpen == 1)
     {
         this.timeLabel.gameObject.SetActive(true);
         this.SetTimeStatus();
         this.bannerTex.material.SetFloat("_Rate", 0f);
         this.bannerTex.color = this.openBannerCol;
         this.goCloseKey.SetActive(false);
     }
     else
     {
         this.timeLabel.gameObject.SetActive(false);
         this.bannerTex.material.SetFloat("_Rate", 1f);
         this.bannerTex.color = this.closeBannerCol;
         this.goCloseKey.SetActive(true);
     }
 }
コード例 #3
0
    protected override IEnumerator MainRoutine()
    {
        BattleObjectPooler.CallInitialize();
        BattleObjectPooler.isCheckEnable = false;
        TextureTimeScrollRealTime.TimeReset();
        this.SetLoadingImage(true);
        this.SetActiveHierarcyRendering(false);
        base.stateManager.initialize.InitializeRoots();
        base.battleStateData.beforeConfirmDigiStoneNumber = base.hierarchyData.digiStoneNumber;
        List <IEnumerator> functionList = new List <IEnumerator>();

        functionList.Add(this.LoadBeforeInitializeUI());
        functionList.Add(this.InitSound());
        functionList.Add(this.CheckRecover());
        functionList.Add(this.LoadResources());
        functionList.Add(this.LoadPlayer());
        functionList.Add(this.LoadEnemy());
        functionList.Add(this.LoadCharacterAfter());
        functionList.Add(this.LoadCommonEffect());
        functionList.Add(this.LoadSkill());
        functionList.Add(this.LoadAfterInitializeUI());
        Action loading = base.stateManager.battleUiComponents.initializeUi.GetLoadingInvoke(functionList.Count);

        TimeProfiler.BeginTotalProfile();
        foreach (IEnumerator function in functionList)
        {
            TimeProfiler.BeginProfile();
            while (function.MoveNext())
            {
                yield return(null);
            }
            loading();
            yield return(new WaitForEndOfFrame());

            TimeProfiler.EndProfile();
            DkLog.W(string.Format("経過時間 : {0} | {1}", TimeProfiler.ElapseTime, function), false);
        }
        TimeProfiler.EndTotalProfile();
        DkLog.W(string.Format("経過時間(total) : {0}", TimeProfiler.TotalElapseTime), false);
        for (int i = 0; i < base.hierarchyData.usePlayerCharacters.Length; i++)
        {
            bool isLeade = i == base.hierarchyData.leaderCharacter;
            CharacterStateControl characterStateControl = base.battleStateData.playerCharacters[i];
            string resourcePath            = GUIMonsterIcon.InternalGetMonsterIconPathByIconId(characterStateControl.playerStatus.thumbnailId);
            string monsterIconPathByIconId = GUIMonsterIcon.GetMonsterIconPathByIconId(characterStateControl.playerStatus.thumbnailId);
            base.stateManager.uiControl.ApplyMonsterButtonIcon(i, characterStateControl, isLeade, resourcePath, monsterIconPathByIconId);
        }
        BattleDebug.Log("--- バトルGC : 開始");
        Resources.UnloadUnusedAssets();
        GC.Collect();
        BattleDebug.Log("--- バトルGC : 完了");
        this.SetActiveHierarcyRendering(true);
        this.SetLoadingImage(false);
        base.stateManager.uiControl.SetTouchEnable(true);
        base.stateManager.SetBattleScreen(BattleScreen.BattleStartAction);
        base.stateManager.battleUiComponents.InitSafeArea();
        yield break;
    }
コード例 #4
0
 public override void Show(Action <int> closeEvent, float sizeX, float sizeY, float showTime)
 {
     base.HideDLG();
     RestrictionInput.StartLoad(RestrictionInput.LoadType.LARGE_IMAGE_MASK_ON);
     this.responseContactCode = PlayerPrefs.GetString("InquiryCode", string.Empty);
     DkLog.W("responseContactCode : " + this.responseContactCode, false);
     this.contactCode.text = this.GetMoldedContactCode(this.responseContactCode);
     RestrictionInput.EndLoad();
     base.ShowDLG();
     base.Show(closeEvent, sizeX, sizeY, showTime);
 }
コード例 #5
0
    public TaskBase RequestWorldStartDataLogic()
    {
        NormalTask normalTask = new NormalTask(delegate()
        {
            this.IsBattleRecoverable    = false;
            this.isRecoverSuccessWebAPI = false;
            ClassSingleton <QuestData> .Instance.RespDataWD_DungeonStart = null;
            return(null);
        });

        GameWebAPI.WorldStartDataLogic request = new GameWebAPI.WorldStartDataLogic
        {
            OnReceived = delegate(GameWebAPI.ReceiveQuestResume response)
            {
                if (response.startId != null)
                {
                    this.isRecoverSuccessWebAPI = true;
                    ClassSingleton <QuestData> .Instance.RespDataWD_DungeonStart = response;
                    string text = string.Empty;
                    DkLog.W("response.userDungeonTicketId : " + response.userDungeonTicketId, false);
                    if (string.IsNullOrEmpty(response.userDungeonTicketId))
                    {
                        string @string = PlayerPrefs.GetString("userDungeonTicketId", string.Empty);
                        if (!string.IsNullOrEmpty(@string))
                        {
                            text = @string;
                            DkLog.W("ticketid : " + text, false);
                        }
                        PlayerPrefs.SetString("userDungeonTicketId", string.Empty);
                    }
                    else
                    {
                        text = response.userDungeonTicketId;
                    }
                    DkLog.W("SetRetryData(response.worldDungeonId, ticketid) : " + text, false);
                    this.SetRetryData(response.worldDungeonId, text);
                }
            }
        };
        normalTask.Add(new APIRequestTask(request, true));
        normalTask.Add(new NormalTask(delegate()
        {
            if (this.CheckSaveFile())
            {
                return(this.CheckJsonBySaveData());
            }
            this.ValidateForPopup(false);
            return(null);
        }));
        return(normalTask);
    }
コード例 #6
0
    private List <MissionItem> GetMissionStateDataByTypeA(CMD_Mission.MissionType type)
    {
        List <MissionItem> list = new List <MissionItem>();

        GameWebAPI.RespDataMS_MissionInfoLogic.Result.Mission[] missionData = this.GetMissionData(CMD_Mission.nowFocusType);
        foreach (GameWebAPI.RespDataMS_MissionInfoLogic.Result.Mission mission in missionData)
        {
            if (mission.status == 1)
            {
                DkLog.W("data : " + mission.detail.missionDetail, false);
                list.Add(new MissionItem
                {
                    missionId         = int.Parse(mission.missionId),
                    lastStepFlg       = mission.lastStepFlg,
                    missionCategoryId = mission.missionCategoryId
                });
            }
        }
        return(list);
    }
コード例 #7
0
    public override void Show(Action <int> f, float sizeX, float sizeY, float aT)
    {
        GUICollider.DisableAllCollider("CMD_QuestSelect");
        List <QuestData.WorldAreaData> worldAreaM_Normal = ClassSingleton <QuestData> .Instance.GetWorldAreaM_Normal();

        this.worldAreaMList = new List <QuestData.WorldAreaData>();
        for (int i = 0; i < worldAreaM_Normal.Count; i++)
        {
            if (worldAreaM_Normal[i].isActive)
            {
                List <QuestData.WorldStageData> worldStageData_ByAreaID = ClassSingleton <QuestData> .Instance.GetWorldStageData_ByAreaID(worldAreaM_Normal[i].data.worldAreaId);

                DkLog.W(string.Format("{0} : {1} : {2}", worldAreaM_Normal[i].data.name, worldAreaM_Normal[i].isActive, worldStageData_ByAreaID.Count), false);
                if (worldStageData_ByAreaID.Count > 0)
                {
                    this.worldAreaMList.Add(worldAreaM_Normal[i]);
                }
            }
        }
        bool flag = this.IsColosseumOpen() && DataMng.Instance().IsReleaseColosseum;

        if (flag)
        {
            GameWebAPI.RespDataMA_GetWorldAreaM            respDataMA_WorldAreaM = MasterDataMng.Instance().RespDataMA_WorldAreaM;
            GameWebAPI.RespDataMA_GetWorldAreaM.WorldAreaM data = respDataMA_WorldAreaM.worldAreaM.Where((GameWebAPI.RespDataMA_GetWorldAreaM.WorldAreaM x) => x.worldAreaId == "5").FirstOrDefault <GameWebAPI.RespDataMA_GetWorldAreaM.WorldAreaM>();
            QuestData.WorldAreaData worldAreaData = new QuestData.WorldAreaData();
            worldAreaData.data     = data;
            worldAreaData.isActive = true;
            this.worldAreaMList.Add(worldAreaData);
        }
        base.PartsTitle.SetTitle(StringMaster.GetString("QuestTopTitle"));
        this.InitUI();
        base.Show(f, sizeX, sizeY, aT);
        base.SetTutorialAnyTime("anytime_second_tutorial_quest");
        RestrictionInput.EndLoad();
    }
コード例 #8
0
    public void Load(BattleStateData battleStateData)
    {
        string propInfoName = string.Empty;
        Type   propInfoType = null;

        try
        {
            PropertyInfo[] propertyInfos = this.GetPropertyInfos(typeof(BattleStateData), false);
            int            num           = 0;
            foreach (PropertyInfo propertyInfo in propertyInfos)
            {
                propInfoName = propertyInfo.Name;
                propInfoType = propertyInfo.PropertyType;
                if (!this.typeNameBlackList.Any((Type c) => c == propInfoType))
                {
                    if (!this.variableNameBlackList.Any((string c) => c == propInfoName))
                    {
                        string text = this.cachedJsonArr[num];
                        if (propInfoType != typeof(CharacterStateControl))
                        {
                            if (propInfoType == typeof(CharacterStateControl[]))
                            {
                                if (propInfoName == "playerCharacters")
                                {
                                    string[] array2 = JsonReader.Deserialize(text, typeof(string[])) as string[];
                                    int      num2   = 0;
                                    foreach (string json in array2)
                                    {
                                        this.ManageCharacterStateControlForJsonToValue(json, battleStateData.playerCharacters[num2], battleStateData);
                                        num2++;
                                    }
                                }
                                else
                                {
                                    if (propInfoName == "enemies")
                                    {
                                        goto IL_279;
                                    }
                                    global::Debug.LogErrorFormat("ありえない変数名:{0}です。", new object[]
                                    {
                                        propInfoName
                                    });
                                    goto IL_279;
                                }
                            }
                            else if (propInfoType == typeof(CharacterStateControl[][]))
                            {
                                string[][] array4 = JsonReader.Deserialize(text, typeof(string[][])) as string[][];
                                int        num3   = 0;
                                foreach (string array6 in array4)
                                {
                                    int num4 = 0;
                                    foreach (string json2 in array6)
                                    {
                                        this.ManageCharacterStateControlForJsonToValue(json2, battleStateData.preloadEnemies[num3][num4], battleStateData);
                                        num4++;
                                    }
                                    num3++;
                                }
                            }
                            else if (propInfoType == typeof(List <ItemDropResult>))
                            {
                                this.ManageItemDropResultForJsonToValue(text, battleStateData);
                            }
                            else if (!(propertyInfo.Name == "currentDigiStoneNumber"))
                            {
                                object value = JsonReader.Deserialize(text, propInfoType);
                                propertyInfo.SetValue(battleStateData, value, null);
                            }
                        }
                        num++;
                    }
                }
                IL_279 :;
            }
        }
        catch (Exception ex)
        {
            global::Debug.LogErrorFormat("Error:{0}, 変数名:{1}, Type:{2}", new object[]
            {
                ex.Message,
                propInfoName,
                propInfoType
            });
        }
        DkLog.W(string.Format("チケットID {0} : {1}", battleStateData.ticketId, DataMng.Instance().GetResultUtilData().last_dng_req.userDungeonTicketId), false);
        if (!string.IsNullOrEmpty(battleStateData.ticketId))
        {
            DataMng.Instance().GetResultUtilData().last_dng_req.userDungeonTicketId = battleStateData.ticketId;
        }
    }
コード例 #9
0
    private bool SwitchAffectEffect(AffectEffectProperty currentSuffer, CharacterStateControl currentCharacter, CharacterStateControl baseTarget, List <SubStateSkillDetailsFunction.TargetData> targetDataList, ref bool isEnableForPrevious, ref bool skip)
    {
        if (currentSuffer.type != AffectEffect.SkillBranch)
        {
            return(true);
        }
        DkLog.W("条件分岐判定処理開始", false);
        if (currentSuffer.type == AffectEffect.SkillBranch && currentSuffer.skillBranchOverlap == 1)
        {
            isEnableForPrevious = false;
            DkLog.W("重複可能だったのでフラグを下ろす", false);
        }
        DkLog.W("isEnableForPrevious : " + isEnableForPrevious, false);
        if (currentSuffer.type == AffectEffect.SkillBranch && (currentSuffer.skillBranchOverlap != 0 || !isEnableForPrevious))
        {
            bool flag  = false;
            bool flag2 = currentSuffer.skillBranchTargetType == 4 || currentSuffer.skillBranchTargetType == 6;
            this.targetList.Clear();
            switch (currentSuffer.skillBranchTargetType)
            {
            case 1:
                this.targetList.Add(currentCharacter);
                break;

            case 2:
                this.targetList.Add(baseTarget);
                break;

            case 3:
            case 4:
                foreach (CharacterStateControl item in base.battleStateData.playerCharacters)
                {
                    this.targetList.Add(item);
                }
                break;

            case 5:
            case 6:
                foreach (CharacterStateControl item2 in base.battleStateData.enemies)
                {
                    this.targetList.Add(item2);
                }
                break;
            }
            foreach (CharacterStateControl characterStateControl in this.targetList)
            {
                if (!(characterStateControl != null) || !characterStateControl.isDied)
                {
                    CharacterStateControl characterStateControl2 = characterStateControl;
                    SkillBranchType       skillBranchType        = (SkillBranchType)currentSuffer.skillBranchType;
                    switch (skillBranchType)
                    {
                    case SkillBranchType.None:
                        break;

                    case SkillBranchType.SufferStatus:
                        if (characterStateControl2.currentSufferState.FindSufferState((SufferStateProperty.SufferType)currentSuffer.skillBranchTypeValue))
                        {
                            flag = true;
                        }
                        else if (flag2)
                        {
                            flag = false;
                        }
                        continue;

                    case SkillBranchType.HpRateUp:
                    {
                        float num = (float)characterStateControl2.hp / ((float)characterStateControl2.extraMaxHp * 1f) * 100f;
                        if (num >= (float)currentSuffer.skillBranchTypeValue)
                        {
                            flag = true;
                        }
                        else if (flag2)
                        {
                            flag = false;
                        }
                        continue;
                    }

                    case SkillBranchType.HpRateDown:
                    {
                        float num = (float)characterStateControl2.hp / ((float)characterStateControl2.extraMaxHp * 1f) * 100f;
                        if (num * 100f <= (float)currentSuffer.skillBranchTypeValue)
                        {
                            flag = true;
                        }
                        else if (flag2)
                        {
                            flag = false;
                        }
                        continue;
                    }

                    case SkillBranchType.MyHpRateUp:
                    {
                        float num  = (float)characterStateControl2.hp / ((float)characterStateControl2.extraMaxHp * 1f) * 100f;
                        float num2 = (float)currentCharacter.hp / ((float)currentCharacter.extraMaxHp * 1f) * 100f;
                        if (num >= num2)
                        {
                            flag = true;
                        }
                        else if (flag2)
                        {
                            flag = false;
                        }
                        continue;
                    }

                    case SkillBranchType.MyHpRateDown:
                    {
                        float num  = (float)characterStateControl2.hp / ((float)characterStateControl2.extraMaxHp * 1f) * 100f;
                        float num2 = (float)currentCharacter.hp / ((float)currentCharacter.extraMaxHp * 1f) * 100f;
                        if (num <= num2)
                        {
                            flag = true;
                        }
                        else if (flag2)
                        {
                            flag = false;
                        }
                        continue;
                    }

                    case SkillBranchType.BehaviorAlready:
                        if (currentSuffer.skillBranchTypeValue == 0)
                        {
                            if (characterStateControl2.skillOrder > currentCharacter.skillOrder)
                            {
                                flag = true;
                            }
                            else if (flag2)
                            {
                                flag = false;
                            }
                        }
                        else if (characterStateControl2.skillOrder < currentCharacter.skillOrder)
                        {
                            flag = true;
                        }
                        else if (flag2)
                        {
                            flag = false;
                        }
                        continue;

                    case SkillBranchType.Attribute:
                        continue;

                    case SkillBranchType.AttributeMerit:
                        continue;

                    case SkillBranchType.NotSufferStatus:
                        if (!characterStateControl2.currentSufferState.FindSufferState((SufferStateProperty.SufferType)currentSuffer.skillBranchTypeValue))
                        {
                            flag = true;
                        }
                        else if (flag2)
                        {
                            flag = false;
                        }
                        continue;

                    default:
                        if (skillBranchType != SkillBranchType.End)
                        {
                            continue;
                        }
                        break;
                    }
                    flag = true;
                }
            }
            DkLog.W(string.Format("isEnable {0}", flag), false);
            if (flag)
            {
                skip = false;
                isEnableForPrevious = true;
            }
            else
            {
                skip = true;
            }
            foreach (SubStateSkillDetailsFunction.TargetData targetData in targetDataList)
            {
                targetData.isAllMiss = false;
            }
            return(false);
        }
        skip = true;
        DkLog.W(string.Format("skip {0}", skip), false);
        return(false);
    }
コード例 #10
0
    private bool checkUseSkill(SkillStatus status, CharacterStateControl currentCharacter, CharacterStateControl tg)
    {
        bool isProtectEnableSkill = false;

        foreach (AffectEffectProperty affectEffectProperty in status.affectEffect)
        {
            if (AffectEffectProperty.IsDamage(affectEffectProperty.type))
            {
                isProtectEnableSkill = true;
                break;
            }
        }
        List <SubStateSkillDetailsFunction.TargetData> list = new List <SubStateSkillDetailsFunction.TargetData>();
        int num = 0;

        for (int i = 0; i < status.affectEffect.Count; i++)
        {
            AffectEffectProperty affectEffectProperty2 = status.affectEffect[i];
            if (AffectEffectProperty.IsDamage(affectEffectProperty2.type))
            {
                num += affectEffectProperty2.hitNumber;
            }
        }
        bool flag = true;
        AffectEffectProperty affectEffectProperty3 = null;
        bool         flag2        = false;
        bool         result       = false;
        bool         flag3        = false;
        EffectTarget effectTarget = EffectTarget.Enemy;

        for (int j = 0; j < status.affectEffect.Count; j++)
        {
            DkLog.W("↓↓↓↓↓↓", false);
            AffectEffectProperty affectEffectProperty4 = status.affectEffect[j];
            if (j == 0)
            {
                effectTarget = affectEffectProperty4.target;
            }
            if (affectEffectProperty3 != null && affectEffectProperty3.target != affectEffectProperty4.target)
            {
                CharacterStateControl[] skillTargetList = base.stateManager.targetSelect.GetSkillTargetList(currentCharacter, affectEffectProperty4.target);
                if (skillTargetList != null && skillTargetList.Length > 0)
                {
                    currentCharacter.targetCharacter = skillTargetList[0];
                }
                if (effectTarget == affectEffectProperty4.target)
                {
                    currentCharacter.targetCharacter = tg;
                }
            }
            list = this.CreateTargetData(list, currentCharacter, affectEffectProperty4, isProtectEnableSkill, ref flag);
            affectEffectProperty3 = affectEffectProperty4;
            if (this.SwitchAffectEffect(affectEffectProperty4, currentCharacter, tg, list, ref flag3, ref flag2))
            {
                DkLog.W(string.Format("targetDataList {0} : currentSuffer.type {1} : tg {2} : skip {3}", new object[]
                {
                    list.Count,
                    affectEffectProperty4.type,
                    string.Empty,
                    flag2
                }), false);
                if (!flag2)
                {
                    result = true;
                    DkLog.W(string.Format("targetDataList.Count {0}", list.Count), false);
                }
            }
        }
        return(result);
    }