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 #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();
    }
 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 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);
        }
        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 #6
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 #7
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);
        }
        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 #10
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 #11
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();
            }
        }
        private void Refresh()
        {
            if (Object.op_Equality((Object)this.ArtifactInfo, (Object)null))
            {
                return;
            }
            ArtifactParam artifact = GachaResultData.drops[int.Parse(FlowNode_Variable.Get("GachaResultDataIndex"))].artifact;

            if (artifact == null)
            {
                return;
            }
            this.mCurrentArtifact = new ArtifactData();
            this.mCurrentArtifact = this.CreateArtifactData(artifact);
            DataSource.Bind <ArtifactData>(this.ArtifactInfo, this.mCurrentArtifact);
            GameParameter.UpdateAll(this.ArtifactInfo);
            FlowNode_GameObject.ActivateOutputLinks((Component)this, 2);
        }
Exemple #15
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);
                }
            }
        }
 private void UpdateTimer()
 {
     if (!VersusDraftList.VersusDraftTurnOwn || int.Parse(FlowNode_Variable.Get("START_PLAYER_TURN")) < 1)
     {
         return;
     }
     this.mPlayerTimer += Time.get_unscaledDeltaTime();
     this.mTimerText.set_text(((int)((double)this.mDraftSec - (double)this.mPlayerTimer)).ToString());
     if ((double)this.mPlayerTimer < (double)this.mDraftSec)
     {
         return;
     }
     if (this.mRandomSelecting)
     {
         this.StopCoroutine(this.RandomSelecting());
     }
     this.DecideUnitRandom(true, true);
     this.DecideUnit();
 }
Exemple #17
0
        private void Refresh()
        {
            if (Object.op_Equality((Object)this.PieceInfo, (Object)null))
            {
                return;
            }
            int       index     = int.Parse(FlowNode_Variable.Get("GachaResultDataIndex"));
            ItemParam itemParam = GachaResultData.drops[index].item;
            int       num       = GachaResultData.drops[index].num;

            if (itemParam == null)
            {
                return;
            }
            this.mCurrentPiece = new ItemData();
            this.mCurrentPiece.Setup(0L, itemParam, num);
            DataSource.Bind <ItemData>(this.PieceInfo, this.mCurrentPiece);
            GameParameter.UpdateAll(this.PieceInfo);
            FlowNode_GameObject.ActivateOutputLinks((Component)this, 2);
        }
 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();
 }
Exemple #19
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 #20
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);
        }
Exemple #21
0
        private void RefreshCaution()
        {
            string str = FlowNode_Variable.Get("MESSAGE_CAUTION_SEND_MESSAGE");

            if (string.IsNullOrEmpty(str))
            {
                if (!Object.op_Inequality((Object)this.CautionAnimator, (Object)null))
                {
                    return;
                }
                this.CautionAnimator.ResetTrigger("onShowCaution");
            }
            else
            {
                this.Caution.set_text(str);
                if (!Object.op_Inequality((Object)this.CautionAnimator, (Object)null))
                {
                    return;
                }
                this.CautionAnimator.SetTrigger("onShowCaution");
            }
        }
Exemple #22
0
        private void Refresh()
        {
            string key = FlowNode_Variable.Get("CONFIRM_SELECT_AWARD");

            if (string.IsNullOrEmpty(key))
            {
                DebugUtility.LogError("AwardSelectConfirmWindow:select_iname is Null or Empty");
            }
            else
            {
                AwardParam awardParam = this.gm.MasterParam.GetAwardParam(key);
                if (awardParam == null)
                {
                    return;
                }
                if (Object.op_Inequality((Object)this.AwardImg, (Object)null) && Object.op_Inequality((Object)this.mImageArray, (Object)null))
                {
                    if (this.mImageArray.Images.Length <= awardParam.grade)
                    {
                        this.SetExtraAwardImage(awardParam.bg);
                        awardParam.name = string.Empty;
                    }
                    else
                    {
                        this.mImageArray.ImageIndex = awardParam.grade;
                    }
                }
                if (Object.op_Inequality((Object)this.AwardName, (Object)null))
                {
                    this.AwardName.set_text(awardParam.name);
                }
                if (!Object.op_Inequality((Object)this.ExpText, (Object)null))
                {
                    return;
                }
                this.ExpText.set_text(awardParam.expr);
            }
        }
Exemple #23
0
        private void Awake()
        {
            GlobalVars.EditMultiPlayRoomPassCode = "0";
            string s = FlowNode_Variable.Get("MultiPlayPasscode");

            if (!string.IsNullOrEmpty(s))
            {
                int result = 0;
                if (int.TryParse(s, out result) && result != 0)
                {
                    this.Activated(51);
                }
            }
            if (Object.op_Inequality((Object)this.ItemTemplate, (Object)null) && this.ItemTemplate.get_activeInHierarchy())
            {
                this.ItemTemplate.SetActive(false);
            }
            if (!Object.op_Inequality((Object)this.DetailTemplate, (Object)null) || !this.DetailTemplate.get_activeInHierarchy())
            {
                return;
            }
            this.DetailTemplate.SetActive(false);
        }
        private void Start()
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.Target, (UnityEngine.Object)null))
            {
                return;
            }
            string text = FlowNode_Variable.Get("SHARED_WEBWINDOW_TITLE");

            if (!string.IsNullOrEmpty(text))
            {
                this.Target.SetTitleText(text);
            }
            string url = FlowNode_Variable.Get("SHARED_WEBWINDOW_URL");

            if (!string.IsNullOrEmpty(url))
            {
                if (this.usegAuth)
                {
                    Dictionary <string, string> dictionary = new Dictionary <string, string>();
                    GsccBridge.SetWebViewHeaders(new Action <string, string>(dictionary.Add));
                    using (Dictionary <string, string> .Enumerator enumerator = dictionary.GetEnumerator())
                    {
                        while (enumerator.MoveNext())
                        {
                            KeyValuePair <string, string> current = enumerator.Current;
                            this.Target.SetHeaderField(current.Key, current.Value);
                        }
                    }
                }
                this.Target.OpenURL(url);
                FlowNode_Variable.Set("SHARED_WEBWINDOW_URL", string.Empty);
            }
            else
            {
                this.Caution.SetActive(true);
            }
        }
        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();
                }
            }
        }
Exemple #26
0
        public override void OnActivate(int pinID)
        {
            switch (pinID)
            {
            case 0:
                if (((Behaviour)this).get_enabled())
                {
                    break;
                }
                if (FlowNode_Variable.Get("REDRAW_GACHA_PENDING") == "1")
                {
                    FlowNode_Variable.Set("REDRAW_GACHA_PENDING", string.Empty);
                    this.ActivateOutputLinks(13);
                    break;
                }
                if (string.IsNullOrEmpty(this.TutorialGachaID))
                {
                    DebugUtility.LogError("チュートリアル召喚で使用したいIDが指定されていません");
                    break;
                }
                this.API = FlowNode_ExecTutorialGacha.ExecType.DEFAULT;
                this.ExecRequest((WebAPI) new ReqGachaExec(this.TutorialGachaID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback), 0, 0, 0));
                ((Behaviour)this).set_enabled(true);
                break;

            case 1:
                if (((Behaviour)this).get_enabled() || string.IsNullOrEmpty(this.TutorialGachaID))
                {
                    break;
                }
                this.API = FlowNode_ExecTutorialGacha.ExecType.DECISION;
                this.ExecRequest((WebAPI) new ReqGachaExec(this.TutorialGachaID, new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback), 0, 0, 1));
                ((Behaviour)this).set_enabled(true);
                break;
            }
        }
Exemple #27
0
        private void Start()
        {
            if (Object.op_Equality((Object)this.Target, (Object)null))
            {
                return;
            }
            string text = FlowNode_Variable.Get("SHARED_WEBWINDOW_TITLE");

            if (!string.IsNullOrEmpty(text))
            {
                this.Target.SetTitleText(text);
            }
            string url = FlowNode_Variable.Get("SHARED_WEBWINDOW_URL");

            if (!string.IsNullOrEmpty(url))
            {
                this.Target.OpenURL(url);
                FlowNode_Variable.Set("SHARED_WEBWINDOW_URL", string.Empty);
            }
            else
            {
                this.Caution.SetActive(true);
            }
        }
        public override void OnActivate(int pinID)
        {
            if (pinID < 0)
            {
                return;
            }
            ChatChannelMasterParam[] chatChannelMaster = MonoSingleton <GameManager> .Instance.GetChatChannelMaster();

            List <int> intList            = new List <int>();
            int        currentChatChannel = (int)GlobalVars.CurrentChatChannel;
            int        num1;

            if (pinID == 0)
            {
                num1 = currentChatChannel % this.ChannelLimit != 0 ? currentChatChannel / this.ChannelLimit : (currentChatChannel - 1) / this.ChannelLimit;
                FlowNode_Variable.Set("SelectChannelPage", num1.ToString());
            }
            else
            {
                num1 = int.Parse(FlowNode_Variable.Get("SelectChannelPage"));
            }
            int num2 = this.ChannelLimit * num1;
            int num3 = num2 <= chatChannelMaster.Length ? num2 : 0;
            int num4 = this.ChannelLimit * (num1 + 1);
            int num5 = num4 <= chatChannelMaster.Length ? num4 : chatChannelMaster.Length;

            for (int index = num3; index < num5; ++index)
            {
                if (index < chatChannelMaster.Length)
                {
                    intList.Add(chatChannelMaster[index].id);
                }
            }
            this.ExecRequest((WebAPI) new ReqChatChannelList(intList.ToArray(), new Network.ResponseCallback(((FlowNode_Network)this).ResponseCallback)));
            ((Behaviour)this).set_enabled(true);
        }
        private void Create()
        {
            GameObject gameObject = AssetManager.Load <GameObject>("UI/WebView");

            if (UnityEngine.Object.op_Inequality((UnityEngine.Object)gameObject, (UnityEngine.Object)null))
            {
                this.webView = (WebView)((GameObject)UnityEngine.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)
                {
                    Dictionary <string, string> dictionary = new Dictionary <string, string>();
                    GsccBridge.SetWebViewHeaders(new Action <string, string>(dictionary.Add));
                    using (Dictionary <string, string> .Enumerator enumerator = dictionary.GetEnumerator())
                    {
                        while (enumerator.MoveNext())
                        {
                            KeyValuePair <string, string> current = enumerator.Current;
                            this.webView.SetHeaderField(current.Key, current.Value);
                        }
                    }
                }
                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 #30
0
        private void RefreshItems(bool isSelect)
        {
            Transform   transform = ((Component)this).get_transform();
            int         num       = 0;
            GameManager instance  = MonoSingleton <GameManager> .Instance;

            for (int index = 0; index < this.mRoomList.Count; ++index)
            {
                Object.DestroyImmediate((Object)this.mRoomList[index]);
            }
            this.mRoomList.Clear();
            if (Object.op_Equality((Object)this.ItemTemplate, (Object)null))
            {
                return;
            }
            MultiPlayAPIRoom[] multiPlayApiRoomArray = FlowNode_MultiPlayAPI.RoomList != null ? FlowNode_MultiPlayAPI.RoomList.rooms : (MultiPlayAPIRoom[])null;
            if (multiPlayApiRoomArray == null)
            {
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 200);
            }
            else if (multiPlayApiRoomArray.Length == 0)
            {
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 200);
            }
            else
            {
                RoomList.MultiTowerFilterMode multiTowerFilterMode = RoomList.MultiTowerFilterMode.Default;
                string s = FlowNode_Variable.Get("MT_ROOM_FILTER_MODE");
                if (!string.IsNullOrEmpty(s))
                {
                    multiTowerFilterMode = (RoomList.MultiTowerFilterMode) int.Parse(s);
                }
                for (int index = 0; index < multiPlayApiRoomArray.Length; ++index)
                {
                    MultiPlayAPIRoom multiPlayApiRoom = multiPlayApiRoomArray[index];
                    if (multiPlayApiRoom != null && multiPlayApiRoom.quest != null && !string.IsNullOrEmpty(multiPlayApiRoom.quest.iname))
                    {
                        QuestParam quest = MonoSingleton <GameManager> .Instance.FindQuest(multiPlayApiRoom.quest.iname);

                        if (quest != null && quest.IsMultiEvent == GlobalVars.SelectedMultiPlayQuestIsEvent)
                        {
                            switch (multiTowerFilterMode)
                            {
                            case RoomList.MultiTowerFilterMode.Cleared:
                                if (multiPlayApiRoom.is_clear != 0)
                                {
                                    break;
                                }
                                continue;

                            case RoomList.MultiTowerFilterMode.NotClear:
                                if (multiPlayApiRoom.is_clear == 0)
                                {
                                    break;
                                }
                                continue;
                            }
                            bool isChoose = this.IsChooseRoom(multiPlayApiRoom);
                            if ((isChoose || !isSelect) && (multiPlayApiRoom.clear == 0 || instance.FindQuest(multiPlayApiRoom.quest.iname).state == QuestStates.Cleared))
                            {
                                GameObject gameObject = (GameObject)Object.Instantiate <GameObject>((M0)this.ItemTemplate);
                                ((Object)gameObject).set_hideFlags((HideFlags)52);
                                Json_Unit[] jsonUnitArray = multiPlayApiRoom.owner != null ? multiPlayApiRoom.owner.units : (Json_Unit[])null;
                                if (jsonUnitArray != null && jsonUnitArray.Length > 0)
                                {
                                    UnitData data = new UnitData();
                                    data.Deserialize(jsonUnitArray[0]);
                                    DataSource.Bind <UnitData>(gameObject, data);
                                }
                                DataSource.Bind <MultiPlayAPIRoom>(gameObject, multiPlayApiRoom);
                                DataSource.Bind <QuestParam>(gameObject, quest);
                                DebugUtility.Log("found roomid:" + (object)multiPlayApiRoom.roomid + " room:" + multiPlayApiRoom.comment + " iname:" + quest.iname + " playerNum:" + (object)quest.playerNum + " unitNum:" + (object)quest.unitNum);
                                ListItemEvents component = (ListItemEvents)gameObject.GetComponent <ListItemEvents>();
                                if (Object.op_Inequality((Object)component, (Object)null))
                                {
                                    component.OnSelect      = new ListItemEvents.ListItemEvent(this.OnSelectItem);
                                    component.OnOpenDetail  = new ListItemEvents.ListItemEvent(this.OnOpenItemDetail);
                                    component.OnCloseDetail = new ListItemEvents.ListItemEvent(this.OnCloseItemDetail);
                                }
                                gameObject.get_transform().SetParent(transform, false);
                                gameObject.get_gameObject().SetActive(true);
                                this.mRoomList.Add(gameObject);
                                this.SetSelectablParam(gameObject, multiPlayApiRoom, isChoose);
                                ++num;
                            }
                        }
                    }
                }
                GameParameter.UpdateAll(((Component)transform).get_gameObject());
                FlowNode_GameObject.ActivateOutputLinks((Component)this, num != 0 ? 201 : 200);
            }
        }