Example #1
0
    public static StringEntry Get(StringKey key0)
    {
        StringEntry stringEntry = RootTable.Get(key0);

        if (stringEntry == null)
        {
            stringEntry = GetInvalidString(key0);
        }
        return(stringEntry);
    }
Example #2
0
 private void RegisterBundleOffersLocalNotification()
 {
     if (MonoBehaviourSingleton <ShopManager> .IsValid() && MonoBehaviourSingleton <ShopManager> .I.purchaseItemList != null)
     {
         TimeSpan timeSpan = new TimeSpan(localPurchaseItemListRequestTime.Ticks - DateTime.Now.Ticks);
         int      num      = (int)timeSpan.TotalSeconds;
         int      id       = 900001;
         int      num2     = 0;
         if (MonoBehaviourSingleton <ShopManager> .I.purchaseItemList.skuPopups.Count > 0)
         {
             for (int i = 0; i < MonoBehaviourSingleton <ShopManager> .I.purchaseItemList.skuPopups.Count; i++)
             {
                 if (MonoBehaviourSingleton <ShopManager> .I.purchaseItemList.skuPopups[i].remainTimes > 86400 && !GameSaveData.instance.iAPBundleBought.Contains(MonoBehaviourSingleton <ShopManager> .I.purchaseItemList.skuPopups[i].productId) && num2 < MonoBehaviourSingleton <ShopManager> .I.purchaseItemList.skuPopups[i].remainTimes)
                 {
                     num2 = MonoBehaviourSingleton <ShopManager> .I.purchaseItemList.skuPopups[i].remainTimes;
                 }
             }
         }
         num2 = num2 - num - 86400;
         if (num2 > 0)
         {
             string title = StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 30u);
             string body  = StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 31u);
             Native.RegisterLocalNotification(id, title, body, num2);
         }
     }
 }
Example #3
0
    protected void SetUpText(PointShopItem item, bool isChangable)
    {
        //IL_0141: Unknown result type (might be due to invalid IL or missing references)
        //IL_014b: Unknown result type (might be due to invalid IL or missing references)
        itemName.text = item.name;
        if (item.hasLimit)
        {
            switch (item.limitPeriodType)
            {
            case POINT_SHOP_ITEM_LIMIT_TYPE.DAILY:
                tradeNum.text = string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 3u), item.limit - item.buyCount);
                break;

            case POINT_SHOP_ITEM_LIMIT_TYPE.WEEKLY:
                tradeNum.text = string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 4u), item.limit - item.buyCount);
                break;

            case POINT_SHOP_ITEM_LIMIT_TYPE.MONTHLY:
                tradeNum.text = string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 5u), item.limit - item.buyCount);
                break;

            default:
                tradeNum.text = string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 1u), item.limit - item.buyCount);
                break;
            }
        }
        else
        {
            tradeNum.text = StringTable.Get(STRING_CATEGORY.POINT_SHOP, 0u);
        }
        pointNum.text      = string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), item.needPoint);
        pointNum.color     = ((!isChangable) ? Color.get_red() : Color.get_white());
        remainingTime.text = item.expire;
    }
Example #4
0
 private void RegisterGuildRequestLocalNotification()
 {
     if (MonoBehaviourSingleton <GuildRequestManager> .IsValid())
     {
         MonoBehaviourSingleton <GuildRequestManager> .I.RegisterGuildRequestLocalNotification();
     }
     for (int i = 0; i < localNotificationGuildRequestTime.Count; i++)
     {
         DateTime dateTime = localNotificationGuildRequestTime[i];
         TimeSpan timeSpan = new TimeSpan(dateTime.Ticks - DateTime.Now.Ticks);
         int      num      = (int)timeSpan.TotalSeconds;
         if (0 < num)
         {
             int    num2  = i;
             int    hours = dateTime.TimeOfDay.Hours;
             string title = StringTable.Get(STRING_CATEGORY.GUILD_REQUEST, 9u);
             if (hours >= 8)
             {
                 string body = StringTable.Get(STRING_CATEGORY.GUILD_REQUEST, 10u);
                 Native.RegisterLocalNotification(num2, title, body, num);
             }
             DateTime dateTime2 = dateTime.Add(new TimeSpan(6, 0, 0));
             int      hours2    = dateTime2.TimeOfDay.Hours;
             if (hours2 >= 8)
             {
                 TimeSpan timeSpan2    = new TimeSpan(dateTime2.Ticks - DateTime.Now.Ticks);
                 int      afterSeconds = (int)timeSpan2.TotalSeconds;
                 string   body2        = StringTable.Get(STRING_CATEGORY.GUILD_REQUEST, 20u);
                 Native.RegisterLocalNotification(num2 + 100, title, body2, afterSeconds);
             }
         }
     }
 }
Example #5
0
    private void ViewEventTab()
    {
        SetActive((Enum)UI.OBJ_NORMAL, false);
        SetActive((Enum)UI.OBJ_TAB_ROOT, true);
        SetActive((Enum)UI.OBJ_ON_TAB_NORMAL, false);
        SetActive((Enum)UI.OBJ_ON_TAB_EVENT, true);
        SetActive((Enum)UI.OBJ_EVENT_LIST, true);
        List <PointShop> current = (from x in pointShop
                                    where x.isEvent
                                    select x).ToList();

        SetGrid(UI.GRD_EVENT_LIST, "PointShopEventList", current.Count, true, delegate(int i, Transform t, bool b)
        {
            PointShop pointShop  = current[i];
            UITexture component  = FindCtrl(t, UI.TEX_EVENT_LIST_BANNER).GetComponent <UITexture>();
            UITexture component2 = FindCtrl(t, UI.TXT_EVENT_LIST_POINT_ICON).GetComponent <UITexture>();
            SetLabelText(t, UI.LBL_EVENT_LIST_POINT, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShop.userPoint));
            ResourceLoad.LoadPointIconImageTexture(component2, (uint)pointShop.pointShopId);
            ResourceLoad.LoadPointShopBannerTexture(component, (uint)pointShop.pointShopId);
            SetEvent(FindCtrl(t, UI.TEX_EVENT_LIST_BANNER), "EVENT_SHOP", pointShop);
            int num = (from x in pointShop.items
                       where x.isBuyable
                       where x.type != 8 || !MonoBehaviourSingleton <UserInfoManager> .I.IsUnlockedStamp(x.itemId)
                       where x.type != 9 || !MonoBehaviourSingleton <UserInfoManager> .I.IsUnlockedDegree(x.itemId)
                       where x.type != 7 || !MonoBehaviourSingleton <GlobalSettingsManager> .I.IsUnlockedAvatar(x.itemId)
                       select x).Count();
            bool flag = num == 0;
            SetActive(t, UI.LBL_EVENT_LIST_SOLD_OUT, flag);
            SetButtonEnabled(t, UI.TEX_EVENT_LIST_BANNER, !flag);
            SetLabelText(t, UI.LBL_EVENT_LIST_REMAINING_TIME, pointShop.expire);
        });
    }
Example #6
0
 public void SetUpItemDetailItem(PointShopItem item, PointShop shop, uint pointId, bool isChangable)
 {
     SetUpText(item, isChangable);
     SetUpPointIcon(pointIcon, pointId);
     SetUpPointIcon(havePointIcon, pointId);
     havePointNum.text = string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), shop.userPoint);
 }
 public override void Initialize()
 {
     base.Initialize();
     yesButton = GetCtrl(UI.SPR_BTN_YES).GetComponent <UIButton>();
     SetStarsEvent();
     itemString = StringTable.Get(STRING_CATEGORY.APP_REVIEW, 3u);
 }
Example #8
0
    private void InitLounge(int index, Transform t)
    {
        SetEvent(t, "SELECT_LOUNGE", index);
        LoungeModel.Lounge lounge    = lounges[index];
        CharaInfo          charaInfo = null;

        for (int i = 0; i < lounge.slotInfos.Count; i++)
        {
            if (lounge.slotInfos[i].userInfo.userId == lounge.ownerUserId)
            {
                charaInfo = lounge.slotInfos[i].userInfo;
                break;
            }
        }
        SetLabelText(t, UI.LBL_HOST_NAME, charaInfo.name);
        SetLabelText(t, UI.LBL_HOST_LV, charaInfo.level.ToString());
        SetLabelText(t, UI.LBL_LOUNGE_NAME, lounge.name);
        string text = StringTable.Get(STRING_CATEGORY.LOUNGE_LABEL, (uint)lounge.label);

        SetLabelText(t, UI.LBL_LABEL, text);
        SetStamp(t, lounge.stampId);
        int num  = lounge.num + 1;
        int num2 = lounge.slotInfos.Count((LoungeModel.SlotInfo slotInfo) => slotInfo != null && slotInfo.userInfo != null && slotInfo.userInfo.userId != lounge.ownerUserId);

        for (int j = 0; j < 7; j++)
        {
            bool is_visible = j < num - 1;
            SetActive(t, loungeMembers[j], is_visible);
            SetToggle(t, loungeMembers[j], j < num2);
        }
    }
    public override void UpdateUI()
    {
        //IL_009c: Unknown result type (might be due to invalid IL or missing references)
        //IL_00a1: Expected O, but got Unknown
        //IL_00a5: Unknown result type (might be due to invalid IL or missing references)
        //IL_00df: Unknown result type (might be due to invalid IL or missing references)
        //IL_00e4: Unknown result type (might be due to invalid IL or missing references)
        string text = MonoBehaviourSingleton <PartyManager> .I.challengeInfo.oldShadowCount.startDate + " 〜\n" + MonoBehaviourSingleton <PartyManager> .I.challengeInfo.oldShadowCount.endDate;

        SetLabelText((Enum)UI.LBL_DATE, text);
        SetLabelText((Enum)UI.LBL_DESCRIPTION, StringTable.Get(STRING_CATEGORY.SHADOW_COUNT, 4u));
        base.GetComponent <UITable>((Enum)UI.TBL_CONTENTS).Reposition();
        Transform ctrl       = GetCtrl(UI.SPR_FRAME);
        int       num        = 0;
        int       childCount = GetCtrl(UI.TBL_CONTENTS).get_childCount();

        for (int i = 0; i < childCount; i++)
        {
            Transform val = GetCtrl(UI.TBL_CONTENTS).GetChild(i);
            if (val.get_gameObject().get_activeSelf())
            {
                num += val.GetComponent <UIWidget>().height;
            }
        }
        num = Mathf.Max(num, 0);
        float   num2       = (float)(123 + num);
        Vector3 localScale = ctrl.get_localScale();
        int     height     = (int)(num2 / localScale.y);

        SetHeight((Enum)UI.SPR_FRAME, height);
        UpdateAnchors();
        base.UpdateUI();
    }
Example #10
0
    private void UpdatePaging()
    {
        bool is_visible = allEquipData.Count + allEquipData[currentEvolveStage].Count >= 2;

        SetActive((Enum)UI.OBJ_EVOLVE_SELECT, true);
        SetActive((Enum)UI.OBJ_ARROW_BTN_ROOT, is_visible);
        if (currentEvolveStage == 0)
        {
            SetActive((Enum)UI.LBL_EVOLVE_NORMAL, true);
            SetLabelText((Enum)UI.LBL_EVOLVE_NORMAL, StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 13u));
            SetActive((Enum)UI.LBL_EVOLVE_ATTRIBUTE, false);
            SetActive((Enum)UI.SPR_EVOLVE_ELEM, false);
        }
        else
        {
            EquipItemTable.EquipItemData currentEquipItemData = GetCurrentEquipItemData();
            int  targetElementPriorityToTable = (int)currentEquipItemData.GetTargetElementPriorityToTable();
            bool flag = targetElementPriorityToTable == 6;
            SetActive((Enum)UI.LBL_EVOLVE_NORMAL, flag);
            SetActive((Enum)UI.LBL_EVOLVE_ATTRIBUTE, !flag);
            SetActive((Enum)UI.SPR_EVOLVE_ELEM, !flag);
            if (flag)
            {
                SetLabelText((Enum)UI.LBL_EVOLVE_NORMAL, string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 14u), currentEvolveStage.ToString()));
            }
            else
            {
                SetLabelText((Enum)UI.LBL_EVOLVE_ATTRIBUTE, string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 15u), currentEvolveStage.ToString()));
                SetElementSprite((Enum)UI.SPR_EVOLVE_ELEM, targetElementPriorityToTable);
            }
        }
    }
    private void ShowNonDeliveryList()
    {
        switch (selectedTab)
        {
        case UI.BTN_TAB_NORMAL:
            if (normalDeliveryInfo != null && normalDeliveryInfo.Length == 0)
            {
                SetLabelText((Enum)UI.LBL_DELIVERY_NON_LIST, StringTable.Get(STRING_CATEGORY.QUEST_DELIVERY, 100u));
            }
            break;

        case UI.BTN_TAB_DAILY:
            if (dailyDeliveryInfo != null && dailyDeliveryInfo.Length == 0)
            {
                TimeSpan span2 = TimeSpan.FromSeconds((double)MonoBehaviourSingleton <DeliveryManager> .I.dailyUpdateRemainTime);
                SetLabelText((Enum)UI.LBL_DELIVERY_NON_LIST, string.Format(StringTable.Get(STRING_CATEGORY.QUEST_DELIVERY, 101u), GetRemainTimeText(span2)));
            }
            break;

        case UI.BTN_TAB_WEEKLY:
            if (weeklyDeliveryInfo != null && weeklyDeliveryInfo.Length == 0)
            {
                TimeSpan span = TimeSpan.FromSeconds((double)MonoBehaviourSingleton <DeliveryManager> .I.weeklyUpdateRemainTime);
                SetLabelText((Enum)UI.LBL_DELIVERY_NON_LIST, string.Format(StringTable.Get(STRING_CATEGORY.QUEST_DELIVERY, 102u), GetRemainTimeText(span)));
            }
            break;
        }
    }
 // Token: 0x060159F8 RID: 88568 RVA: 0x00580F1C File Offset: 0x0057F11C
 protected override void OnLoadConfigDataStart()
 {
     Utility.LogMemorySize("ProjectLGameEntryUITask.OnLoadConfigDataStart");
     this.m_mainCtrl.SetMesssage(StringTable.Get("MsgLoadingConfigs"));
     this.m_mainCtrl.AddProgress(1f, 0.7f);
     this.m_isUpdateLoadConfigProgress = true;
 }
    public static string GetRemainTimeToText(TimeSpan span, int digitNum = 3)
    {
        string text = string.Empty;

        if (span.Seconds > 0)
        {
            span = span.Add(TimeSpan.FromMinutes(1.0));
        }
        int num = 0;

        if (span.Days > 0 && num < digitNum)
        {
            text += string.Format(StringTable.Get(STRING_CATEGORY.TIME, 0u), span.Days);
            num++;
        }
        if (span.Hours > 0 && num < digitNum)
        {
            text += string.Format(StringTable.Get(STRING_CATEGORY.TIME, 1u), span.Hours);
            num++;
        }
        if (span.Minutes > 0 && num < digitNum)
        {
            text += string.Format(StringTable.Get(STRING_CATEGORY.TIME, 2u), span.Minutes);
            num++;
        }
        if (text == string.Empty)
        {
            return(string.Format(StringTable.Get(STRING_CATEGORY.TIME, 2u), 0));
        }
        return(text);
    }
        // Token: 0x060159E7 RID: 88551 RVA: 0x00580B58 File Offset: 0x0057ED58
        protected override IEnumerator EntryPipeLine()
        {
            Utility.LogMemorySize("ProjectLGameEntryUITask.EntryPipeLine");
            bool isEnd = false;

            this.m_mainCtrl.ShowCompanyUI(delegate
            {
                isEnd = true;
            });
            float delay = Time.unscaledTime + 3.5f;

            yield return(new WaitUntil(delegate()
            {
                if (Time.unscaledTime > delay)
                {
                    this.m_mainCtrl.ShowUpdateClientUI(true);
                }
                return isEnd;
            }));

            this.m_mainCtrl.SetMesssage(StringTable.Get("MsgConnectingServer"));
            this.m_mainCtrl.SetProgress(0f);
            this.m_mainCtrl.ShowUpdateClientUI(true);
            yield return(this.CheckNetwork());

            this.m_mainCtrl.AddProgress(0.05f, 1f);
            yield return(Utility.GetUpdateClientURL(this.m_mainCtrl.gameObject));

            this.m_mainCtrl.AddProgress(0.05f, 1f);
            yield return(base.EntryPipeLine());

            yield break;
        }
    private void OnQuery_NEED()
    {
        if (smithData == null)
        {
            GameSection.StopEvent();
        }
        else
        {
            int num     = (int)GameSection.GetEventData();
            int exceed  = smithData.selectEquipData.exceed;
            int needNum = (int)exceedData.exceed[num].getNeedNum(exceed + 1);
            ItemTable.ItemData itemData = Singleton <ItemTable> .I.GetItemData(exceedData.exceed[num].itemId);

            uint id = 7u;
            if (itemData.type == ITEM_TYPE.LAPIS)
            {
                id = (uint)((!Singleton <EquipItemExceedTable> .I.IsFreeLapis(itemData.rarity, itemData.id, itemData.eventId)) ? 4 : 3);
                if (Singleton <LimitedEquipItemExceedTable> .I.IsLimitedLapis(itemData.id))
                {
                    id = 8u;
                }
            }
            string text = string.Format(StringTable.Get(STRING_CATEGORY.ITEM_DETAIL, id), itemData.rarity.ToString());
            GameSection.SetEventData(new object[4]
            {
                itemData.name,
                needNum,
                smithData.selectEquipData.tableData.name,
                text
            });
        }
    }
    private void UpdateTitle()
    {
        string text = StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 27u);

        SetLabelText((Enum)UI.LBL_LOCATION_NAME, text);
        SetLabelText((Enum)UI.LBL_LOCATION_NAME_EFFECT, text);
    }
 private IEnumerator SetPointShopGetPointUI()
 {
     if (pointShopGetPointData != null && pointShopGetPointData.Count > 0)
     {
         LoadingQueue queue = new LoadingQueue(this);
         queue.Load(RESOURCE_CATEGORY.COMMON, ResourceName.GetPointIconImageName((int)pointShopGetPointData[0].pointShopId), false);
         if (queue.IsLoading())
         {
             yield return((object)queue.Wait());
         }
         SetActive((Enum)UI.OBJ_NORMAL_ROOT, true);
         SetLabelText((Enum)UI.LBL_POINT_NORMAL, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopGetPointData[0].basePoint));
         UITexture normalTex = GetCtrl(UI.TEX_NORMAL_ICON).GetComponent <UITexture>();
         ResourceLoad.LoadPointIconImageTexture(normalTex, pointShopGetPointData[0].pointShopId);
         if (pointShopGetPointData.Count >= 2)
         {
             queue.Load(RESOURCE_CATEGORY.COMMON, ResourceName.GetPointIconImageName((int)pointShopGetPointData[1].pointShopId), false);
             if (queue.IsLoading())
             {
                 yield return((object)queue.Wait());
             }
             SetActive((Enum)UI.OBJ_EVENT_ROOT, true);
             SetLabelText((Enum)UI.LBL_POINT_EVENT, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), pointShopGetPointData[1].basePoint));
             UITexture eventTex = GetCtrl(UI.TEX_EVENT_ICON).GetComponent <UITexture>();
             ResourceLoad.LoadPointIconImageTexture(eventTex, pointShopGetPointData[1].pointShopId);
         }
     }
 }
Example #18
0
    private void UpdateBonusRemainTime(GuildRequestItem item, Transform parent)
    {
        string format = StringTable.Get(STRING_CATEGORY.GUILD_REQUEST, 14u);
        string bonusRemainTimeWithFormat = item.GetBonusRemainTimeWithFormat();
        string text = string.Format(format, bonusRemainTimeWithFormat);

        SetLabelText(parent, UI.LBL_BONUS_REMAIN_TIME, text);
    }
Example #19
0
    private void SetEvolveText(EquipItemTable.EquipItemData data)
    {
        bool flag = data.IsWeapon();
        int  num  = 0;

        num        = ((!flag) ? data.GetElemDefTypePriorityToTable(null) : data.GetElemAtkTypePriorityToTable(null));
        modifyText = StringTable.Get(STRING_CATEGORY.EVOLVE, (uint)num);
    }
Example #20
0
    ///////////////////////////////////////////
    // Get()
    // Accesses the string value for i_key in
    // the current string table.
    ///////////////////////////////////////////
    public static string Get(string i_strKey)
    {
        if (m_table == null)
        {
            m_table = new StringTable("English");
        }

        return(m_table.Get(i_strKey));
    }
Example #21
0
        public string GetExceedParamName()
        {
            if (paramName != null)
            {
                return(paramName);
            }
            StringBuilder stringBuilder = new StringBuilder(string.Empty);

            if ((int)atk > 0)
            {
                stringBuilder.Append(StringTable.Format(STRING_CATEGORY.SMITH, 1u, atk));
                stringBuilder.Append(" ");
            }
            if ((int)def > 0)
            {
                stringBuilder.Append(StringTable.Format(STRING_CATEGORY.SMITH, 2u, def));
                stringBuilder.Append(" ");
            }
            if ((int)hp > 0)
            {
                stringBuilder.Append(StringTable.Format(STRING_CATEGORY.SMITH, 3u, hp));
                stringBuilder.Append(" ");
            }
            int i = 0;

            for (int num = atkElement.Length; i < num; i++)
            {
                if (atkElement[i] > 0)
                {
                    stringBuilder.Append(StringTable.Format(STRING_CATEGORY.SMITH, 4u, StringTable.Get(STRING_CATEGORY.ELEMENT, (uint)i), atkElement[i]));
                    stringBuilder.Append(" ");
                }
            }
            int j = 0;

            for (int num2 = defElement.Length; j < num2; j++)
            {
                if (defElement[j] > 0)
                {
                    stringBuilder.Append(StringTable.Format(STRING_CATEGORY.SMITH, 5u, StringTable.Get(STRING_CATEGORY.ELEMENT, (uint)j), defElement[j]));
                    stringBuilder.Append(" ");
                }
            }
            if (skillSlot.slotType != 0)
            {
                stringBuilder.Append(StringTable.Format(STRING_CATEGORY.SMITH, 6u, StringTable.Get(STRING_CATEGORY.SKILL, (uint)skillSlot.slotType)));
                stringBuilder.Append(" ");
            }
            if (this.ability.id != 0)
            {
                AbilityTable.Ability ability = Singleton <AbilityTable> .I.GetAbility((uint)this.ability.id);

                stringBuilder.Append(StringTable.Format(STRING_CATEGORY.SMITH, 7u, ability.name, this.ability.pt));
            }
            paramName = stringBuilder.ToString();
            return(paramName);
        }
Example #22
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);
         });
     }
 }
 public override void UpdateUI()
 {
     if (equipItemInfo != null)
     {
         SetFontStyle((Enum)UI.STR_ABILITY, 2);
         SetFontStyle((Enum)UI.LBL_NAME_1, 3);
         SetFontStyle((Enum)UI.LBL_NAME_2, 3);
         SetFontStyle((Enum)UI.LBL_NAME_3, 3);
         SetLabelText((Enum)UI.LBL_NAME, equipItemInfo.tableData.name);
         SetLabelText((Enum)UI.LBL_LV_NOW, equipItemInfo.level.ToString());
         SetLabelText((Enum)UI.LBL_LV_MAX, equipItemInfo.tableData.maxLv.ToString());
         SetEquipmentTypeIcon((Enum)UI.SPR_TYPE_ICON, (Enum)UI.SPR_TYPE_ICON_BG, (Enum)UI.SPR_TYPE_ICON_RARITY, equipItemInfo.tableData);
         EquipItemAbility[] validAbility = equipItemInfo.GetValidAbility();
         bool enableAbilityChange        = false;
         int  num = 0;
         for (num = 0; num < validAbility.Length; num++)
         {
             if (equipItemInfo.IsFixedAbility(num))
             {
                 SetAbilityActive(num, false);
                 SetAbilityActive(num + 3, true);
                 SetAbilityData(num + 3, validAbility[num]);
             }
             else
             {
                 enableAbilityChange = true;
                 SetAbilityActive(num, true);
                 SetAbilityData(num, validAbility[num]);
             }
         }
         EnableAbilityChange = enableAbilityChange;
         for (; num < 3; num++)
         {
             SetAbilityActive(num, false);
         }
         bool flag  = abilityItemInfo != null;
         bool flag2 = !equipItemInfo.tableData.IsEquipableAbilityItem() || !flag;
         SetActive((Enum)UI.OBJ_ABILITY_ITEM_ITEM_ROOT, flag);
         SetActive((Enum)UI.LBL_NO_ABILITY_ITEM, flag2);
         if (flag2)
         {
             if (!equipItemInfo.tableData.IsEquipableAbilityItem())
             {
                 SetLabelText((Enum)UI.LBL_NO_ABILITY_ITEM, StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 23u));
             }
             else
             {
                 SetLabelText((Enum)UI.LBL_NO_ABILITY_ITEM, StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 24u));
             }
         }
         else
         {
             SetAbilityItemData();
         }
     }
 }
Example #24
0
    public static string GetBoughtMessage(PointShopItem item, int num)
    {
        string empty = string.Empty;

        if (item.itemId != 1200000)
        {
            return(string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 7u), item.name, num));
        }
        return(string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 8u), item.name, num));
    }
Example #25
0
    private void OnQuery_EMPLOY()
    {
        MonoBehaviourSingleton <GuildRequestManager> .I.SetSelectedItem(GameSection.GetEventData() as GuildRequestItem);

        GuildRequestItem selectedItem = MonoBehaviourSingleton <GuildRequestManager> .I.GetSelectedItem();

        string eventData = string.Format(StringTable.Get(STRING_CATEGORY.GUILD_REQUEST, 1u), selectedItem.crystalNum);

        GameSection.SetEventData(eventData);
    }
Example #26
0
        public void Update(StringTable table, int numEntries, byte[] data)
        {
            using (var stream = Bitstream.CreateWith(data)) {
                bool option = stream.ReadBool();
                if (option)
                {
                    throw new ArgumentException("Unknown option " + option);
                }

                List <string> keyHistory = new List <string>();

                uint entryId = UInt32.MaxValue;
                uint read    = 0;

                while (read < numEntries)
                {
                    if (!stream.ReadBool())
                    {
                        entryId = stream.ReadBits(table.EntryBits);
                    }
                    else
                    {
                        entryId = unchecked (entryId + 1);
                    }

                    Preconditions.CheckArgument(entryId < table.MaxEntries);

                    string key   = ReadKeyIfIncluded(stream, keyHistory);
                    byte[] value = ReadValueIfIncluded(stream, table.UserDataFixedSize,
                                                       table.UserDataSizeBits);

                    if (entryId < table.Count)
                    {
                        StringTable.Entry entry = table.Get(entryId);

                        if (key != null)
                        {
                            Preconditions.CheckArgument(key.Equals(entry.Key));
                        }

                        if (value != null)
                        {
                            entry.Value = value;
                        }
                    }
                    else
                    {
                        table.Put(entryId, new StringTable.Entry(key, value));
                    }

                    ++read;
                }
            }
        }
 // Token: 0x06015A03 RID: 88579 RVA: 0x005812A0 File Offset: 0x0057F4A0
 protected override void UpdateView4AssetBundlePreUpdateing()
 {
     if (Time.unscaledTime > this.m_lastUpdateProgressTime + 0.5f)
     {
         this.m_mainCtrl.AddProgress((ResourceManager.Instance.GetAssetBundleUpdateingPercent() - this.m_lastUpdateProgress) * 0.3f, 0.5f);
         this.m_lastUpdateProgress = ResourceManager.Instance.GetAssetBundleUpdateingPercent();
         this.m_mainCtrl.SetMesssage(string.Format(StringTable.Get("MsgCurrentDownloadInfo"), (double)ResourceManager.Instance.GetPreUpdateingDownloadedBytes() * 9.5367431640625E-07, (double)(ResourceManager.Instance.GetTotalPreUpdateingDownloadBytes() + this.m_downloadAudioLength) * 9.5367431640625E-07, (double)(ResourceManager.Instance.GetPreUpdateingDownloadedBytes() - this.m_lastDownloadedBytes) / 1024.0 / (double)(Time.unscaledTime - this.m_lastUpdateProgressTime)));
         this.m_lastDownloadedBytes    = ResourceManager.Instance.GetPreUpdateingDownloadedBytes();
         this.m_lastUpdateProgressTime = Time.unscaledTime;
     }
 }
Example #28
0
    public override void UpdateUI()
    {
        base.UpdateUI();
        UITexture component  = GetCtrl(UI.TEX_POINT_ICON).GetComponent <UITexture>();
        UITexture component2 = GetCtrl(UI.TEX_EVENT_POP).GetComponent <UITexture>();

        ResourceLoad.LoadPointIconImageTexture(component, (uint)data.pointShopId);
        ResourceLoad.LoadPointShopBGTexture(component2, (uint)data.pointShopId);
        SetLabelText((Enum)UI.LBL_POINT, string.Format(StringTable.Get(STRING_CATEGORY.POINT_SHOP, 2u), data.userPoint));
        SetList();
    }
    private void OnQuery_AUTO_CREATE_ROOM()
    {
        GameSection.ResumeEvent(false, null);
        string text = StringTable.Get(STRING_CATEGORY.MATCHING, 1u);

        object[] array = new object[1]
        {
            text
        };
        DispatchEvent("HOST_LIMIT", text);
    }
Example #30
0
 private void ShowNonRequestList(bool isShow)
 {
     if (isShow && MonoBehaviourSingleton <GuildRequestManager> .I.guildRequestData != null && MonoBehaviourSingleton <GuildRequestManager> .I.guildRequestData.guildRequestItemList.Count == 0)
     {
         SetActive((Enum)UI.LBL_REQUEST_NON_LIST, true);
         SetLabelText((Enum)UI.LBL_REQUEST_NON_LIST, StringTable.Get(STRING_CATEGORY.QUEST_DELIVERY, 100u));
     }
     else
     {
         SetActive((Enum)UI.LBL_REQUEST_NON_LIST, false);
     }
 }
Example #31
0
        public void Update(StringTable table, int numEntries, byte[] data)
        {
            using (var stream = Bitstream.CreateWith(data))
            {
                var option = stream.ReadBool();
                if (option)
                {
                    throw new ArgumentException("Unknown option " + option);
                }

                var keyHistory = new List<string>();

                var entryId = uint.MaxValue;
                uint read = 0;

                while (read < numEntries)
                {
                    if (!stream.ReadBool())
                    {
                        entryId = stream.ReadBits(table.EntryBits);
                    }
                    else
                    {
                        entryId = unchecked(entryId + 1);
                    }

                    var key = ReadKeyIfIncluded(stream, keyHistory);
                    var value = ReadValueIfIncluded(stream, table.UserDataFixedSize,
                        table.UserDataSizeBits);

                    if (entryId < table.Count)
                    {
                        var entry = table.Get(entryId);

                        if (value != null)
                        {
                            entry.Value = value;
                        }
                    }
                    else
                    {
                        table.Put(entryId, new StringTable.Entry(key, value));
                    }

                    ++read;
                }
            }
        }