Exemplo n.º 1
0
        private void Refresh()
        {
            if (!Object.op_Inequality((Object)MonoSingleton <GameManager> .Instance, (Object)null))
            {
                return;
            }
            bool flag1 = false;
            bool flag2 = true;

            foreach (TrophyParam trophyParam in ChallengeMission.GetRootTrophiesSortedByPriority())
            {
                if (!ChallengeMission.GetTrophyCounter(trophyParam).IsEnded)
                {
                    if (this.IsNotReceiveRewards(trophyParam))
                    {
                        flag1 = true;
                    }
                    flag2 = false;
                    break;
                }
            }
            this.Badge.SetActive(flag1);
            ((Component)this).get_gameObject().SetActive(!flag2);
            if (flag2)
            {
                return;
            }
            FlowNode_GameObject.ActivateOutputLinks((Component)this, 10);
        }
        private void OnSelectItem(GameObject go)
        {
            ChapterParam dataOfClass = DataSource.FindDataOfClass <ChapterParam>(go, (ChapterParam)null);

            if (dataOfClass == null)
            {
                return;
            }
            QuestParam[] availableQuests = MonoSingleton <GameManager> .Instance.Player.AvailableQuests;
            long         serverTime      = Network.GetServerTime();
            int          num1            = 0;
            int          num2            = 0;

            for (int index = 0; index < availableQuests.Length; ++index)
            {
                if (availableQuests[index].ChapterID == dataOfClass.iname && availableQuests[index].IsMulti)
                {
                    ++num1;
                    if (availableQuests[index].IsJigen && !availableQuests[index].IsDateUnlock(serverTime))
                    {
                        ++num2;
                    }
                }
            }
            if (num1 > 0 && num1 == num2)
            {
                UIUtility.NegativeSystemMessage((string)null, LocalizedText.Get("sys.QUEST_OUT_OF_DATE"), (UIUtility.DialogResultEvent)null, (GameObject)null, false, -1);
            }
            else
            {
                GlobalVars.SelectedMultiPlayArea = dataOfClass.iname;
                DebugUtility.Log("Select Play Area:" + GlobalVars.SelectedMultiPlayArea);
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 101);
            }
        }
Exemplo n.º 3
0
        private void OnSelectUnit(GameObject go)
        {
            UnitData dataOfClass = DataSource.FindDataOfClass <UnitData>(go, (UnitData)null);

            if (dataOfClass == null)
            {
                return;
            }
            if (this.OnUnitSelect != null)
            {
                this.OnUnitSelect(dataOfClass.UniqueID);
            }
            else
            {
                GlobalVars.SelectedUnitUniqueID.Set(dataOfClass.UniqueID);
                GlobalVars.SelectedUnitJobIndex.Set(dataOfClass.JobIndex);
                FlowNode_DownloadAssets component = (FlowNode_DownloadAssets)((Component)this).GetComponent <FlowNode_DownloadAssets>();
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null))
                {
                    component.DownloadUnits = new string[1]
                    {
                        GlobalVars.UnlockUnitID
                    }
                }
                ;
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 1);
            }
        }
Exemplo n.º 4
0
        public void Activated(int pinID)
        {
            switch (pinID)
            {
            case 0:
                this.Initialize();
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 7);
                break;

            case 1:
                this.RefreshUI();
                break;

            case 8:
                if (this.m_MissionProgressState == TowerManager.MissionProgressRequestState.NotInitialized)
                {
                    this.UpdateMissionProgressRequestState(MonoSingleton <GameManager> .Instance.FindFirstTowerFloor(GlobalVars.SelectedTowerID));
                }
                if (this.m_MissionProgressState == TowerManager.MissionProgressRequestState.RequireProgressRequest)
                {
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 9);
                    break;
                }
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 10);
                break;

            case 11:
                this.m_MissionProgressState = TowerManager.MissionProgressRequestState.ReceivedProgress;
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 12);
                break;
            }
        }
Exemplo n.º 5
0
 public override void Update(HomeWindow self)
 {
     if (this.mReq != null)
     {
         if (!this.mReq.isDone)
         {
             return;
         }
         if (UnityEngine.Object.op_Inequality(this.mReq.asset, (UnityEngine.Object)null))
         {
             this.mInstance = UnityEngine.Object.Instantiate(this.mReq.asset) as GameObject;
         }
         this.mReq = (LoadRequest)null;
     }
     if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.mInstance, (UnityEngine.Object)null) && !this.mHasNotifiedRankmatch)
     {
         this.mHasNotifiedRankmatch = true;
         self.mRankmatchRewarded    = false;
         FlowNode_GameObject.ActivateOutputLinks((Component)self, 1000);
     }
     if (!self.mRankmatchRewarded)
     {
         return;
     }
     if (!self.mBeginnerShown)
     {
         self.mBeginnerShown = true;
         self.mStateMachine.GotoState <HomeWindow.State_BeginnerNotify>();
     }
     else
     {
         self.MiscBeforeDefaultState();
         self.mStateMachine.GotoState <HomeWindow.State_Default>();
     }
 }
Exemplo n.º 6
0
 public void SetData(SkillPowerUpResult inSkillPowerUpResult, ConceptCardData inCurrentCardData, int inPrevAwakeCount, int inPrevLevel)
 {
     this.prevAwakeCount     = inPrevAwakeCount;
     this.skillPowerUpResult = inSkillPowerUpResult;
     this.currentCardData    = inCurrentCardData;
     this.skillPowerUpResult.SetData(this.currentCardData, this.prevAwakeCount, inPrevLevel, true);
     this.conceptCardTrustMaster.SetData(this.currentCardData);
     if (this.skillPowerUpResult.IsEnd)
     {
         Object.Destroy((Object)((Component)this.skillPowerUpResult).get_gameObject());
         this.skillPowerUpResult = (SkillPowerUpResult)null;
         if (!this.HasAbilityPowerUp())
         {
             FlowNode_GameObject.ActivateOutputLinks((Component)this, 101);
         }
         else
         {
             this.StartCoroutine(this.CreateAbilityResultCroutine());
         }
     }
     else
     {
         this.CheckPages();
     }
 }
        private void OnSelectCardUnitIcon()
        {
            SerializeValueList currentValue = FlowNode_ButtonEvent.currentValue as SerializeValueList;

            if (currentValue == null)
            {
                return;
            }
            string key = currentValue.GetString("select_unit");

            if (string.IsNullOrEmpty(key))
            {
                return;
            }
            UnitParam unitParam = MonoSingleton <GameManager> .Instance.GetUnitParam(key);

            if (unitParam == null)
            {
                return;
            }
            ((GachaResultUnitDetail)this.m_UnitDetail.GetComponent <GachaResultUnitDetail>()).Setup(this.CreateUnitData(unitParam));
            ButtonEvent.Invoke("CONCEPT_CARD_DETAIL_BTN_CLOSE", (object)null);
            this.m_Thumbnail.SetActive(false);
            this.m_UnitDetail.get_gameObject().SetActive(true);
            FlowNode_GameObject.ActivateOutputLinks((Component)this, this.OUT_UNITDETAIL);
        }
Exemplo n.º 8
0
        private void OnEnemySelect(GameObject go)
        {
            ArenaPlayer dataOfClass = DataSource.FindDataOfClass <ArenaPlayer>(go, (ArenaPlayer)null);

            if (dataOfClass == null || !AssetDownloader.isDone)
            {
                return;
            }
            PlayerData player = MonoSingleton <GameManager> .Instance.Player;

            if (player.ChallengeArenaNum <= 0)
            {
                UIUtility.NegativeSystemMessage((string)null, LocalizedText.Get("sys.ARENA_DAYLIMIT"), (UIUtility.DialogResultEvent)null, (GameObject)null, false, -1);
            }
            else if (player.GetNextChallengeArenaCoolDownSec() > 0L)
            {
                this.OnCooldownButtonClick();
            }
            else
            {
                GlobalVars.SelectedArenaPlayer.Set(dataOfClass);
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.VsEnemyPartyInfo, (UnityEngine.Object)null))
                {
                    DataSource.Bind <ArenaPlayer>(this.VsEnemyPartyInfo, dataOfClass);
                    GameParameter.UpdateAll(this.VsEnemyPartyInfo);
                }
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 101);
                this.BattlePreWindow.SetActive(true);
            }
        }
Exemplo n.º 9
0
        private void OnClick_RecoverButton()
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            TowerManager.\u003COnClick_RecoverButton\u003Ec__AnonStorey37D buttonCAnonStorey37D = new TowerManager.\u003COnClick_RecoverButton\u003Ec__AnonStorey37D();
            // ISSUE: reference to a compiler-generated field
            buttonCAnonStorey37D.\u003C\u003Ef__this = this;
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.mConfirmBox, (UnityEngine.Object)null))
            {
                return;
            }
            // ISSUE: reference to a compiler-generated field
            buttonCAnonStorey37D.cost = MonoSingleton <GameManager> .Instance.TowerResuponse.CalcRecoverCost();

            // ISSUE: reference to a compiler-generated field
            if (MonoSingleton <GameManager> .Instance.Player.Coin < buttonCAnonStorey37D.cost)
            {
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 3);
            }
            else
            {
                this.SetCanvasGroupIntaractable(false);
                // ISSUE: reference to a compiler-generated field
                string text = LocalizedText.Get("sys.MSG_TOWER_RECOVER", new object[1] {
                    (object)buttonCAnonStorey37D.cost
                });
                // ISSUE: reference to a compiler-generated method
                // ISSUE: reference to a compiler-generated method
                this.mConfirmBox = UIUtility.ConfirmBoxTitle(string.Empty, text, new UIUtility.DialogResultEvent(buttonCAnonStorey37D.\u003C\u003Em__41C), new UIUtility.DialogResultEvent(buttonCAnonStorey37D.\u003C\u003Em__41D), (GameObject)null, true, -1, (string)null, (string)null);
            }
        }
Exemplo n.º 10
0
 private void Start()
 {
     if (Object.op_Equality((Object)this.TextMessage, (Object)null))
     {
         ((Behaviour)this).set_enabled(false);
     }
     else if (string.IsNullOrEmpty(GlobalVars.SelectedChallengeMissionTrophy))
     {
         ((Behaviour)this).set_enabled(false);
     }
     else
     {
         this.mTrophy = ChallengeMission.GetTrophy(GlobalVars.SelectedChallengeMissionTrophy);
         if (this.mTrophy == null)
         {
             ((Behaviour)this).set_enabled(false);
         }
         else
         {
             if (this.mTrophy.IsChallengeMissionRoot)
             {
                 this.PanelNormal.SetActive(false);
                 this.PanelComplete.SetActive(true);
                 FlowNode_GameObject.ActivateOutputLinks((Component)this, 3);
             }
             else
             {
                 this.PanelNormal.SetActive(true);
                 this.PanelComplete.SetActive(false);
                 FlowNode_GameObject.ActivateOutputLinks((Component)this, 2);
             }
             this.UpdateReward(this.mTrophy);
         }
     }
 }
Exemplo n.º 11
0
 private void GenerateList(int page = 0)
 {
     this.mUnitList.ForEach((Action <GameObject>)(go => UnityEngine.Object.Destroy((UnityEngine.Object)go)));
     this.mUnitList.Clear();
     for (int index1 = 0; index1 < 28; ++index1)
     {
         UnitData data   = (UnitData)null;
         int      index2 = index1 + page * 28;
         if (index2 < this.mDraftUnitListCache.Count)
         {
             Json_Unit jsonUnit = this.mDraftUnitListCache[index2].GetJson_Unit();
             if (jsonUnit != null)
             {
                 data = new UnitData();
                 data.Deserialize(jsonUnit);
             }
         }
         GameObject root = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.mGOUnitItem);
         DataSource.Bind <UnitData>(root, data);
         GameParameter.UpdateAll(root);
         root.get_transform().SetParent(this.mUnitParentTransform, false);
         root.SetActive(true);
         this.mUnitList.Add(root);
     }
     this.mPageNowTxt.set_text((this.mPage + 1).ToString());
     if (this.mPage - 1 < 0)
     {
         FlowNode_GameObject.ActivateOutputLinks((Component)this, 21);
     }
     if (this.mPage + 1 < this.mPageMax)
     {
         return;
     }
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 22);
 }
Exemplo n.º 12
0
        public void Activated(int pinID)
        {
            switch (pinID)
            {
            case 1:
                this.GenerateList(0);
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 11);
                break;

            case 2:
                if (this.mPage - 1 < 0)
                {
                    break;
                }
                this.GenerateList(--this.mPage);
                break;

            case 3:
                if (this.mPage + 1 >= this.mPageMax)
                {
                    break;
                }
                this.GenerateList(++this.mPage);
                break;
            }
        }
Exemplo n.º 13
0
 private void OnTapStamp(int id, int index)
 {
     if (id == this.mPrevSelectId)
     {
         this.mPrevSelectId    = -1;
         this.mPrevSelectIndex = -1;
         FlowNode_Variable.Set("SELECT_STAMP_ID", id.ToString());
         FlowNode_GameObject.ActivateOutputLinks((Component)this, 0);
     }
     else
     {
         if (this.mPrevSelectId != -1 && this.mPrevSelectIndex != -1)
         {
             Transform transform = this.mStampObjects[this.mPrevSelectIndex].get_transform();
             if (Object.op_Inequality((Object)transform, (Object)null))
             {
                 transform.set_localScale(new Vector3(0.7f, 0.7f, 0.7f));
             }
         }
         this.mPrevSelectId    = id;
         this.mPrevSelectIndex = index;
         Transform transform1 = this.mStampObjects[index].get_transform();
         if (!Object.op_Inequality((Object)transform1, (Object)null))
         {
             return;
         }
         transform1.set_localScale(new Vector3(1f, 1f, 1f));
     }
 }
Exemplo n.º 14
0
 private void AnimateExp(float dt)
 {
   if (this.mOnCalcExp == null || this.mOnCalcLevel == null)
     return;
   float num1 = Mathf.Lerp(this.mExpStart, this.mExpEnd, this.mExpAnimTime / this.ExpAnimLength);
   this.mExpAnimTime += dt;
   bool flag1 = (double) this.mExpAnimTime >= (double) this.ExpAnimLength;
   float exp = !flag1 ? Mathf.Lerp(this.mExpStart, this.mExpEnd, Mathf.Clamp01(this.mExpAnimTime / this.ExpAnimLength)) : this.mExpEnd;
   int num2 = Mathf.FloorToInt(num1);
   int num3 = Mathf.FloorToInt(exp);
   int levelOld = Mathf.Min(this.mOnCalcLevel(num2), this.mLevelCap);
   int levelNew = Mathf.Min(this.mOnCalcLevel(num3), this.mLevelCap);
   bool flag2 = levelOld != levelNew;
   this.mCurrentExp = Mathf.FloorToInt(exp);
   this.SetValues(exp);
   if (flag2)
   {
     this.OnLevelChange(levelOld, levelNew);
     if (levelOld < levelNew)
       FlowNode_GameObject.ActivateOutputLinks((Component) this, 100);
   }
   if (!flag1)
     return;
   ((Behaviour) this).set_enabled(false);
   this.mExpStart = this.mExpEnd = (float) this.mCurrentExp;
   this.OnFinish();
 }
Exemplo n.º 15
0
 protected override void Start()
 {
     base.Start();
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ItemTemplate, (UnityEngine.Object)null) && this.ItemTemplate.get_gameObject().get_activeInHierarchy())
     {
         this.ItemTemplate.SetActive(false);
     }
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.SpecialQuestItem, (UnityEngine.Object)null) && this.SpecialQuestItem.get_gameObject().get_activeInHierarchy())
     {
         this.SpecialQuestItem.SetActive(false);
     }
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ExtraQuestItem, (UnityEngine.Object)null) && this.ExtraQuestItem.get_gameObject().get_activeInHierarchy())
     {
         this.ExtraQuestItem.SetActive(false);
     }
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.DetailTemplate, (UnityEngine.Object)null) && this.DetailTemplate.get_gameObject().get_activeInHierarchy())
     {
         this.DetailTemplate.SetActive(false);
     }
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ScenarioQuestItem, (UnityEngine.Object)null) && this.ScenarioQuestItem.get_gameObject().get_activeInHierarchy())
     {
         this.ScenarioQuestItem.SetActive(false);
     }
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.EliteQuestItem, (UnityEngine.Object)null) && this.EliteQuestItem.get_gameObject().get_activeInHierarchy())
     {
         this.EliteQuestItem.SetActive(false);
     }
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.EliteQuestDisAbleItem, (UnityEngine.Object)null) && this.EliteQuestDisAbleItem.get_gameObject().get_activeInHierarchy())
     {
         this.EliteQuestDisAbleItem.SetActive(false);
     }
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.StoryExtraQuestItem, (UnityEngine.Object)null) && this.StoryExtraQuestItem.get_gameObject().get_activeInHierarchy())
     {
         this.StoryExtraQuestItem.SetActive(false);
     }
     if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.StoryExtraQuestDisableItem, (UnityEngine.Object)null) && this.StoryExtraQuestDisableItem.get_gameObject().get_activeInHierarchy())
     {
         this.StoryExtraQuestDisableItem.SetActive(false);
     }
     if (this.RefreshOnStart)
     {
         this.RefreshQuests();
         this.RefreshItems();
         GlobalVars.QuestDifficulty = QuestDifficulties.Normal;
         ChapterParam mCurrentChapter = this.mCurrentChapter;
         if (mCurrentChapter != null && mCurrentChapter.IsKeyQuest() && !mCurrentChapter.IsKeyUnlock(Network.GetServerTime()))
         {
             if (mCurrentChapter.CheckHasKeyItem())
             {
                 GlobalVars.KeyQuestTimeOver = true;
                 FlowNode_GameObject.ActivateOutputLinks((Component)this, 102);
             }
             else
             {
                 UIUtility.SystemMessage(LocalizedText.Get("sys.KEYQUEST_UNLOCK"), LocalizedText.Get("sys.KEYQUEST_AVAILABLE_CAUTION"), new UIUtility.DialogResultEvent(this.OnCloseKeyQuest), (GameObject)null, true, -1);
             }
         }
     }
     MonoSingleton <GameManager> .Instance.OnPlayerLvChange += new GameManager.PlayerLvChangeEvent(this.RefreshItems);
 }
Exemplo n.º 16
0
        public void Activated(int pinID)
        {
            switch (pinID)
            {
            case 1:
                this.mSettings.rareFilters = this.mRareFiltters.ToArray();
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 100);
                break;

            case 2:
                if (this.mToggles == null)
                {
                    break;
                }
                foreach (Toggle mToggle in this.mToggles)
                {
                    mToggle.set_isOn(true);
                }
                break;

            case 3:
                if (this.mToggles == null)
                {
                    break;
                }
                foreach (Toggle mToggle in this.mToggles)
                {
                    mToggle.set_isOn(false);
                }
                break;
            }
        }
Exemplo n.º 17
0
        public void Activated(int pinID)
        {
            bool flag = false;

            switch (pinID)
            {
            case 0:
                flag = this.Refresh(QuestDifficulties.Normal);
                break;

            case 1:
                flag = this.Refresh(QuestDifficulties.Elite);
                break;

            case 2:
                flag = this.Refresh(QuestDifficulties.Extra);
                break;

            case 10:
                flag = this.Refresh(this.PlayingDifficultiy());
                break;
            }
            if (flag)
            {
                return;
            }
            FlowNode_GameObject.ActivateOutputLinks((Component)this, 104);
        }
Exemplo n.º 18
0
        protected override void OnItemSelect(GameObject go)
        {
            CharacterQuestData dataOfClass = DataSource.FindDataOfClass <CharacterQuestData>(go, (CharacterQuestData)null);

            if (dataOfClass == null)
            {
                return;
            }
            if (dataOfClass.questType == CharacterQuestData.EType.Chara)
            {
                if (!dataOfClass.HasUnit || dataOfClass.IsLock)
                {
                    return;
                }
                GlobalVars.SelectedUnitUniqueID.Set(dataOfClass.unitData1.UniqueID);
                GlobalVars.PreBattleUnitUniqueID.Set(dataOfClass.unitData1.UniqueID);
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 11);
            }
            else
            {
                if (!dataOfClass.HasPairUnit || dataOfClass.IsLock)
                {
                    return;
                }
                GlobalVars.SelectedCollaboSkillPair = dataOfClass.GetPairUnit();
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 12);
            }
        }
Exemplo n.º 19
0
        private void OnClick_RecoverButton()
        {
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.mConfirmBox, (UnityEngine.Object)null))
            {
                return;
            }
            int cost = MonoSingleton <GameManager> .Instance.TowerResuponse.CalcRecoverCost();

            if (MonoSingleton <GameManager> .Instance.Player.Coin < cost)
            {
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 3);
            }
            else
            {
                this.SetCanvasGroupIntaractable(false);
                string text = LocalizedText.Get("sys.MSG_TOWER_RECOVER", new object[1]
                {
                    (object)cost
                });
                this.mConfirmBox = UIUtility.ConfirmBoxTitle(string.Empty, text, (UIUtility.DialogResultEvent)(go =>
                {
                    ((Selectable)this.RecoverButton).set_interactable(false);
                    this.mConfirmBox = (GameObject)null;
                    cost             = MonoSingleton <GameManager> .Instance.TowerResuponse.CalcRecoverCost();
                    DataSource.Bind <TowerRecoverData>(((Component)this).get_gameObject(), new TowerRecoverData(GlobalVars.SelectedTowerID, cost));
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 2);
                    this.SetCanvasGroupIntaractable(true);
                }), (UIUtility.DialogResultEvent)(go =>
                {
                    this.mConfirmBox = (GameObject)null;
                    this.SetCanvasGroupIntaractable(true);
                }), (GameObject)null, true, -1, (string)null, (string)null);
            }
        }
Exemplo n.º 20
0
 public void UnitSelect(long uniqueID)
 {
     DataSource.Bind <UnitData>(this.Parent, MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueID(uniqueID));
     this.SelectedUniqueId = uniqueID;
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 1);
     GameParameter.UpdateAll(this.Parent);
 }
Exemplo n.º 21
0
        private void OnClick_Reset()
        {
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.mConfirmBox, (UnityEngine.Object)null))
            {
                return;
            }
            int resetCost = (int)MonoSingleton <GameManager> .Instance.TowerResuponse.reset_cost;

            if (MonoSingleton <GameManager> .Instance.Player.Coin < resetCost)
            {
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 5);
            }
            else
            {
                this.SetCanvasGroupIntaractable(false);
                this.mConfirmBox = UIUtility.ConfirmBox(LocalizedText.Get("sys.TOWER_RESET_CHECK", new object[1]
                {
                    (object)resetCost
                }), (UIUtility.DialogResultEvent)(go =>
                {
                    ((Selectable)this.RecoverButton).set_interactable(false);
                    ((Selectable)this.ResetButton).set_interactable(false);
                    this.mConfirmBox = (GameObject)null;
                    this.UpdateMissionProgressRequestState(MonoSingleton <GameManager> .Instance.FindFirstTowerFloor(GlobalVars.SelectedTowerID));
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 4);
                    this.SetCanvasGroupIntaractable(true);
                    this.is_reset = true;
                }), (UIUtility.DialogResultEvent)(go =>
                {
                    this.mConfirmBox = (GameObject)null;
                    this.SetCanvasGroupIntaractable(true);
                }), (GameObject)null, true, -1, (string)null, (string)null);
            }
        }
Exemplo n.º 22
0
        private void OnQuestSelect(SRPG_Button button)
        {
            // ISSUE: object of a compiler-generated type is created
            // ISSUE: variable of a compiler-generated type
            UnitKakeraWindow.\u003COnQuestSelect\u003Ec__AnonStorey39C selectCAnonStorey39C = new UnitKakeraWindow.\u003COnQuestSelect\u003Ec__AnonStorey39C();
            int index = this.mGainedQuests.IndexOf(((Component)button).get_gameObject());

            // ISSUE: reference to a compiler-generated field
            selectCAnonStorey39C.quest = DataSource.FindDataOfClass <QuestParam>(this.mGainedQuests[index], (QuestParam)null);
            // ISSUE: reference to a compiler-generated field
            if (selectCAnonStorey39C.quest == null)
            {
                return;
            }
            // ISSUE: reference to a compiler-generated field
            if (!selectCAnonStorey39C.quest.IsDateUnlock(-1L))
            {
                UIUtility.NegativeSystemMessage((string)null, LocalizedText.Get("sys.DISABLE_QUEST_DATE_UNLOCK"), (UIUtility.DialogResultEvent)null, (GameObject)null, false, -1);
            }
            else
            {
                // ISSUE: reference to a compiler-generated method
                if (Array.Find <QuestParam>(MonoSingleton <GameManager> .Instance.Player.AvailableQuests, new Predicate <QuestParam>(selectCAnonStorey39C.\u003C\u003Em__461)) == null)
                {
                    UIUtility.NegativeSystemMessage((string)null, LocalizedText.Get("sys.DISABLE_QUEST_CHALLENGE"), (UIUtility.DialogResultEvent)null, (GameObject)null, false, -1);
                }
                else
                {
                    // ISSUE: reference to a compiler-generated field
                    GlobalVars.SelectedQuestID = selectCAnonStorey39C.quest.iname;
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 100);
                }
            }
        }
        public void Activated(int pinID)
        {
            switch (pinID)
            {
            case 0:
                ConceptCardManager instance = ConceptCardManager.Instance;
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)instance, (UnityEngine.Object)null) && instance.IsEnhanceListActive)
                {
                    instance.ToggleSameSelectCard = false;
                }
                this.Save();
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 10);
                break;

            case 1:
                this.OnSelectAll(true);
                break;

            case 2:
                this.OnSelectAll(false);
                break;

            case 3:
                this.ResetType();
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 11);
                break;
            }
        }
Exemplo n.º 24
0
        private void OnEquipClick(SRPG_Button button)
        {
            if (!((Selectable)button).IsInteractable())
            {
                return;
            }
            if (this.OnEquip != null)
            {
                this.OnEquip();
            }
            else
            {
                UnitData unitDataByUniqueId = MonoSingleton <GameManager> .Instance.Player.FindUnitDataByUniqueID((long)GlobalVars.SelectedUnitUniqueID);

                if (unitDataByUniqueId == null)
                {
                    return;
                }
                int selectedEquipmentSlot = (int)GlobalVars.SelectedEquipmentSlot;
                if (!MonoSingleton <GameManager> .Instance.Player.SetUnitEquipment(unitDataByUniqueId, selectedEquipmentSlot))
                {
                    return;
                }
                GameParameter.UpdateAll(((Component)this).get_gameObject());
                int      selectedJobIndex    = this.GetSelectedJobIndex(unitDataByUniqueId);
                ItemData itemDataByItemParam = MonoSingleton <GameManager> .Instance.Player.FindItemDataByItemParam(unitDataByUniqueId.GetRankupEquipData(selectedJobIndex, selectedEquipmentSlot).ItemParam);

                GlobalVars.SelectedEquipUniqueID.Set(itemDataByItemParam.UniqueID);
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 100);
            }
        }
Exemplo n.º 25
0
        private void OnUnitSelect(SRPG_Button button)
        {
            if (!((Selectable)button).get_interactable() || this.mSelectQuestFlag)
            {
                return;
            }
            QuestBookmarkWindow.ItemAndQuests dataOfClass1 = DataSource.FindDataOfClass <QuestBookmarkWindow.ItemAndQuests>(((Component)button).get_gameObject(), (QuestBookmarkWindow.ItemAndQuests)null);
            long currentTime = Network.GetServerTime();

            QuestParam[] availableQuests = MonoSingleton <GameManager> .Instance.Player.AvailableQuests;
            QuestParam[] questParamArray = !(this.mLastSectionName == this.BookmarkSectionName) ? dataOfClass1.quests.Where <QuestParam>((Func <QuestParam, bool>)(q => q.world == this.mLastSectionName)).ToArray <QuestParam>() : QuestDropParam.Instance.GetItemDropQuestList(MonoSingleton <GameManager> .Instance.MasterParam.GetItemParam(dataOfClass1.itemName), GlobalVars.GetDropTableGeneratedDateTime()).Where <QuestParam>((Func <QuestParam, bool>)(q => ((IEnumerable <string>) this.mAvailableSections).Contains <string>(q.world))).ToArray <QuestParam>();
            if (questParamArray.Length <= 0)
            {
                return;
            }
            List <QuestParam> questParamList = new List <QuestParam>();

            foreach (QuestParam questParam1 in questParamArray)
            {
                foreach (QuestParam questParam2 in ((IEnumerable <QuestParam>)availableQuests).Where <QuestParam>((Func <QuestParam, bool>)(q => this.IsAvailableQuest(q, currentTime))))
                {
                    if (questParam1.iname == questParam2.iname)
                    {
                        questParamList.Add(questParam1);
                    }
                }
            }
            if (questParamList.Count <= 0)
            {
                QuestParam questParam = questParamArray[0];
                UIUtility.SystemMessage((string)null, LocalizedText.Get("sys.TXT_QUESTBOOKMARK_BOOKMARK_NOT_AVAIABLE_QUEST", (object)questParam.title, (object)questParam.name), (UIUtility.DialogResultEvent)null, (GameObject)null, true, -1);
            }
            else if (this.mIsBookmarkEditing)
            {
                this.OnUnitSelectBookmark(dataOfClass1, (BookmarkUnit)((Component)button).GetComponent <BookmarkUnit>());
            }
            else if (questParamArray.Length > 1)
            {
                if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.QuestSelectorTemplate, (UnityEngine.Object)null))
                {
                    return;
                }
                GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.QuestSelectorTemplate);
                gameObject.get_transform().SetParent(((Component)this).get_transform().get_parent(), false);
                QuestBookmarkKakeraWindow component = (QuestBookmarkKakeraWindow)gameObject.GetComponent <QuestBookmarkKakeraWindow>();
                if (!UnityEngine.Object.op_Inequality((UnityEngine.Object)component, (UnityEngine.Object)null))
                {
                    return;
                }
                UnitParam dataOfClass2 = DataSource.FindDataOfClass <UnitParam>(((Component)button).get_gameObject(), (UnitParam)null);
                component.Refresh(dataOfClass2, (IEnumerable <QuestParam>)questParamArray);
            }
            else
            {
                this.mSelectQuestFlag      = true;
                GlobalVars.SelectedQuestID = questParamArray[0].iname;
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 100);
            }
        }
Exemplo n.º 26
0
 private void OnMoveScene()
 {
     if (Object.op_Inequality((Object)this.CheckToggle, (Object)null) && this.CheckToggle.get_isOn())
     {
         GameUtility.setLoginInfoRead(TimeManager.FromUnixTime(TimeManager.Now()).ToString("yyyy/MM/dd"));
     }
     FlowNode_GameObject.ActivateOutputLinks((Component)this, (int)this.mSelectScene);
 }
 private void OnDecide()
 {
     if (this.OnDecideEvent != null)
     {
         this.OnDecideEvent();
     }
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 0);
 }
Exemplo n.º 28
0
 private void OnCancel()
 {
     for (int index = 0; index < this.mToggleBkupValues.Length; ++index)
     {
         GameUtility.SetUnitShowSetting(index, this.mToggleBkupValues[index]);
     }
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 102);
 }
Exemplo n.º 29
0
 private void Decide()
 {
     if (this.OnDecide != null)
     {
         this.OnDecide((int)this.SelectSlider.get_value());
     }
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 1);
 }
Exemplo n.º 30
0
 private void Cancel()
 {
     if (this.OnCancel != null)
     {
         this.OnCancel();
     }
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 1);
 }