private void SetArenaItem(Transform t, Network.EventData ev)
	{
		if ((int)MonoBehaviourSingleton<UserInfoManager>.I.userStatus.level < 50)
		{
			SetEvent(t, "SELECT_DISABLE_ARENA", ev);
			if (bannerTable.TryGetValue(10012201, out LoadObject value))
			{
				Texture2D val = value.loadedObject as Texture2D;
				if (val != null)
				{
					Transform t2 = FindCtrl(t, UI.TEX_EVENT_BANNER);
					SetActive(t2, true);
					SetTexture(t2, val);
					SetActive(t, UI.LBL_NO_BANNER, false);
				}
				else
				{
					SetActive(t, UI.TEX_EVENT_BANNER, false);
					SetActive(t, UI.LBL_NO_BANNER, true);
					string name = ev.name;
					SetLabelText(t, UI.LBL_NO_BANNER, name);
				}
			}
		}
		else
		{
			SetEvent(t, "SELECT_ARENA", ev);
			SetLabelText(t, UI.LBL_SUB_TITLE, ev.name);
			SetActive(t, UI.LBL_SUB_TITLE, true);
		}
	}
 public override void Initialize()
 {
     object[] array = (object[])GameSection.GetEventData();
     eventData = (array[0] as Network.EventData);
     myRank    = (int)array[1];
     nowPage   = 0;
     FollowListBaseInitialize();
 }
示例#3
0
 public override void Initialize()
 {
     //IL_002e: Unknown result type (might be due to invalid IL or missing references)
     object[] array = (object[])GameSection.GetEventData();
     eventData = (array[0] as Network.EventData);
     userId    = (int)array[1];
     this.StartCoroutine(DoInitialize());
 }
示例#4
0
 protected void UpdateEventList()
 {
     RemoveEndedEvents();
     if (eventList == null || eventList.Count == 0)
     {
         SetActive((Enum)UI.STR_EVENT_NON_LIST, true);
     }
     else
     {
         SetActive((Enum)UI.STR_EVENT_NON_LIST, false);
         SetDynamicList((Enum)UI.GRD_EVENT_QUEST, "QuestEventListSelectItem", eventList.Count, false, (Func <int, bool>) null, (Func <int, Transform, Transform>) null, (Action <int, Transform, bool>) delegate(int i, Transform t, bool is_recycle)
         {
             Network.EventData eventData = eventList[i];
             Texture2D val = null;
             if (bannerTable.TryGetValue(eventData.bannerId, out LoadObject value))
             {
                 val = (value.loadedObject as Texture2D);
                 if (val != null)
                 {
                     Transform t2 = FindCtrl(t, UI.TEX_EVENT_BANNER);
                     SetActive(t2, true);
                     SetTexture(t2, val);
                     SetActive(t, UI.LBL_NO_BANNER, false);
                 }
                 else
                 {
                     SetActive(t, UI.TEX_EVENT_BANNER, false);
                     SetActive(t, UI.LBL_NO_BANNER, true);
                     string name = eventData.name;
                     SetLabelText(t, UI.LBL_NO_BANNER, name);
                 }
             }
             if (!string.IsNullOrEmpty(eventData.endDate.date))
             {
                 Transform t3 = FindCtrl(t, UI.LBL_LEFT);
                 SetActive(t3, true);
                 SetLabelText(t3, StringTable.Get(STRING_CATEGORY.TIME, 4u));
                 t3 = FindCtrl(t, UI.LBL_LEFT_TIME);
                 SetActive(t3, true);
                 SetLabelText(t3, UIUtility.TimeFormatWithUnit(eventData.GetRest()));
             }
             else
             {
                 SetActive(t, UI.LBL_LEFT, false);
                 SetActive(t, UI.LBL_LEFT_TIME, false);
             }
             SetEvent(t, "SELECT_EXPLORE", eventData);
             Version nativeVersionFromName = NetworkNative.getNativeVersionFromName();
             bool flag       = eventData.IsPlayableWith(nativeVersionFromName);
             bool flag2      = IsClearedEvent(eventData) && flag;
             bool is_visible = !flag2 && !eventData.readPrologueStory;
             SetActive(t, UI.SPR_NEW, is_visible);
             SetActive(t, UI.SPR_CLEARED, flag2);
             SetBadge(FindCtrl(t, UI.TEX_EVENT_BANNER), MonoBehaviourSingleton <DeliveryManager> .I.GetCompletableEventDeliveryNum(eventData.eventId), 1, 16, -3, false);
         });
     }
 }
    private void InitCardData(int index, Network.EventData eventData)
    {
        CardData cardData = new CardData();

        cardData.eventData = eventData;
        cardDataList.Add(cardData);
        InitCard(index);
        RefreshMissionData(index);
    }
    private IEnumerator WaitAndStartNotPlayable(Network.EventData eventData)
    {
        if (!MonoBehaviourSingleton <GameSceneManager> .I.IsEventExecutionPossible())
        {
            yield return((object)null);
        }
        string message = string.Format(base.sectionData.GetText("REQUIRE_HIGHER_VERSION"), eventData.minVersion);

        DispatchEvent("SELECT_VERSION", message);
    }
	private IEnumerator DoInitialize()
	{
		bool is_recv_delivery = false;
		MonoBehaviourSingleton<QuestManager>.I.SendGetEventList(delegate
		{
			((_003CDoInitialize_003Ec__IteratorBB)/*Error near IL_0035: stateMachine*/)._003Cis_recv_delivery_003E__0 = true;
		});
		while (!is_recv_delivery)
		{
			yield return (object)null;
		}
		if (isInGame)
		{
			eventList = new List<Network.EventData>(MonoBehaviourSingleton<QuestManager>.I.eventList.Count);
			List<Network.EventData> allEventList = new List<Network.EventData>(MonoBehaviourSingleton<QuestManager>.I.eventList);
			for (int j = 0; j < allEventList.Count; j++)
			{
				if (allEventList[j].eventType != 4 && allEventList[j].eventType != 12 && allEventList[j].eventType != 15)
				{
					eventList.Add(allEventList[j]);
				}
			}
		}
		else
		{
			eventList = new List<Network.EventData>(MonoBehaviourSingleton<QuestManager>.I.eventList);
		}
		RemoveEndedEvents();
		LoadingQueue loadingQueue = new LoadingQueue(this);
		bannerTable = new Dictionary<int, LoadObject>(eventList.Count);
		exploreClearedMap = new Dictionary<int, bool>();
		for (int i = 0; i < eventList.Count; i++)
		{
			Network.EventData e = eventList[i];
			if (!bannerTable.ContainsKey(e.bannerId))
			{
				string bannerImg = ResourceName.GetEventBanner(e.bannerId);
				LoadObject obj = loadingQueue.Load(RESOURCE_CATEGORY.EVENT_ICON, bannerImg, false);
				bannerTable.Add(e.bannerId, obj);
				if (e.eventType == 15 && (int)MonoBehaviourSingleton<UserInfoManager>.I.userStatus.level < 50)
				{
					LoadDisableArenaBanner(loadingQueue);
				}
				if (e.eventType == 4)
				{
					yield return (object)this.StartCoroutine(GetExplorePoint(e.eventId));
				}
			}
		}
		if (loadingQueue.IsLoading())
		{
			yield return (object)loadingQueue.Wait();
		}
		base.Initialize();
	}
    public override void Initialize()
    {
        eventData = (GameSection.GetEventData() as Network.EventData);
        SkipTween((Enum)UI.SPR_DELIVERY_BTN_SELECTED, true, 0);
        SetActive((Enum)UI.OBJ_DELIVERY_ROOT, true);
        int width = GetWidth(UI.WGT_LOCATION_NAME_LIMIT);

        title       = new LabelWidthLimitter(GetCtrl(UI.LBL_LOCATION_NAME).GetComponent <UILabel>(), width, false);
        titleEffect = new LabelWidthLimitter(GetCtrl(UI.LBL_LOCATION_NAME_EFFECT).GetComponent <UILabel>(), width, true);
        base.Initialize();
    }
	private void OnQuery_SELECT_ARENA()
	{
		Network.EventData ev = GameSection.GetEventData() as Network.EventData;
		if (ev != null)
		{
			if (ev.HasEndDate() && ev.GetRest() < 0)
			{
				GameSection.ChangeEvent("SELECT_ENDED", null);
			}
			else
			{
				Version nativeVersionFromName = NetworkNative.getNativeVersionFromName();
				if (!ev.IsPlayableWith(nativeVersionFromName))
				{
					string event_data = string.Format(base.sectionData.GetText("REQUIRE_HIGHER_VERSION"), ev.minVersion);
					GameSection.ChangeEvent("SELECT_VERSION", event_data);
				}
				else if (!ev.readPrologueStory)
				{
					GameSection.StayEvent();
					MonoBehaviourSingleton<QuestManager>.I.SendQuestReadEventStory(ev.eventId, delegate(bool success, Error error)
					{
						if (success)
						{
							if (ev.prologueStoryId > 0)
							{
								GameSceneTables.EventData eventData = base.sectionData.GetEventData("STORY");
								if (eventData != null)
								{
									string name = (!MonoBehaviourSingleton<LoungeMatchingManager>.I.IsInLounge()) ? "MAIN_MENU_HOME" : "MAIN_MENU_LOUNGE";
									EventData[] array = new EventData[3]
									{
										new EventData(name, null),
										new EventData("TO_EVENT", null),
										new EventData("SELECT_ARENA", ev)
									};
									GameSection.ChangeStayEvent("STORY", new object[4]
									{
										ev.prologueStoryId,
										string.Empty,
										string.Empty,
										array
									});
								}
							}
							ev.readPrologueStory = true;
						}
						GameSection.ResumeEvent(true, null);
					});
				}
			}
		}
	}
	private bool IsClearedEvent(Network.EventData eventData)
	{
		if (eventData.eventType == 4)
		{
			bool value = false;
			exploreClearedMap.TryGetValue(eventData.eventId, out value);
			if (value)
			{
				return MonoBehaviourSingleton<DeliveryManager>.I.IsAllClearedEvent(eventData.eventId);
			}
			return false;
		}
		return MonoBehaviourSingleton<DeliveryManager>.I.IsAllClearedEvent(eventData.eventId);
	}
 private void SetArenaName(Network.EventData nameEventData)
 {
     if (nameEventData == null)
     {
         SetLabelText((Enum)UI.LBL_ARENA_NAME, string.Empty);
         SetLabelText((Enum)UI.LBL_END_DATE, string.Empty);
     }
     else
     {
         SetLabelText((Enum)UI.LBL_ARENA_NAME, nameEventData.name);
         string endDateString = QuestUtility.GetEndDateString(nameEventData);
         SetLabelText((Enum)UI.LBL_END_DATE, endDateString);
     }
 }
    public override void Initialize()
    {
        base.Initialize();
        List <Network.EventData> eventList = MonoBehaviourSingleton <QuestManager> .I.eventList;

        foreach (Network.EventData item in eventList)
        {
            if (item.eventId == info.eventID)
            {
                eventData = item;
                break;
            }
        }
    }
示例#13
0
    private IEnumerator DoInitialize()
    {
        bool is_recv_delivery = false;

        MonoBehaviourSingleton <QuestManager> .I.SendGetExploreList(delegate
        {
            ((_003CDoInitialize_003Ec__IteratorFC) /*Error near IL_0031: stateMachine*/)._003Cis_recv_delivery_003E__0 = true;
        });

        while (!is_recv_delivery)
        {
            yield return((object)null);
        }
        List <Network.EventData> allEventList = new List <Network.EventData>(MonoBehaviourSingleton <QuestManager> .I.eventList);

        eventList = new List <Network.EventData>();
        for (int k = 0; k < allEventList.Count; k++)
        {
            if (allEventList[k].eventType == 4)
            {
                eventList.Add(allEventList[k]);
            }
        }
        for (int j = 0; j < allEventList.Count; j++)
        {
            if (allEventList[j].eventType == 12)
            {
                eventList.Add(allEventList[j]);
            }
        }
        RemoveEndedEvents();
        LoadingQueue loadingQueue = new LoadingQueue(this);

        bannerTable = new Dictionary <int, LoadObject>(eventList.Count);
        for (int i = 0; i < eventList.Count; i++)
        {
            Network.EventData e = eventList[i];
            if (!bannerTable.ContainsKey(e.bannerId))
            {
                string     bannerImg = ResourceName.GetEventBanner(e.bannerId);
                LoadObject obj       = loadingQueue.Load(RESOURCE_CATEGORY.EVENT_ICON, bannerImg, false);
                bannerTable.Add(e.bannerId, obj);
            }
        }
        if (loadingQueue.IsLoading())
        {
            yield return((object)loadingQueue.Wait());
        }
        base.Initialize();
    }
 public override void Initialize()
 {
     object[] array = GameSection.GetEventData() as object[];
     deliveryData = (array[0] as DeliveryTable.DeliveryData);
     eventData    = (array[1] as Network.EventData);
     base.Initialize();
     texModel_ = Utility.Find(base._transform, "TEX_MODEL");
     texModelRenderTexture_      = UIModelRenderTexture.Get(texModel_);
     texModelTexture_            = texModel_.GetComponent <UITexture>();
     texInnerModel_              = Utility.Find(base._transform, "TEX_INNER_MODEL");
     texInnerModelRenderTexture_ = UIModelRenderTexture.Get(texInnerModel_);
     texInnerModelTexture_       = texInnerModel_.GetComponent <UITexture>();
     glowModel_ = Utility.Find(base._transform, "LIB_00000003");
     SetLabelText((Enum)UI.LBL_TITLE, eventData.name);
 }
	public override EventData CheckAutoEvent(string event_name, object event_data)
	{
		if ((event_name == "SELECT" || event_name == "SELECT_EXPLORE" || event_name == "SELECT_RUSH") && event_data is int)
		{
			if (eventList != null)
			{
				int event_id = (int)event_data;
				Network.EventData eventData = eventList.Find((Network.EventData e) => e.eventId == event_id);
				if (eventData != null)
				{
					return new EventData(event_name, eventData);
				}
			}
			return new EventData("NONE", null);
		}
		return base.CheckAutoEvent(event_name, event_data);
	}
示例#16
0
    public override void Initialize()
    {
        //IL_007d: Unknown result type (might be due to invalid IL or missing references)
        object[] array = (object[])GameSection.GetEventData();
        friendCharaInfo = (array[0] as FriendCharaInfo);
        data            = (array[0] as CharaInfo);
        eventData       = (array[1] as Network.EventData);
        if (friendCharaInfo != null)
        {
            dataFollower  = friendCharaInfo.follower;
            dataFollowing = friendCharaInfo.following;
        }
        nowSectionName = MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSectionName();

        isFollowerList = Object.op_Implicit(Object.FindObjectOfType(typeof(FriendFollowerList)));
        InitializeBase();
    }
 private void OnQuery_RANKING()
 {
     Network.EventData eventData = GameSection.GetEventData() as Network.EventData;
     if (eventData == null)
     {
         EventData[] autoEvents = new EventData[2]
         {
             new EventData("RANK", null),
             new EventData("LAST", new object[2]
             {
                 "null",
                 -1
             })
         };
         MonoBehaviourSingleton <GameSceneManager> .I.SetAutoEvents(autoEvents);
     }
 }
    protected override void SendGetList(int nowPage, Action <bool> callback)
    {
        int isContaionSelf = isOwn ? 1 : 0;

        MonoBehaviourSingleton <FriendManager> .I.SendGetLastRanking(-1, isContaionSelf, delegate(bool is_success, ArenaLastRankingModel.Param recv_data)
        {
            if (is_success)
            {
                recvList        = ChangeData(CreateFriendCharaInfoList(recv_data.rankingDataList));
                rankingDataList = recv_data.rankingDataList;
                lastEventData   = recv_data.eventData;
                CacheLists(recvList, rankingDataList);
                SetArenaName(lastEventData);
                myRank = recv_data.myRank;
            }
            callback(is_success);
        });
    }
示例#19
0
 public override void Initialize()
 {
     //IL_0042: Unknown result type (might be due to invalid IL or missing references)
     eventData = (GameSection.GetEventData() as Network.EventData);
     IsFinishRecieveDelivery = true;
     if (eventData == null)
     {
         isExistArena = false;
         base.Initialize();
     }
     else if (IsRankingJoin())
     {
         this.StartCoroutine(SendGetMyRcord());
     }
     else
     {
         base.Initialize();
     }
 }
示例#20
0
    private IEnumerator LoadBanner(Network.EventData eventData, int index)
    {
        string  resourceName = ResourceName.GetEventBG(eventData.bannerId);
        Hash128 hash         = default(Hash128);

        if (MonoBehaviourSingleton <ResourceManager> .I.manifest != null)
        {
            hash = MonoBehaviourSingleton <ResourceManager> .I.manifest.GetAssetBundleHash(RESOURCE_CATEGORY.EVENT_BG.ToAssetBundleName(resourceName));
        }
        if (MonoBehaviourSingleton <ResourceManager> .I.manifest == null || hash.get_isValid())
        {
            LoadingQueue load_queue = new LoadingQueue(this);
            LoadObject   lo_bg      = load_queue.Load(RESOURCE_CATEGORY.EVENT_BG, resourceName, false);
            if (load_queue.IsLoading())
            {
                yield return((object)load_queue.Wait());
            }
            SetTexture(texture: lo_bg.loadedObject as Texture2D, root: cardDataList[index].cardTransform, texture_enum: UI.TEX_EVENT_BG);
        }
    }
示例#21
0
    public Network.EventData GetEventCleardDeliveryData()
    {
        if (m_compDeliveryId == 0)
        {
            return(null);
        }
        List <Network.EventData> list = new List <Network.EventData>(MonoBehaviourSingleton <QuestManager> .I.eventList);

        list.RemoveAll((Network.EventData e) => e.HasEndDate() && e.GetRest() < 0);
        DeliveryTable.DeliveryData deliveryTableData = Singleton <DeliveryTable> .I.GetDeliveryTableData((uint)m_compDeliveryId);

        if (deliveryTableData == null)
        {
            return(null);
        }
        int eventID = deliveryTableData.eventID;

        Network.EventData result = null;
        int i = 0;

        for (int count = list.Count; i < count; i++)
        {
            if (list[i].eventId == eventID)
            {
                result = list[i];
                break;
            }
        }
        List <Network.EventData> list2 = new List <Network.EventData>(MonoBehaviourSingleton <QuestManager> .I.bingoEventList);
        int j = 0;

        for (int count2 = list2.Count; j < count2; j++)
        {
            if (list2[j].eventId == eventID)
            {
                result = list2[j];
                break;
            }
        }
        return(result);
    }
示例#22
0
    private bool IsPlayableVersion(out Network.EventData notPlayableEventData)
    {
        notPlayableEventData = null;
        if (cardDataList == null || cardDataList.Count <= 0)
        {
            return(true);
        }
        Version nativeVersionFromName = NetworkNative.getNativeVersionFromName();
        int     i = 0;

        for (int count = cardDataList.Count; i < count; i++)
        {
            Network.EventData eventData = cardDataList[i].eventData;
            if (eventData != null && !eventData.IsPlayableWith(nativeVersionFromName))
            {
                notPlayableEventData = eventData;
                return(false);
            }
        }
        return(true);
    }
示例#23
0
 private void UpdateEndData(Transform t, Network.EventData eventData)
 {
     SetLabelText(t, UI.LBL_PERIOD, QuestUtility.GetEndDateString(eventData));
 }
示例#24
0
 private void UpdateBingoName(Transform t, Network.EventData eventData)
 {
     SetLabelText(t, UI.LBL_BINGO_NAME, eventData.name);
 }
    public static string GetEndDateString(Network.EventData eventData)
    {
        string date = eventData.endDate.date;

        return("~" + date.Substring(5, 11).Replace("-", "/"));
    }
示例#26
0
 private bool IsClearedEvent(Network.EventData eventData)
 {
     return(MonoBehaviourSingleton <DeliveryManager> .I.IsAllClearedEvent(eventData.eventId));
 }