Exemple #1
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);
            }
        }
Exemple #2
0
    private void Start()
    {
        if (Object.op_Inequality((Object)this.TextTemplate, (Object)null))
        {
            this.TextTemplate.SetActive(false);
        }
        if (Object.op_Inequality((Object)this.ImageTemplate, (Object)null))
        {
            this.ImageTemplate.SetActive(false);
        }
        if (Object.op_Equality((Object)this.Contents, (Object)null) || Object.op_Equality((Object)this.Title, (Object)null))
        {
            return;
        }
        Text component = (Text)((Component)this.Title.get_transform().FindChild("Text")).GetComponent <Text>();

        this.popupType = (GachaTopPopup.PopupType) int.Parse(FlowNode_Variable.Get(nameof(GachaTopPopup)));
        string key = this.popupType != GachaTopPopup.PopupType.DETAIL ? GachaTopPopup.GACHA_DESCRIPTION_TITLE : GachaTopPopup.GACHA_DETAIL_TITLE;

        if (Object.op_Inequality((Object)component, (Object)null))
        {
            component.set_text(LocalizedText.Get(key));
        }
        if (this.popupType == GachaTopPopup.PopupType.DETAIL)
        {
            this.mCurrentGachaIname = FlowNode_Variable.Get("GachaDetailSelectIname");
            if (string.IsNullOrEmpty(this.mCurrentGachaIname))
            {
                return;
            }
        }
        this.CreateContents();
    }
Exemple #3
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);
        }
        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 #5
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 #6
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();
            }
        }
 public void Activated(int pinID)
 {
     if (pinID != 0)
     {
         return;
     }
     FlowNode_Variable.Set("SelectChannelPage", string.Empty);
     this.Refresh();
 }
 public override void OnActivate(int pinID)
 {
     if (pinID != 0)
     {
         return;
     }
     this.ExecRequest((WebAPI) new ReqAddChatBlackList(FlowNode_Variable.Get("SelectUserID"), new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
     ((Behaviour)this).set_enabled(false);
 }
 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);
 }
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");
        }
 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 #14
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);
        }
        public override void OnActivate(int pinID)
        {
            if (pinID != 0)
            {
                return;
            }
            string s = FlowNode_Variable.Get("BLACKLIST_OFFSET");

            this.ExecRequest((WebAPI) new ReqChatBlackList(!string.IsNullOrEmpty(s) ? int.Parse(s) : 1, this.GetLimit, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
            ((Behaviour)this).set_enabled(false);
        }
Exemple #16
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);
     }
 }
        private void Create()
        {
            GameObject gameObject = AssetManager.Load <GameObject>("UI/WebView");

            if (Object.op_Inequality((Object)gameObject, (Object)null))
            {
                this.webView = (WebView)((GameObject)Object.Instantiate <GameObject>((M0)gameObject)).GetComponent <WebView>();
                if (this.useVariable)
                {
                    string str1 = FlowNode_Variable.Get(this.URL);
                    if (!string.IsNullOrEmpty(str1))
                    {
                        this.URL = str1;
                    }
                    string str2 = FlowNode_Variable.Get(this.Title);
                    if (!string.IsNullOrEmpty(str2))
                    {
                        this.Title = str2;
                    }
                }
                this.webView.OnClose = new UIUtility.DialogResultEvent(this.OnClose);
                this.webView.Text_Title.set_text(LocalizedText.Get(this.Title));
                if (this.usegAuth)
                {
                    this.webView.SetHeaderField("Authorization", "gumi " + Network.SessionID);
                }
                if (this.URL.StartsWith("http://") || this.URL.StartsWith("https://"))
                {
                    this.webView.OpenURL(this.URL);
                }
                else if (this.URLMode == FlowNode_WebView.URL_Mode.APIHost)
                {
                    this.webView.OpenURL(Network.Host + this.URL);
                }
                else if (this.URLMode == FlowNode_WebView.URL_Mode.SiteHost)
                {
                    this.webView.OpenURL(Network.SiteHost + this.URL);
                }
                else
                {
                    if (this.URLMode != FlowNode_WebView.URL_Mode.NewsHost)
                    {
                        return;
                    }
                    this.webView.OpenURL(Network.NewsHost + this.URL);
                }
            }
            else
            {
                Debug.Log((object)"Prefab not Found");
            }
        }
Exemple #18
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 #19
0
        private void SetSendStamp()
        {
            int currentChatChannel             = (int)GlobalVars.CurrentChatChannel;
            int stamp_id                       = int.Parse(FlowNode_Variable.Get("SELECT_STAMP_ID"));
            FlowNode_SendChatMessage component = (FlowNode_SendChatMessage)((Component)this).get_gameObject().GetComponent <FlowNode_SendChatMessage>();

            if (!Object.op_Inequality((Object)component, (Object)null))
            {
                return;
            }
            component.SetStampData(currentChatChannel, stamp_id);
            FlowNode_GameObject.ActivateOutputLinks((Component)this, 101);
        }
Exemple #20
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)
        {
            int pinID1 = 1;

            if (MonoSingleton <GameManager> .Instance.Player.Units.Count == 4)
            {
                pinID1 = 3;
            }
            else if (FlowNode_Variable.Get("REDRAW_GACHA_PENDING") == "1")
            {
                pinID1 = 2;
            }
            this.ActivateOutputLinks(pinID1);
        }
        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);
        }
 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();
             }
         }
     }
 }
        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);
        }
Exemple #25
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 #26
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);
     }
 }
Exemple #27
0
        private void Refresh()
        {
            this.mStatusParamSlots     = new Text[(int)StatusParam.MAX_STATUS];
            this.mStatusParamSlots[0]  = this.Status_HP;
            this.mStatusParamSlots[3]  = this.Status_Atk;
            this.mStatusParamSlots[4]  = this.Status_Def;
            this.mStatusParamSlots[5]  = this.Status_Mag;
            this.mStatusParamSlots[6]  = this.Status_Mnd;
            this.mStatusParamSlots[7]  = this.Status_Rec;
            this.mStatusParamSlots[8]  = this.Status_Dex;
            this.mStatusParamSlots[9]  = this.Status_Speed;
            this.mStatusParamSlots[10] = this.Status_Cri;
            this.mStatusParamSlots[11] = this.Status_Luck;
            this.mCurrentUnitIndex     = int.Parse(FlowNode_Variable.Get("GachaResultDataIndex"));
            UnitParam unit = GachaResultData.drops[this.mCurrentUnitIndex].unit;

            if (unit == null)
            {
                return;
            }
            this.mCurrentUnit = this.CreateUnitData(unit);
            if (this.mCurrentUnit == null)
            {
                return;
            }
            if (!string.IsNullOrEmpty(this.PreviewParentID))
            {
                this.mPreviewParent = GameObjectID.FindGameObject <Transform>(this.PreviewParentID);
                ((Component)this.mPreviewParent).get_transform().set_position(new Vector3(-0.2f, (float)((Component)this.mPreviewParent).get_transform().get_position().y, (float)((Component)this.mPreviewParent).get_transform().get_position().z));
            }
            if (!string.IsNullOrEmpty(this.PreviewBaseID))
            {
                this.mPreviewBase = GameObjectID.FindGameObject(this.PreviewBaseID);
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.mPreviewBase, (UnityEngine.Object)null))
                {
                    GameUtility.SetLayer(this.mPreviewBase, GameUtility.LayerUI, true);
                    this.mPreviewBase.get_transform().set_position(new Vector3(-0.2f, (float)this.mPreviewBase.get_transform().get_position().y, (float)this.mPreviewBase.get_transform().get_position().z));
                    this.mPreviewBase.SetActive(false);
                }
            }
            if (!string.IsNullOrEmpty(this.BGUnitImageID))
            {
                this.mBGUnitImage = GameObjectID.FindGameObject <RawImage>(this.BGUnitImageID);
            }
            this.RefreshGachaCostObject();
            this.StartCoroutine(this.RefreshAsync(false));
        }
Exemple #28
0
 public override void Begin(HomeWindow self)
 {
     if (FlowNode_Variable.Get("REDRAW_GACHA_PENDING") == "1")
     {
         self.mStateMachine.GotoState <HomeWindow.State_Default>();
         GlobalEvent.Invoke("MENU_GACHA_REDRAW", (object)this);
     }
     else
     {
         if (string.IsNullOrEmpty(self.LoginInfoPath))
         {
             return;
         }
         this.mReq = AssetManager.LoadAsync <GameObject>(self.LoginInfoPath);
         this.mHasNotifiedRankmatch = false;
     }
 }
 public override void OnSuccess(WWWResult www)
 {
     if (Network.IsError)
     {
         Network.EErrCode errCode = Network.ErrCode;
         this.OnRetry();
     }
     else
     {
         WebAPI.JSON_BodyResponse <Json_GachaList> jsonObject = JSONParser.parseJSONObject <WebAPI.JSON_BodyResponse <Json_GachaList> >(www.text);
         DebugUtility.Assert(jsonObject != null, "res == null");
         Network.RemoveAPI();
         if (jsonObject.body == null)
         {
             this.Failure();
         }
         else
         {
             GameManager instance = MonoSingleton <GameManager> .Instance;
             try
             {
                 if (!instance.Deserialize(jsonObject.body))
                 {
                     this.Failure();
                     return;
                 }
             }
             catch (Exception ex)
             {
                 DebugUtility.LogException(ex);
                 this.Failure();
                 return;
             }
             GachaResultData.Reset();
             if (FlowNode_Variable.Get("REDRAW_GACHA_PENDING") == "1")
             {
                 this.ToCheckPending();
             }
             else
             {
                 this.Success();
             }
         }
     }
 }
        public override void OnActivate(int pinID)
        {
            if (pinID != 0)
            {
                return;
            }
            string iname = FlowNode_Variable.Get("CONFIRM_SELECT_AWARD");

            if (MonoSingleton <GameManager> .GetInstanceDirect().Player.SelectedAward != iname)
            {
                this.ExecRequest((WebAPI) new ReqUpdateSelectAward(iname, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
                ((Behaviour)this).set_enabled(true);
            }
            else
            {
                this.Success();
            }
        }