Ejemplo n.º 1
0
 private void Close()
 {
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 0);
 }
Ejemplo n.º 2
0
        private void OnTry()
        {
            TrophyParam dataOfClass = DataSource.FindDataOfClass <TrophyParam>(((Component)this).get_gameObject(), (TrophyParam)null);

            if (dataOfClass == null)
            {
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 100);
            }
            else
            {
                QuestParam questParam = new QuestParam();
                PlayerData player     = MonoSingleton <GameManager> .Instance.Player;
                switch (dataOfClass.Objectives[0].type)
                {
                case TrophyConditionTypes.winquest:
                case TrophyConditionTypes.winquestsoldier:
                case TrophyConditionTypes.losequest:
                    QuestTypes quest_type1 = QuestTypes.Story;
                    if (!questParam.TransSectionGotoQuest(dataOfClass.Objectives[0].sval_base, out quest_type1, new UIUtility.DialogResultEvent(this.MsgBoxJumpToQuest)))
                    {
                        this.g_quest_type = quest_type1;
                        break;
                    }
                    QuestTypes questTypes1 = quest_type1;
                    switch (questTypes1)
                    {
                    case QuestTypes.Event:
                    case QuestTypes.Gps:
                        FlowNode_GameObject.ActivateOutputLinks((Component)this, 1007);
                        return;

                    case QuestTypes.Tower:
                        FlowNode_GameObject.ActivateOutputLinks((Component)this, 1026);
                        return;

                    default:
                        if (questTypes1 != QuestTypes.Multi)
                        {
                            if (questTypes1 == QuestTypes.Beginner)
                            {
                                FlowNode_GameObject.ActivateOutputLinks((Component)this, 1028);
                                return;
                            }
                            FlowNode_GameObject.ActivateOutputLinks((Component)this, 1001);
                            return;
                        }
                        FlowNode_GameObject.ActivateOutputLinks((Component)this, 1005);
                        return;
                    }

                case TrophyConditionTypes.killenemy:
                case TrophyConditionTypes.getitem:
                case TrophyConditionTypes.playerlv:
                case TrophyConditionTypes.vip:
                case TrophyConditionTypes.stamina:
                case TrophyConditionTypes.card:
                case TrophyConditionTypes.review:
                case TrophyConditionTypes.followtwitter:
                case TrophyConditionTypes.unitlevel:
                case TrophyConditionTypes.evolutionnum:
                case TrophyConditionTypes.joblevel:
                case TrophyConditionTypes.logincount:
                case TrophyConditionTypes.fblogin:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 100);
                    break;

                case TrophyConditionTypes.winelite:
                case TrophyConditionTypes.loseelite:
                    if (!questParam.TransSectionGotoElite(new UIUtility.DialogResultEvent(this.MsgBoxJumpToQuest)))
                    {
                        break;
                    }
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1001);
                    break;

                case TrophyConditionTypes.winevent:
                case TrophyConditionTypes.loseevent:
                    questParam.GotoEventListQuest((string)null, (string)null);
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1007);
                    break;

                case TrophyConditionTypes.gacha:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1000);
                    break;

                case TrophyConditionTypes.multiplay:
                case TrophyConditionTypes.winmulti:
                case TrophyConditionTypes.winmultimore:
                case TrophyConditionTypes.winmultiless:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1005);
                    break;

                case TrophyConditionTypes.ability:
                case TrophyConditionTypes.makeabilitylevel:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1002);
                    break;

                case TrophyConditionTypes.soubi:
                    if (player.CheckUnlock(UnlockTargets.EnhanceEquip))
                    {
                        FlowNode_GameObject.ActivateOutputLinks((Component)this, 1003);
                        break;
                    }
                    LevelLock.ShowLockMessage(player.Lv, player.VipRank, UnlockTargets.EnhanceEquip);
                    break;

                case TrophyConditionTypes.buygold:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1004);
                    break;

                case TrophyConditionTypes.arena:
                case TrophyConditionTypes.winarena:
                case TrophyConditionTypes.losearena:
                    if (player.CheckUnlock(UnlockTargets.Arena))
                    {
                        FlowNode_GameObject.ActivateOutputLinks((Component)this, 1008);
                        break;
                    }
                    LevelLock.ShowLockMessage(player.Lv, player.VipRank, UnlockTargets.Arena);
                    break;

                case TrophyConditionTypes.fggid:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1025);
                    break;

                case TrophyConditionTypes.upunitlevel:
                case TrophyConditionTypes.makeunitlevel:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1009);
                    break;

                case TrophyConditionTypes.unitequip:
                case TrophyConditionTypes.upjoblevel:
                case TrophyConditionTypes.makejoblevel:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1011);
                    break;

                case TrophyConditionTypes.limitbreak:
                case TrophyConditionTypes.evoltiontimes:
                case TrophyConditionTypes.changejob:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1012);
                    break;

                case TrophyConditionTypes.changeability:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1010);
                    break;

                case TrophyConditionTypes.buyatshop:
                    this.GotoShop(dataOfClass);
                    break;

                case TrophyConditionTypes.artifacttransmute:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1022);
                    break;

                case TrophyConditionTypes.artifactstrength:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1023);
                    break;

                case TrophyConditionTypes.artifactevolution:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1024);
                    break;

                case TrophyConditionTypes.wintower:
                case TrophyConditionTypes.losetower:
                    QuestTypes quest_type2 = QuestTypes.Story;
                    if (!questParam.TransSectionGotoTower(dataOfClass.Objectives[0].sval_base, out quest_type2))
                    {
                        break;
                    }
                    QuestTypes questTypes2 = quest_type2;
                    switch (questTypes2)
                    {
                    case QuestTypes.Gps:
                        FlowNode_GameObject.ActivateOutputLinks((Component)this, 1007);
                        return;

                    case QuestTypes.Beginner:
                        FlowNode_GameObject.ActivateOutputLinks((Component)this, 1028);
                        return;

                    default:
                        if (questTypes2 != QuestTypes.Event)
                        {
                            FlowNode_GameObject.ActivateOutputLinks((Component)this, 1026);
                            return;
                        }
                        goto case QuestTypes.Gps;
                    }

                case TrophyConditionTypes.vs:
                case TrophyConditionTypes.vswin:
                    if (player.CheckUnlock(UnlockTargets.MultiVS))
                    {
                        FlowNode_GameObject.ActivateOutputLinks((Component)this, 1027);
                        break;
                    }
                    LevelLock.ShowLockMessage(player.Lv, player.VipRank, UnlockTargets.MultiVS);
                    break;

                default:
                    DebugUtility.Log(string.Format("未知の Trophy 条件 / {0}", (object)dataOfClass.Objectives[0].type));
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 100);
                    break;
                }
            }
        }
Ejemplo n.º 3
0
 private void OnSelect(GameObject go)
 {
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 100);
     GlobalVars.ItemSelectListItemData = DataSource.FindDataOfClass <ItemSelectListItemData>(go, (ItemSelectListItemData)null);
 }
Ejemplo n.º 4
0
 public void EndTowerClear()
 {
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 32);
 }
Ejemplo n.º 5
0
 private void OnSelectPage(int offset)
 {
     FlowNode_Variable.Set("BLACKLIST_OFFSET", offset.ToString());
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 11);
 }
Ejemplo n.º 6
0
 public void ActivateOutputLinks(int pin_id)
 {
     FlowNode_GameObject.ActivateOutputLinks((Component)this, pin_id);
 }
Ejemplo n.º 7
0
 private void OnDetail(SRPG_Button button)
 {
     FlowNode_Variable.Set("SHARED_WEBWINDOW_TITLE", LocalizedText.Get("sys.TITLE_POPUP_GACHA_DETAIL"));
     FlowNode_Variable.Set("SHARED_WEBWINDOW_URL", this.mDetailURL);
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 10);
 }
Ejemplo n.º 8
0
 public void SetSortMethod(string method, bool ascending, string[] filters)
 {
     this.SetSortMethod(filters);
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 13);
 }
Ejemplo n.º 9
0
        private void Start()
        {
            GameManager instance = MonoSingleton <GameManager> .Instance;

            Json_LoginBonus[] jsonLoginBonusArray;
            if (this.IsConfigWindow)
            {
                jsonLoginBonusArray   = instance.Player.LoginBonus28days.bonuses;
                this.mLoginBonusCount = instance.Player.LoginBonus28days.count;
                this.mNotifyUnits     = instance.Player.LoginBonus28days.bonus_units;
            }
            else
            {
                jsonLoginBonusArray   = instance.Player.FindLoginBonuses(this.TableID);
                this.mLoginBonusCount = instance.Player.LoginCountWithType(this.TableID);
                this.mNotifyUnits     = instance.Player.GetLoginBonuseUnitIDs(this.TableID);
            }
            ItemData data1 = (ItemData)null;
            ItemData data2 = (ItemData)null;
            ItemData data3 = (ItemData)null;

            if (this.DebugItems != null && this.DebugItems.Length > 0)
            {
                jsonLoginBonusArray   = this.DebugItems;
                this.mLoginBonusCount = this.DebugBonusCount;
            }
            if (Object.op_Inequality((Object)this.RemainingCount, (Object)null))
            {
                this.RemainingCount.set_text(Math.Max(28 - this.mLoginBonusCount, 0).ToString());
            }
            this.mCurrentWeak = Math.Max(this.mLoginBonusCount - 1, 0) / 7;
            if (jsonLoginBonusArray != null && Object.op_Inequality((Object)this.Item_Normal, (Object)null) && Object.op_Inequality((Object)this.ItemList, (Object)null))
            {
                for (int index1 = 0; index1 < jsonLoginBonusArray.Length; ++index1)
                {
                    string key  = jsonLoginBonusArray[index1].iname;
                    int    num1 = jsonLoginBonusArray[index1].num;
                    if (string.IsNullOrEmpty(key) && jsonLoginBonusArray[index1].coin > 0)
                    {
                        key  = "$COIN";
                        num1 = jsonLoginBonusArray[index1].coin;
                    }
                    if (!string.IsNullOrEmpty(key))
                    {
                        ItemParam itemParam = instance.GetItemParam(key);
                        if (itemParam != null)
                        {
                            LoginBonusData loginBonusData = new LoginBonusData();
                            loginBonusData.DayNum = index1 + 1;
                            if (index1 == this.mLoginBonusCount - 1)
                            {
                                data2 = (ItemData)loginBonusData;
                                if (loginBonusData != null && loginBonusData.Param != null)
                                {
                                    if (loginBonusData.ItemType == EItemType.Ticket)
                                    {
                                        AnalyticsManager.TrackCurrencyObtain(AnalyticsManager.CurrencyType.SummonTicket, AnalyticsManager.CurrencySubType.FREE, (long)loginBonusData.Num, "Login Bonus", new Dictionary <string, object>()
                                        {
                                            {
                                                "ticket_id",
                                                (object)loginBonusData.ItemID
                                            }
                                        });
                                    }
                                    else
                                    {
                                        AnalyticsManager.TrackCurrencyObtain(AnalyticsManager.CurrencyType.Item, AnalyticsManager.CurrencySubType.FREE, (long)loginBonusData.Num, "Login Bonus", new Dictionary <string, object>()
                                        {
                                            {
                                                "item_id",
                                                (object)loginBonusData.ItemID
                                            }
                                        });
                                    }
                                }
                                if (string.IsNullOrEmpty(key) && jsonLoginBonusArray[index1].coin > 0)
                                {
                                    AnalyticsManager.TrackCurrencyObtain(AnalyticsManager.CurrencyType.Gem, AnalyticsManager.CurrencySubType.FREE, (long)jsonLoginBonusArray[index1].coin, "Login Bonus", (Dictionary <string, object>)null);
                                }
                            }
                            else if (index1 == this.mLoginBonusCount)
                            {
                                data3 = (ItemData)loginBonusData;
                            }
                            if (loginBonusData.Setup(0L, itemParam, num1))
                            {
                                int            num2           = this.mLoginBonusCount - (!this.IsConfigWindow ? 1 : 0);
                                ListItemEvents listItemEvents = (ListItemEvents)Object.Instantiate <ListItemEvents>(index1 >= num2 ? (M0)this.Item_Normal : (M0)this.Item_Taken);
                                listItemEvents.OnSelect = new ListItemEvents.ListItemEvent(this.OnItemSelect);
                                DataSource.Bind <ItemData>(((Component)listItemEvents).get_gameObject(), (ItemData)loginBonusData);
                                if (Object.op_Inequality((Object)this.TodayBadge, (Object)null) && index1 == this.mLoginBonusCount - 1)
                                {
                                    ((Transform)this.TodayBadge).SetParent(((Component)listItemEvents).get_transform(), false);
                                    this.TodayBadge.set_anchoredPosition(Vector2.get_zero());
                                    ((Component)this.TodayBadge).get_gameObject().SetActive(true);
                                }
                                else if (Object.op_Inequality((Object)this.TommorowBadge, (Object)null) && index1 == this.mLoginBonusCount)
                                {
                                    ((Transform)this.TommorowBadge).SetParent(((Component)listItemEvents).get_transform(), false);
                                    this.TommorowBadge.set_anchoredPosition(Vector2.get_zero());
                                    ((Component)this.TommorowBadge).get_gameObject().SetActive(true);
                                }
                                if (index1 < this.mLoginBonusCount - 1)
                                {
                                    Transform child = ((Component)listItemEvents).get_transform().FindChild(this.CheckName);
                                    if (Object.op_Inequality((Object)child, (Object)null))
                                    {
                                        Animator component = (Animator)((Component)child).GetComponent <Animator>();
                                        if (Object.op_Inequality((Object)component, (Object)null))
                                        {
                                            ((Behaviour)component).set_enabled(false);
                                        }
                                    }
                                }
                                Transform transform = this.ItemList.get_transform();
                                int       index2    = index1 % 7;
                                if (this.PositionList != null && this.PositionList.Length > index2 && Object.op_Inequality((Object)this.PositionList[index2], (Object)null))
                                {
                                    transform = this.PositionList[index2].get_transform();
                                }
                                if (index1 == 0)
                                {
                                    this.DisableFirstDayHiddenOject(((Component)listItemEvents).get_gameObject());
                                }
                                int num3 = index1 / 7;
                                ((Component)listItemEvents).get_transform().SetParent(transform, false);
                                ((Component)listItemEvents).get_gameObject().SetActive(num3 == this.mCurrentWeak);
                                this.mItems.Add(listItemEvents);
                            }
                        }
                    }
                }
                data1 = DataSource.FindDataOfClass <ItemData>(((Component)this.mItems[this.mItems.Count - 1]).get_gameObject(), (ItemData)null);
            }
            if (Object.op_Inequality((Object)this.PopupMessage, (Object)null))
            {
                this.PopupMessage.set_text(this.GetPopupMessage(data2));
            }
            bool flag = instance.Player.IsLastLoginBonus(this.TableID);

            if (jsonLoginBonusArray != null && this.mLoginBonusCount == jsonLoginBonusArray.Length)
            {
                flag = true;
            }
            if (Object.op_Inequality((Object)this.RemainingCounter, (Object)null))
            {
                this.RemainingCounter.SetActive(!flag);
            }
            if (Object.op_Inequality((Object)this.TodayItem, (Object)null))
            {
                DataSource.Bind <ItemData>(this.TodayItem.get_gameObject(), data2);
                GameParameter.UpdateAll(this.TodayItem);
            }
            if (Object.op_Inequality((Object)this.TommorowItem, (Object)null))
            {
                DataSource.Bind <ItemData>(this.TommorowItem.get_gameObject(), data3);
                GameParameter.UpdateAll(this.TommorowItem);
            }
            if (Object.op_Inequality((Object)this.LastItem, (Object)null))
            {
                DataSource.Bind <ItemData>(this.LastItem, data1);
                GameParameter.UpdateAll(this.LastItem);
            }
            if (Object.op_Inequality((Object)this.GainLastItemMessage, (Object)null))
            {
                this.GainLastItemMessage.set_text(this.GetGainLastItemMessage(data1));
            }
            if (flag)
            {
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 12);
            }
            if (this.WeakToggle != null)
            {
                for (int index1 = 0; index1 < this.WeakToggle.Count; ++index1)
                {
                    // ISSUE: object of a compiler-generated type is created
                    // ISSUE: variable of a compiler-generated type
                    LoginBonusWindow28days.\u003CStart\u003Ec__AnonStorey255 startCAnonStorey255 = new LoginBonusWindow28days.\u003CStart\u003Ec__AnonStorey255();
                    // ISSUE: reference to a compiler-generated field
                    startCAnonStorey255.\u003C\u003Ef__this = this;
                    int index2 = index1 * 7 + 6;
                    if (index2 < this.mItems.Count)
                    {
                        ItemData dataOfClass = DataSource.FindDataOfClass <ItemData>(((Component)this.mItems[index2]).get_gameObject(), (ItemData)null);
                        DataSource.Bind <ItemData>(((Component)this.WeakToggle[index1]).get_gameObject(), dataOfClass);
                    }
                    // ISSUE: reference to a compiler-generated field
                    startCAnonStorey255.index = index1;
                    this.WeakToggle[index1].set_isOn(index1 == this.mCurrentWeak);
                    // ISSUE: method pointer
                    ((UnityEvent <bool>) this.WeakToggle[index1].onValueChanged).AddListener(new UnityAction <bool>((object)startCAnonStorey255, __methodptr(\u003C\u003Em__2A0)));
                }
            }
            string unit_iname = (string)null;

            if (this.mNotifyUnits != null && this.mNotifyUnits.Length > 0)
            {
                unit_iname = this.mNotifyUnits[new Random().Next() % this.mNotifyUnits.Length];
            }
            if (!string.IsNullOrEmpty(this.DebugNotifyUnitID))
            {
                unit_iname = this.DebugNotifyUnitID;
            }
            if (!string.IsNullOrEmpty(unit_iname))
            {
                this.mCurrentUnit = new UnitData();
                this.mCurrentUnit.Setup(unit_iname, 0, 0, 0, (string)null, 1, EElement.None);
                GameObject gameObject = new GameObject("Preview", new System.Type[1] {
                    typeof(UnitPreview)
                });
                this.mCurrentPreview = (UnitPreview)gameObject.GetComponent <UnitPreview>();
                this.mCurrentPreview.DefaultLayer = GameUtility.LayerHidden;
                this.mCurrentPreview.SetupUnit(this.mCurrentUnit, -1);
                gameObject.get_transform().SetParent(this.PreviewParent, false);
                if (Object.op_Inequality((Object)this.PreviewCamera, (Object)null) && Object.op_Inequality((Object)this.PreviewImage, (Object)null))
                {
                    int num = Mathf.FloorToInt((float)Screen.get_height() * 0.8f);
                    this.mPreviewUnitRT = RenderTexture.GetTemporary(num, num, 16, (RenderTextureFormat)7);
                    this.PreviewCamera.set_targetTexture(this.mPreviewUnitRT);
                    this.PreviewImage.set_texture((Texture)this.mPreviewUnitRT);
                }
                GameUtility.SetLayer((Component)this.mCurrentPreview, GameUtility.LayerCH, true);
            }
            this.StartCoroutine(this.WaitLoadAsync());
        }
Ejemplo n.º 10
0
        private void Refresh()
        {
            if (UnityEngine.Object.op_Equality((UnityEngine.Object) this.ItemTemplate, (UnityEngine.Object)null))
            {
                return;
            }
            ShopData shopData = MonoSingleton <GameManager> .Instance.Player.GetShopData(GlobalVars.ShopType);

            DebugUtility.Assert(shopData != null, "ショップ情報が存在しない");
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.Updated, (UnityEngine.Object)null))
            {
                this.Updated.SetActive(shopData.btn_update);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.Update, (UnityEngine.Object)null))
            {
                this.Update.SetActive(shopData.btn_update);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.Lineup, (UnityEngine.Object)null))
            {
                this.Lineup.SetActive(shopData.btn_update);
            }
            for (int index = 0; index < this.mBuyItems.Count; ++index)
            {
                this.mBuyItems[index].get_gameObject().SetActive(false);
            }
            int count = shopData.items.Count;

            for (int index = 0; index < count; ++index)
            {
                ShopItem data1 = shopData.items[index];
                if (index >= this.mBuyItems.Count)
                {
                    GameObject gameObject = (GameObject)UnityEngine.Object.Instantiate <GameObject>((M0)this.ItemTemplate);
                    gameObject.get_transform().SetParent((Transform)this.ItemLayoutParent, false);
                    this.mBuyItems.Add(gameObject);
                }
                GameObject  mBuyItem            = this.mBuyItems[index];
                ShopBuyList componentInChildren = (ShopBuyList)mBuyItem.GetComponentInChildren <ShopBuyList>();
                componentInChildren.ShopItem = data1;
                componentInChildren.SetupDiscountUI();
                DataSource.Bind <ShopItem>(mBuyItem, data1);
                if (data1.IsArtifact)
                {
                    ArtifactParam artifactParam = MonoSingleton <GameManager> .Instance.MasterParam.GetArtifactParam(data1.iname);

                    DataSource.Bind <ArtifactParam>(mBuyItem, artifactParam);
                }
                else if (data1.IsConceptCard)
                {
                    ConceptCardData cardDataForDisplay = ConceptCardData.CreateConceptCardDataForDisplay(data1.iname);
                    componentInChildren.SetupConceptCard(cardDataForDisplay);
                }
                else if (data1.IsItem || data1.IsSet)
                {
                    ItemData data2 = new ItemData();
                    data2.Setup(0L, data1.iname, data1.num);
                    DataSource.Bind <ItemData>(mBuyItem, data2);
                    DataSource.Bind <ItemParam>(mBuyItem, MonoSingleton <GameManager> .Instance.GetItemParam(data1.iname));
                }
                else
                {
                    DebugUtility.LogError(string.Format("不明な商品タイプが設定されています (shopitem.iname({0}) => {1})", (object)data1.iname, (object)data1.ShopItemType));
                }
                ListItemEvents component1 = (ListItemEvents)mBuyItem.GetComponent <ListItemEvents>();
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component1, (UnityEngine.Object)null))
                {
                    component1.OnSelect = new ListItemEvents.ListItemEvent(this.OnSelect);
                }
                Button component2 = (Button)mBuyItem.GetComponent <Button>();
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object)component2, (UnityEngine.Object)null))
                {
                    ((Selectable)component2).set_interactable(!data1.is_soldout);
                }
                mBuyItem.SetActive(true);
            }
            GameParameter.UpdateAll(((Component)this).get_gameObject());
            if (GlobalVars.ShopType == EShopType.AwakePiece)
            {
                GameParameter.UpdateValuesOfType(GameParameter.ParameterTypes.GLOBAL_PLAYER_PIECEPOINT);
            }
            FlowNode_GameObject.ActivateOutputLinks((Component)this, 2);
        }
Ejemplo n.º 11
0
 protected override void RefreshItems()
 {
     base.RefreshItems();
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 10);
 }
Ejemplo n.º 12
0
 private void OnItemUpdated()
 {
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 102);
 }
Ejemplo n.º 13
0
 private void OnCloseDetail()
 {
     FlowNode_GameObject.ActivateOutputLinks((Component)this, this.OUT_CLOSE_DETAIL);
 }
Ejemplo n.º 14
0
 protected override void OnItemSelect(GameObject go)
 {
     GlobalVars.ArtifactListItem = DataSource.FindDataOfClass <ArtifactSelectListItemData>(go, (ArtifactSelectListItemData)null);
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 100);
 }
Ejemplo n.º 15
0
 public void CommonEquiped()
 {
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 104);
 }
Ejemplo n.º 16
0
 private bool OnGoOutShop()
 {
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 11);
     return(true);
 }
Ejemplo n.º 17
0
        private void Refresh()
        {
            if (this.isRefreshed)
            {
                return;
            }
            this.isRefreshed = true;
            GameUtility.DestroyGameObjects <ListItemEvents>(this.mItems);
            this.mItems.Clear();
            if (Object.op_Equality((Object)this.ItemTemplate, (Object)null) || Object.op_Equality((Object)this.ItemContainer, (Object)null))
            {
                return;
            }
            GameManager instance = MonoSingleton <GameManager> .Instance;

            SectionParam[] sections    = instance.Sections;
            List <string>  stringList1 = new List <string>();
            List <string>  stringList2 = new List <string>();
            long           serverTime  = Network.GetServerTime();

            foreach (QuestParam availableQuest in instance.Player.AvailableQuests)
            {
                if (!string.IsNullOrEmpty(availableQuest.ChapterID) && !availableQuest.IsMulti && (availableQuest.IsReplayDateUnlock(serverTime) && !stringList1.Contains(availableQuest.ChapterID)) && ((!string.IsNullOrEmpty(availableQuest.event_start) || !string.IsNullOrEmpty(availableQuest.event_clear)) && (availableQuest.state == QuestStates.Challenged || availableQuest.state == QuestStates.Cleared)))
                {
                    stringList1.Add(availableQuest.ChapterID);
                }
            }
            for (int index = 0; index < stringList1.Count; ++index)
            {
                ChapterParam area = instance.FindArea(stringList1[index]);
                if (area != null && !stringList2.Contains(area.section) && (area.section != "WD_DAILY" && area.section != "WD_CHARA"))
                {
                    stringList2.Add(area.section);
                }
            }
            for (int index = 0; index < sections.Length; ++index)
            {
                SectionParam sectionParam = sections[index];
                if (stringList2.Contains(sections[index].iname))
                {
                    ListItemEvents listItemEvents1 = (ListItemEvents)null;
                    if (!string.IsNullOrEmpty(sectionParam.prefabPath))
                    {
                        StringBuilder stringBuilder = GameUtility.GetStringBuilder();
                        stringBuilder.Append("QuestSections/");
                        stringBuilder.Append(sectionParam.prefabPath);
                        listItemEvents1 = AssetManager.Load <ListItemEvents>(stringBuilder.ToString());
                    }
                    if (Object.op_Equality((Object)listItemEvents1, (Object)null))
                    {
                        listItemEvents1 = this.ItemTemplate;
                    }
                    ListItemEvents listItemEvents2 = (ListItemEvents)Object.Instantiate <ListItemEvents>((M0)listItemEvents1);
                    DataSource.Bind <UIQuestSectionData>(((Component)listItemEvents2).get_gameObject(), new UIQuestSectionData(sections[index]));
                    ((Component)listItemEvents2).get_transform().SetParent(this.ItemContainer.get_transform(), false);
                    ((Component)listItemEvents2).get_gameObject().SetActive(true);
                    listItemEvents2.OnSelect = new ListItemEvents.ListItemEvent(this.OnItemSelect);
                    this.mItems.Add(listItemEvents2);
                }
            }
            if (Object.op_Inequality((Object)this.ScrollRect, (Object)null))
            {
                this.ScrollRect.set_normalizedPosition(Vector2.get_one());
            }
            if (this.mItems.Count > 0)
            {
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 10);
            }
            else
            {
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 11);
            }
        }
Ejemplo n.º 18
0
 private void EnhanceAnimCallBack()
 {
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 110);
 }
Ejemplo n.º 19
0
 private void OnDecide(GameObject go)
 {
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 100);
 }
Ejemplo n.º 20
0
 private void AwakeAnimCallBack()
 {
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 112);
 }
Ejemplo n.º 21
0
        private void Refresh()
        {
            GameUtility.DestroyGameObjects <ListItemEvents>(this.mItems);
            if (Object.op_Equality((Object)this.ItemTemplate, (Object)null) || Object.op_Equality((Object)this.ItemContainer, (Object)null))
            {
                return;
            }
            GameManager instance = MonoSingleton <GameManager> .Instance;

            ChapterParam[]      chapters         = instance.Chapters;
            List <ChapterParam> chapterParamList = new List <ChapterParam>((IEnumerable <ChapterParam>)chapters);

            QuestParam[] availableQuests = instance.Player.AvailableQuests;
            long         serverTime      = Network.GetServerTime();
            ChapterParam chapterParam    = (ChapterParam)null;

            for (int index = chapterParamList.Count - 1; index >= 0; --index)
            {
                if ((string)GlobalVars.SelectedSection != chapterParamList[index].section)
                {
                    chapterParamList.RemoveAt(index);
                }
            }
            if (!string.IsNullOrEmpty((string)GlobalVars.SelectedChapter))
            {
                chapterParam = instance.FindArea((string)GlobalVars.SelectedChapter);
                for (int index = chapterParamList.Count - 1; index >= 0; --index)
                {
                    if (chapterParamList[index].parent == null || chapterParamList[index].parent.iname != (string)GlobalVars.SelectedChapter)
                    {
                        chapterParamList.RemoveAt(index);
                    }
                }
            }
            else
            {
                for (int index = chapterParamList.Count - 1; index >= 0; --index)
                {
                    if (chapterParamList[index].parent != null)
                    {
                        chapterParamList.RemoveAt(index);
                    }
                }
            }
            for (int index = chapterParamList.Count - 1; index >= 0; --index)
            {
                if (!this.ChapterContainsPlayableQuest(chapterParamList[index], chapters, availableQuests, serverTime))
                {
                    chapterParamList.RemoveAt(index);
                }
            }
            List <TowerParam> towerParamList = new List <TowerParam>();

            foreach (TowerParam tower in instance.Towers)
            {
                bool flag = false;
                for (int index = 0; index < availableQuests.Length; ++index)
                {
                    if (availableQuests[index].type == QuestTypes.Tower && availableQuests[index].IsDateUnlock(serverTime))
                    {
                        flag = true;
                        break;
                    }
                }
                if (flag && (string.IsNullOrEmpty((string)GlobalVars.SelectedSection) || "WD_DAILY" == (string)GlobalVars.SelectedSection))
                {
                    towerParamList.Add(tower);
                }
            }
            if (this.Descending)
            {
                chapterParamList.Reverse();
            }
            for (int index = 0; index < towerParamList.Count; ++index)
            {
                TowerParam     data            = towerParamList[index];
                ListItemEvents listItemEvents1 = (ListItemEvents)null;
                if (!string.IsNullOrEmpty(data.prefabPath))
                {
                    StringBuilder stringBuilder = GameUtility.GetStringBuilder();
                    stringBuilder.Append("QuestChapters/");
                    stringBuilder.Append(data.prefabPath);
                    listItemEvents1 = AssetManager.Load <ListItemEvents>(stringBuilder.ToString());
                }
                if (Object.op_Equality((Object)listItemEvents1, (Object)null))
                {
                    listItemEvents1 = this.ItemTemplate;
                }
                QuestParam quest = MonoSingleton <GameManager> .Instance.FindQuest(data.iname);

                ListItemEvents listItemEvents2 = (ListItemEvents)Object.Instantiate <ListItemEvents>((M0)listItemEvents1);
                DataSource.Bind <TowerParam>(((Component)listItemEvents2).get_gameObject(), data);
                DataSource.Bind <QuestParam>(((Component)listItemEvents2).get_gameObject(), quest);
                ((Component)listItemEvents2).get_transform().SetParent(this.ItemContainer.get_transform(), false);
                ((Component)listItemEvents2).get_gameObject().SetActive(true);
                listItemEvents2.OnSelect = new ListItemEvents.ListItemEvent(this.OnTowerSelect);
                this.mItems.Add(listItemEvents2);
            }
            int num = 0;

            for (int index1 = 0; index1 < chapterParamList.Count; ++index1)
            {
                ChapterParam   data            = chapterParamList[index1];
                ListItemEvents listItemEvents1 = (ListItemEvents)null;
                if (!string.IsNullOrEmpty(data.prefabPath))
                {
                    StringBuilder stringBuilder = GameUtility.GetStringBuilder();
                    stringBuilder.Append("QuestChapters/");
                    stringBuilder.Append(data.prefabPath);
                    listItemEvents1 = AssetManager.Load <ListItemEvents>(stringBuilder.ToString());
                }
                if (Object.op_Equality((Object)listItemEvents1, (Object)null))
                {
                    listItemEvents1 = this.ItemTemplate;
                }
                ListItemEvents listItemEvents2 = (ListItemEvents)Object.Instantiate <ListItemEvents>((M0)listItemEvents1);
                DataSource.Bind <ChapterParam>(((Component)listItemEvents2).get_gameObject(), data);
                int total     = 0;
                int completed = 0;
                foreach (QuestParam availableQuest in MonoSingleton <GameManager> .Instance.Player.AvailableQuests)
                {
                    if (!(availableQuest.ChapterID != data.iname) && availableQuest.bonusObjective != null)
                    {
                        if (availableQuest.difficulty == QuestDifficulties.Elite)
                        {
                            ++num;
                        }
                        if (availableQuest.difficulty == GlobalVars.QuestDifficulty)
                        {
                            total += availableQuest.bonusObjective.Length;
                            for (int index2 = 0; index2 < availableQuest.bonusObjective.Length; ++index2)
                            {
                                if ((availableQuest.clear_missions & 1 << index2) != 0)
                                {
                                    ++completed;
                                }
                            }
                        }
                    }
                }
                SGChapterItem component = (SGChapterItem)((Component)listItemEvents2).GetComponent <SGChapterItem>();
                if (Object.op_Inequality((Object)component, (Object)null))
                {
                    component.SetProgress(total, completed);
                }
                ((Component)listItemEvents2).get_transform().SetParent(this.ItemContainer.get_transform(), false);
                ((Component)listItemEvents2).get_gameObject().SetActive(true);
                listItemEvents2.OnSelect = new ListItemEvents.ListItemEvent(this.OnNodeSelect);
                this.mItems.Add(listItemEvents2);
            }
            if (Object.op_Inequality((Object)this.BackButton, (Object)null))
            {
                if (chapterParam != null)
                {
                    this.BackButton.SetActive(true);
                }
                else if (!string.IsNullOrEmpty((string)GlobalVars.SelectedSection))
                {
                    this.BackButton.SetActive(!this.IsSectionHidden((string)GlobalVars.SelectedSection));
                }
            }
            FlowNode_GameObject.ActivateOutputLinks((Component)this, 50);
        }
Ejemplo n.º 22
0
 private void GroupSkillMaxPowerUpAnimCallBack()
 {
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 114);
 }
Ejemplo n.º 23
0
 private void ActivateOutputLinks(int pinID)
 {
     FlowNode_GameObject.ActivateOutputLinks((Component)this, pinID);
 }
Ejemplo n.º 24
0
 private void TrustMasterAnimCallBack()
 {
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 111);
 }
Ejemplo n.º 25
0
 private void OnCancel()
 {
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 100);
 }
Ejemplo n.º 26
0
        private void Start()
        {
            PlayerData player = MonoSingleton <GameManager> .Instance.Player;

            GlobalVars.PartyUploadFinished = false;
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UnitListItem, (UnityEngine.Object)null))
            {
                this.UnitListItem.SetActive(false);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TreasureListItem, (UnityEngine.Object)null))
            {
                this.TreasureListItem.SetActive(false);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TreasureListUnit, (UnityEngine.Object)null))
            {
                this.TreasureListUnit.SetActive(false);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TreasureListArtifact, (UnityEngine.Object)null))
            {
                this.TreasureListArtifact.SetActive(false);
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.Prefab_NewItemBadge, (UnityEngine.Object)null) && this.Prefab_NewItemBadge.get_gameObject().get_activeInHierarchy())
            {
                this.Prefab_NewItemBadge.SetActive(false);
            }
            SceneBattle instance = SceneBattle.Instance;

            GameUtility.DestroyGameObjects(this.mUnitListItems);
            GameUtility.DestroyGameObjects(this.mTreasureListItems);
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object)instance, (UnityEngine.Object)null) && instance.ResultData != null)
            {
                this.mCurrentQuest = MonoSingleton <GameManager> .Instance.FindQuest(instance.Battle.QuestID);

                DataSource.Bind <QuestParam>(((Component)this).get_gameObject(), this.mCurrentQuest);
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.RetryButton, (UnityEngine.Object)null))
                {
                    this.RetryButton.SetActive((long)new TimeSpan(TimeManager.ServerTime.Ticks).Days <= (long)new TimeSpan(player.LoginDate.Ticks).Days&& this.mCurrentQuest.type != QuestTypes.Tutorial && !this.mCurrentQuest.IsCharacterQuest());
                    if (this.mCurrentQuest.GetChallangeCount() >= this.mCurrentQuest.GetChallangeLimit() && this.mCurrentQuest.GetChallangeLimit() > 0)
                    {
                        ((Selectable)this.RetryButton.GetComponent <Button>()).set_interactable(false);
                    }
                }
                if (this.mCurrentQuest.type == QuestTypes.Tutorial && UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TeamUploadButton, (UnityEngine.Object)null))
                {
                    ((Selectable)this.TeamUploadButton).set_interactable(false);
                }
                this.mResultData = instance.ResultData;
                this.mQuestName  = this.mCurrentQuest.iname;
                if (instance.IsPlayingArenaQuest)
                {
                    this.mResultData.Record.playerexp = (OInt)GlobalVars.ResultArenaBattleResponse.got_pexp;
                    this.mResultData.Record.gold      = (OInt)GlobalVars.ResultArenaBattleResponse.got_gold;
                    this.mResultData.Record.unitexp   = (OInt)GlobalVars.ResultArenaBattleResponse.got_uexp;
                    if (UnityEngine.Object.op_Implicit((UnityEngine.Object) this.GoArenaResultWin))
                    {
                        this.GoArenaResultWin.SetActive(this.mResultData.Record.result == BattleCore.QuestResult.Win);
                    }
                    if (UnityEngine.Object.op_Implicit((UnityEngine.Object) this.GoArenaResultLose))
                    {
                        this.GoArenaResultLose.SetActive(this.mResultData.Record.result != BattleCore.QuestResult.Win);
                    }
                    if (instance.IsArenaRankupInfo())
                    {
                        MonoSingleton <GameManager> .Instance.Player.UpdateArenaRankTrophyStates(GlobalVars.ResultArenaBattleResponse.new_rank, GlobalVars.ResultArenaBattleResponse.new_rank);
                    }
                    else
                    {
                        MonoSingleton <GameManager> .Instance.Player.UpdateArenaRankTrophyStates(GlobalVars.ResultArenaBattleResponse.new_rank, MonoSingleton <GameManager> .Instance.Player.ArenaRankBest);
                    }
                }
                bool isMultiTower = instance.Battle.IsMultiTower;
                bool isMultiPlay  = instance.Battle.IsMultiPlay;
                for (int index = 0; index < instance.Battle.Units.Count; ++index)
                {
                    Unit unit = instance.Battle.Units[index];
                    if ((isMultiTower || !isMultiPlay || unit.OwnerPlayerIndex == instance.Battle.MyPlayerIndex) && (player.FindUnitDataByUniqueID(unit.UnitData.UniqueID) != null || isMultiTower && unit.Side == EUnitSide.Player))
                    {
                        UnitData unitData = new UnitData();
                        unitData.Setup(unit.UnitData);
                        this.mUnits.Add(unitData);
                        this.mMultiTowerUnitsId.Add(unit.OwnerPlayerIndex);
                    }
                }
                if (instance.IsArenaRankupInfo())
                {
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 40);
                }
            }
            DataSource.Bind <BattleCore.Record>(((Component)this).get_gameObject(), this.mResultData.Record);
            if (this.mResultData != null)
            {
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TreasureListItem, (UnityEngine.Object)null))
                {
                    Transform parent = !UnityEngine.Object.op_Inequality((UnityEngine.Object) this.TreasureList, (UnityEngine.Object)null) ? this.TreasureListItem.get_transform().get_parent() : this.TreasureList.get_transform();
                    List <QuestResult.DropItemData> items = new List <QuestResult.DropItemData>();
                    for (int index1 = 0; index1 < this.mResultData.Record.items.Count; ++index1)
                    {
                        bool flag = false;
                        for (int index2 = 0; index2 < items.Count; ++index2)
                        {
                            if (items[index2].Param == this.mResultData.Record.items[index1].mItemParam && items[index2].mIsSecret == this.mResultData.Record.items[index1].mIsSecret)
                            {
                                items[index2].Gain(1);
                                flag = true;
                                break;
                            }
                        }
                        if (!flag)
                        {
                            ItemData itemDataByItemParam          = player.FindItemDataByItemParam(this.mResultData.Record.items[index1].mItemParam);
                            QuestResult.DropItemData dropItemData = new QuestResult.DropItemData();
                            dropItemData.Setup(0L, this.mResultData.Record.items[index1].mItemParam.iname, 1);
                            dropItemData.mIsSecret = this.mResultData.Record.items[index1].mIsSecret;
                            if (this.mResultData.Record.items[index1].mItemParam.type != EItemType.Unit)
                            {
                                dropItemData.IsNew = !player.ItemEntryExists(this.mResultData.Record.items[index1].mItemParam.iname) || (itemDataByItemParam == null || itemDataByItemParam.IsNew);
                            }
                            else
                            {
                                // ISSUE: object of a compiler-generated type is created
                                // ISSUE: reference to a compiler-generated method
                                dropItemData.IsNew = this.mResultData.GetUnits.Params.FindIndex(new Predicate <UnitGetParam.Set>(new QuestResult.\u003CStart\u003Ec__AnonStorey36F()
                                {
                                    iid = this.mResultData.Record.items[index1].mItemParam.iname
                                }.\u003C\u003Em__3F2)) != -1;
                            }
                            items.Add(dropItemData);
                        }
                    }
                    this.CreateItemObject(items, parent);
                    this.CreateArtifactObjects(parent);
                }
                this.ApplyQuestCampaignParams(instance.Battle.QuestCampaignIds);
                if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.UnitListItem, (UnityEngine.Object)null))
                {
                    if (instance.Battle.IsMultiTower)
                    {
                        this.AddExpPlayerMultiTower();
                    }
                    else
                    {
                        this.AddExpPlayer();
                    }
                }
                GlobalVars.PlayerExpOld.Set(this.mResultData.StartExp);
                GlobalVars.PlayerExpNew.Set(this.mResultData.StartExp + (int)this.mResultData.Record.playerexp);
                GlobalVars.PlayerLevelChanged.Set(player.Lv != PlayerData.CalcLevelFromExp(this.mResultData.StartExp));
                this.RefreshQuestMissionReward();
                if (!string.IsNullOrEmpty(this.Star_ClearTrigger))
                {
                    for (int index = 0; index < this.mObjectiveStars.Count; ++index)
                    {
                        if ((this.mCurrentQuest.clear_missions & 1 << index) != 0)
                        {
                            GameUtility.SetAnimatorTrigger(this.mObjectiveStars[index], this.Star_ClearTrigger);
                        }
                    }
                }
                player.OnGoldChange((int)this.mResultData.Record.gold);
                if ((int)this.mResultData.Record.gold > 0)
                {
                    AnalyticsManager.TrackNonPremiumCurrencyObtain(AnalyticsManager.NonPremiumCurrencyType.Zeni, (long)(int)this.mResultData.Record.gold, "Quests", (string)null);
                }
            }
            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.StarKakuninButton, (UnityEngine.Object)null))
            {
                // ISSUE: method pointer
                ((UnityEvent)this.StarKakuninButton.get_onClick()).AddListener(new UnityAction((object)this, __methodptr(OnStarKakuninButtonClick)));
                this.mContinueStarAnimation = false;
            }
            GlobalVars.CreateAutoMultiTower = false;
            GlobalVars.InvtationSameUser    = false;
            if (!UnityEngine.Object.op_Inequality((UnityEngine.Object) this.ResultSkipButton, (UnityEngine.Object)null))
            {
                return;
            }
            ((Component)this.ResultSkipButton).get_gameObject().SetActive(false);
        }
Ejemplo n.º 27
0
        private void GotoShop(TrophyParam trophy)
        {
            PlayerData player = MonoSingleton <GameManager> .Instance.Player;
            EShopType  type   = EShopType.Normal;

            if (!string.IsNullOrEmpty(trophy.Objectives[0].sval_base))
            {
                char[] chArray = new char[1] {
                    ','
                };
                string[] strArray = trophy.Objectives[0].sval_base.Split(chArray);
                type = !string.IsNullOrEmpty(strArray[0]) ? (EShopType)MonoSingleton <GameManager> .Instance.MasterParam.GetShopType(strArray[0]) : EShopType.Normal;
            }
            if (type >= EShopType.Normal && player.CheckUnlockShopType(type))
            {
                switch (type)
                {
                case EShopType.Normal:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1013);
                    break;

                case EShopType.Tabi:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1014);
                    break;

                case EShopType.Kimagure:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1015);
                    break;

                case EShopType.Monozuki:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1016);
                    break;

                case EShopType.Tour:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1017);
                    break;

                case EShopType.Arena:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1018);
                    break;

                case EShopType.Multi:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1019);
                    break;

                case EShopType.AwakePiece:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1020);
                    break;

                case EShopType.Artifact:
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 1021);
                    break;
                }
            }
            if (type < EShopType.Normal)
            {
                return;
            }
            if (MonoSingleton <GameManager> .Instance.Player.CheckUnlockShopType(type))
            {
                return;
            }
            try
            {
                UnlockTargets unlockTargets = type.ToUnlockTargets();
                LevelLock.ShowLockMessage(player.Lv, player.VipRank, unlockTargets);
            }
            catch (Exception ex)
            {
            }
        }
Ejemplo n.º 28
0
 private void OnCreateAllClick(SRPG_Button button)
 {
     GlobalVars.SelectedCreateItemID = DataSource.FindDataOfClass <ItemParam>(((Component)this.SelectedItem).get_gameObject(), (ItemParam)null).iname;
     FlowNode_GameObject.ActivateOutputLinks((Component)this, 103);
 }
Ejemplo n.º 29
0
        private void OpenNewPage(TrophyParam rootTrophy, bool doInitialize)
        {
            if (rootTrophy == null)
            {
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 103);
            }
            else
            {
                TrophyParam[] childeTrophies = ChallengeMission.GetChildeTrophies(rootTrophy);
                if (childeTrophies.Length != this.Items.Count)
                {
                    FlowNode_GameObject.ActivateOutputLinks((Component)this, 103);
                }
                else
                {
                    ((Component)this.Shadow).get_gameObject().SetActive(false);
                    bool flag1 = false;
                    bool flag2 = true;
                    for (int index = 0; index < this.Items.Count; ++index)
                    {
                        // ISSUE: object of a compiler-generated type is created
                        // ISSUE: variable of a compiler-generated type
                        ChallengeMission.\u003COpenNewPage\u003Ec__AnonStorey30C pageCAnonStorey30C = new ChallengeMission.\u003COpenNewPage\u003Ec__AnonStorey30C();
                        // ISSUE: reference to a compiler-generated field
                        pageCAnonStorey30C.\u003C\u003Ef__this = this;
                        // ISSUE: reference to a compiler-generated field
                        pageCAnonStorey30C.trophy = childeTrophies[index];
                        // ISSUE: reference to a compiler-generated field
                        TrophyState trophyCounter = ChallengeMission.GetTrophyCounter(pageCAnonStorey30C.trophy);
                        if (!trophyCounter.IsEnded)
                        {
                            flag2 = false;
                            if (trophyCounter.IsCompleted)
                            {
                                flag1 = true;
                            }
                        }
                        // ISSUE: method pointer
                        this.Items[index].OnClick = new UnityAction((object)pageCAnonStorey30C, __methodptr(\u003C\u003Em__2A7));
                        // ISSUE: reference to a compiler-generated field
                        DataSource.Bind <TrophyParam>(((Component)this.Items[index]).get_gameObject(), pageCAnonStorey30C.trophy);
                        ItemParam data = (ItemParam)null;
                        // ISSUE: reference to a compiler-generated field
                        if (pageCAnonStorey30C.trophy.Coin != 0)
                        {
                            data = MonoSingleton <GameManager> .Instance.GetItemParam("$COIN");
                        }
                        else
                        {
                            // ISSUE: reference to a compiler-generated field
                            // ISSUE: reference to a compiler-generated field
                            if (pageCAnonStorey30C.trophy.Items != null && pageCAnonStorey30C.trophy.Items.Length > 0)
                            {
                                // ISSUE: reference to a compiler-generated field
                                data = MonoSingleton <GameManager> .Instance.GetItemParam(pageCAnonStorey30C.trophy.Items[0].iname);
                            }
                        }
                        if (data != null)
                        {
                            DataSource.Bind <ItemParam>(((Component)this.Items[index]).get_gameObject(), data);
                        }
                        this.Items[index].Refresh();
                    }
                    ((Component)this.CompleteBadge).get_gameObject().SetActive(flag2);
                    if (!flag2 && !doInitialize)
                    {
                        return;
                    }
                    TrophyState trophyCounter1 = ChallengeMission.GetTrophyCounter(rootTrophy);
                    if (this.UseCharMessage && UnityEngine.Object.op_Inequality((UnityEngine.Object) this.MessageText, (UnityEngine.Object)null) && !trophyCounter1.IsEnded)
                    {
                        string str1 = (string)null;
                        if (flag1)
                        {
                            str1 = LocalizedText.Get("sys.CHALLENGE_MSG_CLEAR");
                        }
                        else if (PlayerPrefsUtility.GetInt(PlayerPrefsUtility.CHALLENGEMISSION_HAS_SHOW_MESSAGE, 0) == 0)
                        {
                            string str2 = string.Empty;
                            if (rootTrophy.Gold != 0)
                            {
                                str2 = string.Format(LocalizedText.Get("sys.CHALLENGE_REWARD_GOLD"), (object)rootTrophy.Gold);
                            }
                            else if (rootTrophy.Exp != 0)
                            {
                                str2 = string.Format(LocalizedText.Get("sys.CHALLENGE_REWARD_EXP"), (object)rootTrophy.Exp);
                            }
                            else if (rootTrophy.Coin != 0)
                            {
                                str2 = string.Format(LocalizedText.Get("sys.CHALLENGE_REWARD_COIN"), (object)rootTrophy.Coin);
                            }
                            else if (rootTrophy.Stamina != 0)
                            {
                                str2 = string.Format(LocalizedText.Get("sys.CHALLENGE_REWARD_STAMINA"), (object)rootTrophy.Stamina);
                            }
                            else if (rootTrophy.Items != null && rootTrophy.Items.Length > 0)
                            {
                                ItemParam itemParam = MonoSingleton <GameManager> .Instance.GetItemParam(rootTrophy.Items[0].iname);

                                if (itemParam != null)
                                {
                                    if (itemParam.type == EItemType.Unit)
                                    {
                                        UnitParam unitParam = MonoSingleton <GameManager> .Instance.GetUnitParam(itemParam.iname);

                                        if (unitParam != null)
                                        {
                                            str2 = LocalizedText.Get("sys.CHALLENGE_DETAIL_REWARD_UNIT", (object)((int)unitParam.rare + 1), (object)unitParam.name);
                                        }
                                    }
                                    else
                                    {
                                        str2 = LocalizedText.Get("sys.CHALLENGE_REWARD_ITEM", (object)itemParam.name, (object)rootTrophy.Items[0].Num);
                                    }
                                }
                            }
                            str1 = LocalizedText.Get("sys.CHALLENGE_MSG_INFO", new object[1]
                            {
                                (object)str2
                            });
                            PlayerPrefsUtility.SetInt(PlayerPrefsUtility.CHALLENGEMISSION_HAS_SHOW_MESSAGE, 1, false);
                        }
                        if (str1 != null)
                        {
                            this.MessageText.set_text(str1);
                            if (UnityEngine.Object.op_Inequality((UnityEngine.Object) this.CharMessageWindow, (UnityEngine.Object)null))
                            {
                                this.ResetMessageCloseCoroutine();
                                this.CharMessageWindow.SetActive(true);
                                this.StartMessageCloseCoroutine();
                            }
                        }
                    }
                    if (!flag2 || trophyCounter1.IsEnded)
                    {
                        return;
                    }
                    MonoSingleton <GameManager> .GetInstanceDirect().Player.OnChallengeMissionComplete(rootTrophy.iname);

                    GlobalVars.SelectedChallengeMissionTrophy = rootTrophy.iname;
                    GlobalVars.SelectedTrophy.Set(rootTrophy.iname);
                    PlayerPrefsUtility.SetInt(PlayerPrefsUtility.CHALLENGEMISSION_HAS_SHOW_MESSAGE, 0, false);
                    if (rootTrophy.iname == "CHALLENGE_02")
                    {
                        FlowNode_GameObject.ActivateOutputLinks((Component)this, 104);
                    }
                    else
                    {
                        FlowNode_GameObject.ActivateOutputLinks((Component)this, 102);
                    }
                }
            }
        }
Ejemplo n.º 30
0
        private void Start()
        {
            GameManager instance = MonoSingleton <GameManager> .Instance;

            Json_LoginBonus[] jsonLoginBonusArray = instance.Player.FindLoginBonuses(this.TableID);
            this.mLoginBonusCount = instance.Player.LoginCountWithType(this.TableID);
            ItemData itemData1 = (ItemData)null;
            ItemData itemData2 = (ItemData)null;
            bool     flag1     = false;

            if (this.DebugItems != null && this.DebugItems.Length > 0)
            {
                jsonLoginBonusArray   = this.DebugItems;
                this.mLoginBonusCount = this.DebugBonusCount;
            }
            if (jsonLoginBonusArray != null)
            {
                for (int index = 0; index < jsonLoginBonusArray.Length; ++index)
                {
                    string key = jsonLoginBonusArray[index].iname;
                    int    num = jsonLoginBonusArray[index].num;
                    if (string.IsNullOrEmpty(key) && jsonLoginBonusArray[index].coin > 0)
                    {
                        key = "$COIN";
                        num = jsonLoginBonusArray[index].coin;
                    }
                    if (!string.IsNullOrEmpty(key))
                    {
                        ItemParam itemParam = instance.GetItemParam(key);
                        if (itemParam != null)
                        {
                            LoginBonusData loginBonusData = new LoginBonusData();
                            loginBonusData.DayNum = index + 1;
                            if (index == this.mLoginBonusCount - 1)
                            {
                                itemData1 = (ItemData)loginBonusData;
                                if (jsonLoginBonusArray[index].vip != null && jsonLoginBonusArray[index].vip.lv > 0)
                                {
                                    flag1 = true;
                                }
                                if (loginBonusData != null && loginBonusData.Param != null)
                                {
                                    if (loginBonusData.Param.type == EItemType.Ticket)
                                    {
                                        AnalyticsManager.TrackNonPremiumCurrencyObtain(AnalyticsManager.NonPremiumCurrencyType.SummonTicket, (long)loginBonusData.Num, "Login Bonus", loginBonusData.ItemID);
                                    }
                                    else
                                    {
                                        AnalyticsManager.TrackNonPremiumCurrencyObtain(AnalyticsManager.NonPremiumCurrencyType.Item, (long)loginBonusData.Num, "Login Bonus", loginBonusData.ItemID);
                                    }
                                }
                                if (string.IsNullOrEmpty(key) && jsonLoginBonusArray[index].coin > 0)
                                {
                                    AnalyticsManager.TrackFreePremiumCurrencyObtain((long)jsonLoginBonusArray[index].coin, "Login Bonus");
                                }
                            }
                            else if (index == this.mLoginBonusCount)
                            {
                                itemData2 = (ItemData)loginBonusData;
                            }
                            if (loginBonusData.Setup(0L, itemParam, num))
                            {
                                ListItemEvents listItemEvents1 = index >= this.mLoginBonusCount - 1 ? this.Item_Normal : this.Item_Taken;
                                if (!Object.op_Equality((Object)listItemEvents1, (Object)null) && !Object.op_Equality((Object)this.ItemList, (Object)null))
                                {
                                    ListItemEvents listItemEvents2 = (ListItemEvents)Object.Instantiate <ListItemEvents>((M0)listItemEvents1);
                                    DataSource.Bind <ItemData>(((Component)listItemEvents2).get_gameObject(), (ItemData)loginBonusData);
                                    if (Object.op_Equality((Object)listItemEvents1, (Object)this.Item_Normal) && Object.op_Inequality((Object)this.VIPBadge, (Object)null) && (jsonLoginBonusArray[index].vip != null && jsonLoginBonusArray[index].vip.lv > 0))
                                    {
                                        LoginBonusVIPBadge loginBonusVipBadge = (LoginBonusVIPBadge)Object.Instantiate <LoginBonusVIPBadge>((M0)this.VIPBadge);
                                        if (Object.op_Inequality((Object)loginBonusVipBadge.VIPRank, (Object)null))
                                        {
                                            loginBonusVipBadge.VIPRank.set_text(jsonLoginBonusArray[index].vip.lv.ToString());
                                        }
                                        ((Component)loginBonusVipBadge).get_transform().SetParent(((Component)listItemEvents2).get_transform(), false);
                                        ((RectTransform)((Component)loginBonusVipBadge).get_transform()).set_anchoredPosition(Vector2.get_zero());
                                        ((Component)loginBonusVipBadge).get_gameObject().SetActive(true);
                                    }
                                    if (Object.op_Inequality((Object)this.TodayBadge, (Object)null) && index == this.mLoginBonusCount - 1)
                                    {
                                        ((Transform)this.TodayBadge).SetParent(((Component)listItemEvents2).get_transform(), false);
                                        this.TodayBadge.set_anchoredPosition(Vector2.get_zero());
                                        ((Component)this.TodayBadge).get_gameObject().SetActive(true);
                                    }
                                    else if (Object.op_Inequality((Object)this.TommorowBadge, (Object)null) && index == this.mLoginBonusCount)
                                    {
                                        ((Transform)this.TommorowBadge).SetParent(((Component)listItemEvents2).get_transform(), false);
                                        this.TommorowBadge.set_anchoredPosition(Vector2.get_zero());
                                        ((Component)this.TommorowBadge).get_gameObject().SetActive(true);
                                    }
                                    if (index < this.mLoginBonusCount - 1)
                                    {
                                        Transform child = ((Component)listItemEvents2).get_transform().FindChild(this.CheckName);
                                        if (Object.op_Inequality((Object)child, (Object)null))
                                        {
                                            Animator component = (Animator)((Component)child).GetComponent <Animator>();
                                            if (Object.op_Inequality((Object)component, (Object)null))
                                            {
                                                ((Behaviour)component).set_enabled(false);
                                            }
                                        }
                                    }
                                    Transform transform = this.ItemList.get_transform();
                                    if (this.PositionList != null && this.PositionList.Length > index && Object.op_Inequality((Object)this.PositionList[index], (Object)null))
                                    {
                                        transform = this.PositionList[index].get_transform();
                                    }
                                    if (index == 0)
                                    {
                                        this.DisableFirstDayHiddenOject(((Component)listItemEvents2).get_gameObject());
                                    }
                                    ((Component)listItemEvents2).get_transform().SetParent(transform, false);
                                    ((Component)listItemEvents2).get_gameObject().SetActive(true);
                                    this.mItems.Add(listItemEvents2);
                                }
                            }
                        }
                    }
                }
            }
            bool flag2 = instance.Player.IsLastLoginBonus(this.TableID);

            if (jsonLoginBonusArray != null && this.mLoginBonusCount == jsonLoginBonusArray.Length)
            {
                flag2 = true;
            }
            if (Object.op_Inequality((Object)this.Today, (Object)null) && itemData1 != null && itemData1.Param != null)
            {
                this.Today.set_text(this.MakeTodayText(itemData1));
            }
            if (Object.op_Inequality((Object)this.TodayItem, (Object)null))
            {
                DataSource.Bind <ItemData>(this.TodayItem.get_gameObject(), itemData1);
                GameParameter.UpdateAll(this.TodayItem);
            }
            if (Object.op_Inequality((Object)this.TommorowItem, (Object)null))
            {
                DataSource.Bind <ItemData>(this.TommorowItem.get_gameObject(), itemData2);
                GameParameter.UpdateAll(this.TommorowItem);
            }
            if (Object.op_Inequality((Object)this.Tommorow, (Object)null) && !flag2 && (itemData2 != null && itemData2.Param != null))
            {
                this.Tommorow.set_text(this.MakeTomorrowText(itemData1, itemData2));
            }
            else if (Object.op_Inequality((Object)this.TommorowRow, (Object)null))
            {
                this.Tommorow.set_text(this.MakeLastText());
            }
            if (Object.op_Inequality((Object)this.VIPBonusRow, (Object)null))
            {
                this.VIPBonusRow.SetActive(flag1);
            }
            if (flag2)
            {
                FlowNode_GameObject.ActivateOutputLinks((Component)this, 12);
            }
            this.StartCoroutine(this.WaitLoadAsync());
        }