public override void OnActivate(int pinID)
        {
            if (pinID != 1)
            {
                return;
            }
            if (Object.op_Equality((Object)this.target, (Object)null))
            {
                this.target = ((Component)this).get_gameObject();
            }
            switch (this.type)
            {
            case FlowNode_SetRewardParam.Type.Item:
                GlobalVars.SelectedItemID = DataSource.FindDataOfClass <ItemParam>(this.target, (ItemParam)null).iname;
                break;

            case FlowNode_SetRewardParam.Type.Artifact:
                GlobalVars.SelectedArtifactID = DataSource.FindDataOfClass <ArtifactParam>(this.target, (ArtifactParam)null).iname;
                break;

            case FlowNode_SetRewardParam.Type.Award:
                FlowNode_Variable.Set("CONFIRM_SELECT_AWARD", DataSource.FindDataOfClass <AwardParam>(this.target, (AwardParam)null).iname);
                break;
            }
            this.ActivateOutputLinks(9);
        }
Exemple #2
0
        private void Initialize()
        {
            this.AddClickListener(this.RecoverButton, new Action(this.OnClick_RecoverButton));
            this.AddClickListener(this.DetailButton, new Action(this.OnClick_Detail));
            this.AddClickListener(this.ChallengeButton, new Action(this.OnClick_Challenge));
            this.AddClickListener(this.CurrentButton, new Action(this.OnClick_Current));
            this.AddClickListener(this.ResetButton, new Action(this.OnClick_Reset));
            // ISSUE: method pointer
            this.mScrollAutoFit.OnScrollBegin.AddListener(new UnityAction((object)this, __methodptr(OnScrollBegin)));
            this.mTowerParam = MonoSingleton <GameManager> .Instance.FindTower(GlobalVars.SelectedTowerID);

            this.mRecoverTime = MonoSingleton <GameManager> .Instance.TowerResuponse.rtime;
            if (this.mTowerParam != null && Object.op_Inequality((Object)this.RankingButton, (Object)null))
            {
                this.RankingButton.SetActive(this.mTowerParam.is_view_ranking);
            }
            if (this.mTowerParam != null && Object.op_Inequality((Object)this.StatusButton, (Object)null))
            {
                this.StatusButton.SetActive(this.mTowerParam.is_view_ranking);
            }
            if (this.mTowerParam != null && !string.IsNullOrEmpty(this.mTowerParam.eventURL))
            {
                FlowNode_Variable.Set("CAPTION_TOWER_EVENT_DETAIL", this.mTowerParam.eventURL);
            }
            this.initialized = true;
            if (!this.is_reset)
            {
                return;
            }
            this.mTowerQuestList.ScrollToCurrentFloor(MonoSingleton <GameManager> .Instance.FindFirstTowerFloor(GlobalVars.SelectedTowerID));
            this.RefreshUI();
            this.mTowerQuestInfo.Refresh();
            this.is_reset = false;
            this.StartCoroutine(this.CheckLoadIcon());
        }
        private void Refresh()
        {
            this.Reset();
            for (int index = 0; index < GachaResultData.drops.Length; ++index)
            {
                if (GachaResultData.drops[index].type == GachaDropData.Type.Unit)
                {
                    MonoSingleton <GameManager> .Instance.Player.UpdateUnitTrophyStates(false);

                    break;
                }
            }
            FlowNode_Variable.Set("GachaResultSingle", "0");
            if (GachaResultData.drops.Length == 1 && GachaResultData.drops[0].type == GachaDropData.Type.Unit)
            {
                if (!string.IsNullOrEmpty(FlowNode_Variable.Get("GachaResultCurrentDetail")))
                {
                    FlowNode_Variable.Set("GachaResultCurrentDetail", string.Empty);
                    FlowNode_TriggerLocalEvent.TriggerLocalEvent((Component)this, "CLOSED_RESULT_SINGLE");
                }
                else
                {
                    FlowNode_Variable.Set("GachaResultSingle", "1");
                    this.OnSelectIcon(0, GachaResultThumbnailWindow.GachaResultType.Unit);
                }
            }
            else
            {
                this.RefreshThumbnail();
            }
        }
Exemple #4
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));
     }
 }
Exemple #5
0
        private void OnSelectIcon(int index, GachaResultThumbnailWindow.GachaResultType type)
        {
            FlowNode_Variable.Set("GachaResultDataIndex", index.ToString());
            FlowNode_Variable.Set("GachaResultCurrentDetail", type.ToString());
            int pinID = 0;

            switch (type)
            {
            case GachaResultThumbnailWindow.GachaResultType.Unit:
                pinID = !this.CheckSingleDropForUnit() ? this.OUT_UNITDETAIL : this.OUT_UNITDETAIL_SINGLE;
                break;

            case GachaResultThumbnailWindow.GachaResultType.Item:
                pinID = this.OUT_ITEM_DETAIL;
                break;

            case GachaResultThumbnailWindow.GachaResultType.Piece:
                pinID = this.OUT_PIECE_DETAIL;
                break;

            case GachaResultThumbnailWindow.GachaResultType.Artifact:
                pinID = this.OUT_ARTIFACT_DETAIL;
                break;
            }
            FlowNode_GameObject.ActivateOutputLinks((Component)this, pinID);
        }
Exemple #6
0
        public override void OnActivate(int pinID)
        {
            this.mSuccessPinID = 1;
            if (pinID != 0)
            {
                return;
            }
            List <AbilityData> learningAbilities = GlobalVars.LearningAbilities;

            if (learningAbilities != null && learningAbilities.Count > 0)
            {
                FlowNode_Variable.Set("LEARNING_ABILITY", "1");
            }
            if (GlobalVars.ReturnItems != null && GlobalVars.ReturnItems.Count > 0)
            {
                FlowNode_Variable.Set("RETURN_ITEMS", "1");
            }
            if (Network.Mode == Network.EConnectMode.Offline)
            {
                this.Success();
            }
            else
            {
                this.ExecRequest((WebAPI) new ReqJobRankup((long)GlobalVars.SelectedJobUniqueID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                ((Behaviour)this).set_enabled(true);
            }
        }
 public void Activated(int pinID)
 {
     if (pinID != 0)
     {
         return;
     }
     FlowNode_Variable.Set("SelectChannelPage", string.Empty);
     this.Refresh();
 }
 public void Activated(int pinID)
 {
     if (pinID == this.IN_REFRESH || pinID != this.IN_BACKTO_UNITDETAIL || (GachaResultData.drops.Length != 1 || GachaResultData.drops[0].type != GachaDropData.Type.Unit))
     {
         return;
     }
     FlowNode_Variable.Set("GachaResultCurrentDetail", string.Empty);
     FlowNode_GameObject.ActivateOutputLinks((Component)this, this.OUT_BACK_GACHATOP);
 }
 private void SetUp()
 {
     if (GachaResultData.drops == null)
     {
         return;
     }
     FlowNode_Variable.Set("GachaResultCurrentDetail", string.Empty);
     FlowNode_Variable.Set("GachaResultSingle", "0");
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 10);
 }
Exemple #10
0
        private void OnClickDetail()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append(Network.SiteHost);
            stringBuilder.Append(this.PVP_URL);
            FlowNode_Variable.Set("SHARED_WEBWINDOW_TITLE", LocalizedText.Get("sys.MULTI_VERSUS_TOWER_DETAIL"));
            FlowNode_Variable.Set("SHARED_WEBWINDOW_URL", stringBuilder.ToString());
            FlowNode_GameObject.ActivateOutputLinks((Component)this, 20);
        }
Exemple #11
0
 private void OnSelectItems(string uid)
 {
     if (string.IsNullOrEmpty(uid))
     {
         return;
     }
     FlowNode_Variable.Set("SelectUserID", uid);
     FlowNode_Variable.Set("IsBlackList", "1");
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 10);
 }
        private void OnClickDetail()
        {
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append(Network.NewsHost);
            stringBuilder.Append(this.PVP_URL);
            FlowNode_Variable.Set("SHARED_WEBWINDOW_TITLE", LocalizedText.Get("sys.MULTI_VERSUS_TOWER_DETAIL"));
            FlowNode_Variable.Set("SHARED_WEBWINDOW_URL", stringBuilder.ToString());
            FlowNode_TriggerLocalEvent.TriggerLocalEvent((Component)this, "TOWERMATCH_DETAIL");
        }
Exemple #13
0
 private void Refresh()
 {
     FlowNode_Variable.Set("BLACKLIST_OFFSET", this.mCurrentPage.ToString());
     this.ResetBlackListItems();
     if (this.mBlackList == null || this.mBlackList.lists.Length <= 0)
     {
         if (Object.op_Inequality((Object)this.ItemEmpty, (Object)null))
         {
             this.ItemEmpty.SetActive(true);
         }
         this.Pager.set_text(LocalizedText.Get("sys.TEXT_PAGER_TEMP", (object)"0", (object)"0"));
         ((Selectable)this.Next).set_interactable(false);
         ((Selectable)this.Prev).set_interactable(false);
     }
     else
     {
         for (int index = 0; index < this.mBlackList.lists.Length; ++index)
         {
             // ISSUE: object of a compiler-generated type is created
             // ISSUE: variable of a compiler-generated type
             BlackList.\u003CRefresh\u003Ec__AnonStorey303 refreshCAnonStorey303 = new BlackList.\u003CRefresh\u003Ec__AnonStorey303();
             // ISSUE: reference to a compiler-generated field
             refreshCAnonStorey303.\u003C\u003Ef__this = this;
             GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.ItemTemplate);
             gameObject.get_transform().SetParent(this.ItemRoot, false);
             BlackListItem component1 = (BlackListItem)gameObject.GetComponent <BlackListItem>();
             // ISSUE: reference to a compiler-generated field
             refreshCAnonStorey303.param = this.mBlackList.lists[index];
             // ISSUE: reference to a compiler-generated field
             component1.Refresh(refreshCAnonStorey303.param);
             SRPG_Button component2 = (SRPG_Button)gameObject.GetComponent <SRPG_Button>();
             if (Object.op_Inequality((Object)component2, (Object)null))
             {
                 // ISSUE: method pointer
                 ((UnityEvent)component2.get_onClick()).AddListener(new UnityAction((object)refreshCAnonStorey303, __methodptr(\u003C\u003Em__312)));
             }
             gameObject.SetActive(true);
             this.mItems.Add(gameObject);
         }
         int num = this.mBlackList.total % this.LimitView != 0 ? this.mBlackList.total / this.LimitView + 1 : this.mBlackList.total / this.LimitView;
         if (Object.op_Inequality((Object)this.Pager, (Object)null))
         {
             this.Pager.set_text(LocalizedText.Get("sys.TEXT_PAGER_TEMP", (object)this.mCurrentPage, (object)num));
         }
         ((Selectable)this.Next).set_interactable(this.mCurrentPage + 1 <= num);
         ((Selectable)this.Prev).set_interactable(this.mCurrentPage - 1 > 0);
         if (!Object.op_Inequality((Object)this.ScrollView, (Object)null))
         {
             return;
         }
         this.ScrollView.SetScrollPos(0.0f);
     }
 }
Exemple #14
0
 private void OnSelected(string select = "")
 {
     if (!string.IsNullOrEmpty(select))
     {
         FlowNode_Variable.Set("CONFIRM_SELECT_AWARD", select);
         FlowNode_GameObject.ActivateOutputLinks((Component)this, 100);
     }
     else
     {
         FlowNode_Variable.Set("CONFIRM_SELECT_AWARD", select);
         FlowNode_GameObject.ActivateOutputLinks((Component)this, 102);
     }
 }
Exemple #15
0
        public void Activated(int pinID)
        {
            switch (pinID)
            {
            case 0:
                FlowNode_Variable.Set(this.VARIABLE_KEY, this.VARIABLE_VALUE_CHARA);
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 10);
                break;

            case 1:
            case 2:
                string a1 = FlowNode_Variable.Get(this.VARIABLE_KEY);
                if (string.IsNullOrEmpty(a1))
                {
                    FlowNode_Variable.Set(this.VARIABLE_KEY, this.VARIABLE_VALUE_CHARA);
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 10);
                    break;
                }
                if (string.Equals(a1, this.VARIABLE_VALUE_CHARA))
                {
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 12);
                    break;
                }
                if (!string.Equals(a1, this.VARIABLE_VALUE_COLLABO))
                {
                    break;
                }
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 13);
                break;

            case 3:
                string a2 = FlowNode_Variable.Get(this.VARIABLE_KEY);
                if (string.IsNullOrEmpty(a2))
                {
                    FlowNode_Variable.Set(this.VARIABLE_KEY, this.VARIABLE_VALUE_CHARA);
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 10);
                    break;
                }
                if (string.Equals(a2, this.VARIABLE_VALUE_CHARA))
                {
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 10);
                    break;
                }
                if (!string.Equals(a2, this.VARIABLE_VALUE_COLLABO))
                {
                    break;
                }
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 11);
                break;
            }
        }
        public override void OnActivate(int pinID)
        {
            if (pinID != 0)
            {
                return;
            }
            StringBuilder stringBuilder = new StringBuilder();

            stringBuilder.Append(Network.SiteHost);
            stringBuilder.Append("notice/detail/help/index");
            FlowNode_Variable.Set("SHARED_WEBWINDOW_TITLE", LocalizedText.Get("sys.CONFIG_BTN_HELP"));
            FlowNode_Variable.Set("SHARED_WEBWINDOW_URL", stringBuilder.ToString());
            this.ActivateOutputLinks(100);
        }
        private void OnUEWindowClosedByUser()
        {
            this.mUEMain.OnUserClose = (UnitEnhanceV3.CloseEvent)null;
            if (this.mUEMain.GetDirtyUnits().Length > 0)
            {
                this.mUEMain.ClearDirtyUnits();
            }
            UnitListRootWindow.TabRegister tabRegister = new UnitListRootWindow.TabRegister();
            if (this.mCurrentTab != UnitListRootWindow.Tab.NONE)
            {
                tabRegister.tab        = this.mCurrentTab;
                tabRegister.anchorePos = this.mCurrentTabAnchorePos;
                string s = FlowNode_Variable.Get("LAST_SELECTED_UNITID");
                if (!string.IsNullOrEmpty(s))
                {
                    long num = long.Parse(s);
                    if (num > 0L && this.mCurrentUnit != num)
                    {
                        tabRegister.forcus = num;
                    }
                    FlowNode_Variable.Set("LAST_SELECTED_UNITID", string.Empty);
                }
            }
            else
            {
                tabRegister.tab    = UnitListRootWindow.Tab.ALL;
                tabRegister.forcus = GlobalVars.SelectedUnitUniqueID.Get();
                string s = FlowNode_Variable.Get("LAST_SELECTED_UNITID");
                if (!string.IsNullOrEmpty(s))
                {
                    long num = long.Parse(s);
                    if (num > 0L)
                    {
                        tabRegister.forcus = num;
                    }
                    FlowNode_Variable.Set("LAST_SELECTED_UNITID", string.Empty);
                }
            }
            SerializeValueList serializeValueList = new SerializeValueList();

            serializeValueList.AddObject("data_register", (object)tabRegister);
            FlowNode_ButtonEvent.currentValue = (object)serializeValueList;
            if (Object.op_Equality((Object)this.mUnitListWindow, (Object)null))
            {
                this.CreateUnitList();
            }
            this.mUnitListWindow.Enabled(true);
            FlowNode_GameObject.ActivateOutputLinks((Component)this, 510);
        }
 public override void OnSuccess(WWWResult www)
 {
     if (Network.IsError)
     {
         this.OnRetry();
     }
     else
     {
         WebAPI.JSON_BodyResponse <FlowNode_ReqLoginPack.JSON_ReqLoginPackResponse> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <FlowNode_ReqLoginPack.JSON_ReqLoginPackResponse> >(www.text);
         if (jsonObject.body == null)
         {
             this.OnRetry();
         }
         else
         {
             GameManager instance = MonoSingleton <GameManager> .Instance;
             instance.Player.ResetQuestChallenges();
             instance.ResetJigenQuests(true);
             if (!instance.Deserialize(jsonObject.body.quests))
             {
                 this.OnFailed();
             }
             else
             {
                 if (instance.IsRelogin)
                 {
                     instance.Player.DeleteTrophies(jsonObject.body.trophyprogs);
                     instance.Player.DeleteTrophies(jsonObject.body.bingoprogs);
                 }
                 this.reflectTrophyProgs(jsonObject.body.trophyprogs);
                 this.reflectTrophyProgs(jsonObject.body.bingoprogs);
                 this.reflectLoginTrophyProgs();
                 if (jsonObject.body.channel != 0)
                 {
                     GlobalVars.CurrentChatChannel.Set(jsonObject.body.channel);
                 }
                 if (jsonObject.body.support != 0L)
                 {
                     GlobalVars.SelectedSupportUnitUniqueID.Set(jsonObject.body.support);
                 }
                 FlowNode_Variable.Set("SHOW_CHAPTER", "0");
                 Network.RemoveAPI();
                 instance.Player.OnLogin();
                 instance.IsRelogin = false;
                 this.Success();
             }
         }
     }
 }
Exemple #19
0
 public void OnClickMultiTowerRetry()
 {
     GlobalVars.CreateAutoMultiTower = true;
     UIUtility.ConfirmBoxTitle((string)null, LocalizedText.Get("sys.MULTI_TOWER_SAMEUSER"), (UIUtility.DialogResultEvent)(g =>
     {
         FlowNode_Variable.Set("MultiPlayPasscode", "1");
         GlobalVars.InvtationSameUser = true;
         FlowNode_TriggerLocalEvent.TriggerLocalEvent((Component)this, "FINISH_RESULT");
     }), (UIUtility.DialogResultEvent)(g =>
     {
         FlowNode_Variable.Set("MultiPlayPasscode", "0");
         GlobalVars.InvtationSameUser = false;
         FlowNode_TriggerLocalEvent.TriggerLocalEvent((Component)this, "FINISH_RESULT");
     }), (GameObject)null, false, -1, (string)null, (string)null);
 }
Exemple #20
0
 public override void OnActivate(int pinID)
 {
     if (pinID != 1)
     {
         return;
     }
     if (this.mCurrentPubInfo == null)
     {
         FlowNode_Variable.Set("LOGIN_NEWS_URL", Network.NewsHost);
     }
     else
     {
         FlowNode_Variable.Set("LOGIN_NEWS_URL", this.PageID);
         this.ActivateOutputLinks(2);
     }
 }
        public override void OnActivate(int pinID)
        {
            if (pinID != 0)
            {
                return;
            }
            TowerParam tower = MonoSingleton <GameManager> .Instance.FindTower(GlobalVars.SelectedTowerID);

            if (tower == null)
            {
                this.ActivateOutputLinks(2);
            }
            else
            {
                FlowNode_Variable.Set(this.Value, this.URL + tower.URL);
                this.ActivateOutputLinks(1);
            }
        }
Exemple #22
0
        private void Start()
        {
            if (Object.op_Inequality((Object)this.BtnPlus, (Object)null))
            {
                // ISSUE: method pointer
                ((UnityEvent)this.BtnPlus.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(OnAddNum)));
            }
            if (Object.op_Inequality((Object)this.BtnMinus, (Object)null))
            {
                // ISSUE: method pointer
                ((UnityEvent)this.BtnMinus.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(OnRemoveNum)));
            }
            if (Object.op_Inequality((Object)this.BtnMax, (Object)null))
            {
                // ISSUE: method pointer
                ((UnityEvent)this.BtnMax.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(OnMaxNum)));
            }
            string iname = FlowNode_Variable.Get("USE_TICKET_INAME");

            FlowNode_Variable.Set("USE_TICKET_INAME", string.Empty);
            if (string.IsNullOrEmpty(iname))
            {
                DebugUtility.LogError("不正なアイテムが指定されました");
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 103);
            }
            else
            {
                ItemData itemDataByItemId = MonoSingleton <GameManager> .Instance.Player.FindItemDataByItemID(iname);

                if (itemDataByItemId == null || itemDataByItemId.Num < 0)
                {
                    DebugUtility.LogError("所持していないアイテムが指定されました");
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 104);
                }
                else
                {
                    if (Object.op_Equality((Object)this.gacham, (Object)null))
                    {
                        this.gacham = MonoSingleton <GachaManager> .Instance;
                    }
                    this.Refresh(itemDataByItemId);
                }
            }
        }
        public override void OnActivate(int pinID)
        {
            if (pinID != 0)
            {
                return;
            }
            PlayerData  player             = MonoSingleton <GameManager> .Instance.Player;
            UnitData    unitDataByUniqueId = player.FindUnitDataByUniqueID((long)GlobalVars.SelectedUnitUniqueID);
            AbilityData abilityData        = unitDataByUniqueId.GetAbilityData((long)GlobalVars.SelectedAbilityUniqueID);

            if (abilityData.Rank >= abilityData.GetRankCap())
            {
                ((Behaviour)this).set_enabled(false);
                this.ActivateOutputLinks(2);
            }
            if (player.AbilityRankUpCountNum == 0)
            {
                ((Behaviour)this).set_enabled(false);
                this.ActivateOutputLinks(3);
            }
            player.RankUpAbility(abilityData);
            Dictionary <long, int> abilitiesRankUp = GlobalVars.AbilitiesRankUp;

            if (!abilitiesRankUp.ContainsKey(abilityData.UniqueID))
            {
                abilitiesRankUp[abilityData.UniqueID] = 0;
            }
            Dictionary <long, int> dictionary;
            long uniqueId;

            (dictionary = abilitiesRankUp)[uniqueId = abilityData.UniqueID] = dictionary[uniqueId] + 1;
            MonoSingleton <GameManager> .Instance.Player.OnAbilityPowerUp(unitDataByUniqueId.UnitID, abilityData.AbilityID, abilityData.Rank, false);

            List <string> learningSkillList = abilityData.GetLearningSkillList(abilityData.Rank);

            if (learningSkillList != null && learningSkillList.Count > 0)
            {
                FlowNode_Variable.Set("LEARNING_SKILL", "1");
            }
            ((Behaviour)this).set_enabled(false);
            this.ActivateOutputLinks(1);
        }
Exemple #24
0
        private void OnClickHelp()
        {
            TrophyParam dataOfClass = DataSource.FindDataOfClass <TrophyParam>(((Component)this).get_gameObject(), (TrophyParam)null);

            if (dataOfClass == null)
            {
                return;
            }
            if (dataOfClass.help == 0)
            {
                string str = LocalizedText.Get("sys.CHALLENGE_HELP_" + dataOfClass.Objectives[0].type.ToString().ToUpper());
                FlowNode_Variable.Set(HelpWindow.VAR_NAME_MENU_ID, str);
            }
            else
            {
                FlowNode_Variable.Set(HelpWindow.VAR_NAME_MENU_ID, dataOfClass.help.ToString());
            }
            FlowNode_GameObject.ActivateOutputLinks((Component)this, 11);
            this.mShowingOverlay = true;
        }
 public void Refresh(ItemData data)
 {
     this.mMaxNum = Mathf.Min(data.Num, 10);
     if (!string.IsNullOrEmpty(FlowNode_Variable.Get("USE_TICKET_MAX")))
     {
         this.mMaxNum = 1;
     }
     FlowNode_Variable.Set("USE_TICKET_MAX", string.Empty);
     if (Object.op_Inequality((Object)this.WindowTitle, (Object)null))
     {
         this.WindowTitle.set_text(LocalizedText.Get("sys.GACHA_TICKET_SELECT_TITLE", new object[1]
         {
             (object)data.Param.name
         }));
     }
     if (Object.op_Inequality((Object)this.AmountTicket, (Object)null))
     {
         DataSource.Bind <ItemData>(this.AmountTicket, data);
         GameParameter.UpdateAll(this.AmountTicket);
     }
     if (Object.op_Inequality((Object)this.TicketNumSlider, (Object)null))
     {
         ((UnityEventBase)this.TicketNumSlider.get_onValueChanged()).RemoveAllListeners();
         this.TicketNumSlider.set_minValue(1f);
         this.TicketNumSlider.set_maxValue((float)this.mMaxNum);
         // ISSUE: method pointer
         ((UnityEvent <float>) this.TicketNumSlider.get_onValueChanged()).AddListener(new UnityAction <float>((object)this, __methodptr(OnUseNumChanged)));
         this.TicketNumSlider.set_value(this.TicketNumSlider.get_minValue());
     }
     if (Object.op_Inequality((Object)this.BtnPlus, (Object)null))
     {
         ((Selectable)this.BtnPlus).set_interactable((double)this.TicketNumSlider.get_value() + 1.0 <= (double)this.TicketNumSlider.get_maxValue());
     }
     if (Object.op_Inequality((Object)this.BtnMinus, (Object)null))
     {
         ((Selectable)this.BtnMinus).set_interactable((double)this.TicketNumSlider.get_value() - 1.0 >= (double)this.TicketNumSlider.get_minValue());
     }
     this.UsedNum.text        = this.TicketNumSlider.get_value().ToString();
     this.gacham.UseTicketNum = (int)this.TicketNumSlider.get_value();
 }
 public override void OnSuccess(WWWResult www)
 {
     if (Network.IsError)
     {
         if (Network.ErrCode == Network.EErrCode.SendChatInterval)
         {
             Network.IsIndicator = true;
             FlowNode_Variable.Set("MESSAGE_CAUTION_SEND_MESSAGE", Network.ErrMsg);
             Network.RemoveAPI();
             Network.ResetError();
             this.Interval();
         }
         else
         {
             Network.IsIndicator = true;
             Network.RemoveAPI();
             Network.ResetError();
         }
     }
     else
     {
         FlowNode_Variable.Set("MESSAGE_CAUTION_SEND_MESSAGE", string.Empty);
         WebAPI.JSON_BodyResponse <JSON_ChatSendRes> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <JSON_ChatSendRes> >(www.text);
         DebugUtility.Assert(jsonObject != null, "res == null");
         Network.RemoveAPI();
         Network.IsIndicator = true;
         if (jsonObject.body != null)
         {
             ChatSendRes chatSendRes = new ChatSendRes();
             chatSendRes.Deserialize(jsonObject.body);
             if (chatSendRes.IsSuccess)
             {
                 this.Success();
                 return;
             }
         }
         this.Failure();
     }
 }
Exemple #27
0
 public override void OnActivate(int pinID)
 {
     if (pinID != 0)
     {
         return;
     }
     if (!string.IsNullOrEmpty(this.QuestID) && (!this.CheckLastPlayed ? GlobalVars.SelectedQuestID : GlobalVars.LastPlayedQuest.Get()) != this.QuestID)
     {
         this.OnNo((GameObject)null);
     }
     else
     {
         string str = (string)null;
         if (!string.IsNullOrEmpty(this.LocalFlag))
         {
             str = FlowNode_Variable.Get(this.LocalFlag);
         }
         if (this.CheckCondition() && string.IsNullOrEmpty(str))
         {
             if (!string.IsNullOrEmpty(this.LocalFlag))
             {
                 FlowNode_Variable.Set(this.LocalFlag, "1");
             }
             if (!string.IsNullOrEmpty(this.ConfirmText))
             {
                 this.ActivateOutputLinks(3);
                 UIUtility.ConfirmBox(LocalizedText.Get(this.ConfirmText), new UIUtility.DialogResultEvent(this.OnYes), new UIUtility.DialogResultEvent(this.OnNo), (GameObject)null, true, -1, (string)null, (string)null);
             }
             else
             {
                 this.OnYes((GameObject)null);
             }
         }
         else
         {
             this.OnNo((GameObject)null);
         }
     }
 }
Exemple #28
0
        private void Start()
        {
            if (Object.op_Inequality((Object)this.BackButton, (Object)null))
            {
                // ISSUE: method pointer
                ((UnityEvent)this.BackButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(OnCloseMain)));
                ((Text)((Component)((Component)this.BackButton).get_transform().FindChild("Text")).GetComponent <LText>()).set_text(LocalizedText.Get("help.BACK_BUTTON"));
            }
            if (Object.op_Inequality((Object)this.MiddleBackButton, (Object)null))
            {
                // ISSUE: method pointer
                ((UnityEvent)this.MiddleBackButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(OnBackList)));
                ((Text)((Component)((Component)this.MiddleBackButton).get_transform().FindChild("Text")).GetComponent <LText>()).set_text(LocalizedText.Get("help.BACK_BUTTON"));
            }
            string s1 = LocalizedText.Get("help.MENU_NUM");

            if (string.IsNullOrEmpty(s1))
            {
                return;
            }
            this.mHelpMenuButtons = new GameObject[int.Parse(s1)];
            if (!this.ReferenceFlowVariable)
            {
                return;
            }
            string s2 = FlowNode_Variable.Get(HelpWindow.VAR_NAME_MENU_ID);

            if (string.IsNullOrEmpty(s2))
            {
                return;
            }
            int result;

            if (int.TryParse(s2, out result))
            {
                this.CreateMainWindow(result - 1);
            }
            FlowNode_Variable.Set(HelpWindow.VAR_NAME_MENU_ID, string.Empty);
        }
        private void OnSelectIcon(int index, GachaResultThumbnailWindow.GachaResultType type)
        {
            FlowNode_Variable.Set("GachaResultDataIndex", index.ToString());
            FlowNode_Variable.Set("GachaResultCurrentDetail", type.ToString());
            switch (type)
            {
            case GachaResultThumbnailWindow.GachaResultType.Unit:
                FlowNode_GameObject.ActivateOutputLinks((Component)this, this.OUT_UNIT_DETAIL);
                break;

            case GachaResultThumbnailWindow.GachaResultType.Item:
                FlowNode_GameObject.ActivateOutputLinks((Component)this, this.OUT_ITEM_DETAIL);
                break;

            case GachaResultThumbnailWindow.GachaResultType.Piece:
                FlowNode_GameObject.ActivateOutputLinks((Component)this, this.OUT_PIECE_DETAIL);
                break;

            case GachaResultThumbnailWindow.GachaResultType.Artifact:
                FlowNode_GameObject.ActivateOutputLinks((Component)this, this.OUT_ARTIFACT_DETAIL);
                break;
            }
        }
        private void Start()
        {
            string iname = FlowNode_Variable.Get("USE_TICKET_INAME");

            FlowNode_Variable.Set("USE_TICKET_INAME", string.Empty);
            if (string.IsNullOrEmpty(iname))
            {
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 103);
            }
            else
            {
                GameManager instance = MonoSingleton <GameManager> .Instance;
                if (instance.Player.GetItemAmount(iname) <= 0)
                {
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 104);
                }
                else
                {
                    this.mCurrentItemData = instance.Player.FindItemDataByItemID(iname);
                    if (Object.op_Inequality((Object)this.BtnPlus, (Object)null))
                    {
                        // ISSUE: method pointer
                        ((UnityEvent)this.BtnPlus.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(OnAddNum)));
                    }
                    if (Object.op_Inequality((Object)this.BtnMinus, (Object)null))
                    {
                        // ISSUE: method pointer
                        ((UnityEvent)this.BtnMinus.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(OnRemoveNum)));
                    }
                    if (Object.op_Equality((Object)this.gacham, (Object)null))
                    {
                        this.gacham = MonoSingleton <GachaManager> .Instance;
                    }
                    this.Refresh();
                }
            }
        }