Ejemplo n.º 1
0
 public void SetSearchRequestTemp(QuestSearchRoomCondition.SearchRequestParam request)
 {
     if (request != null)
     {
         searchRequestTemp = searchRequest;
         searchRequest     = request;
     }
 }
 private void OnCloseDialog_QuestAcceptOrderCounterCondition()
 {
     QuestSearchRoomCondition.SearchRequestParam searchRequestParam = GameSection.GetEventData() as QuestSearchRoomCondition.SearchRequestParam;
     if (searchRequestParam != null && searchRequestParam.order == 1)
     {
         param   = searchRequestParam;
         nowPage = 1;
         RefreshUI();
     }
 }
Ejemplo n.º 3
0
    public void SetSearchRequestFromPrefs()
    {
        searchRequest               = new QuestSearchRoomCondition.SearchRequestParam();
        searchRequest.rarityBit     = PlayerPrefs.GetInt("GACHA_SEARCH_RAIRTY_KEY", 8388607);
        searchRequest.elementBit    = PlayerPrefs.GetInt("GACHA_SEARCH_ELEMENT_KEY", 8388607);
        searchRequest.enemyLevelMin = PlayerPrefs.GetInt("GACHA_SEARCH_LEVEL_MIN_KEY", 1);
        int pARTY_SEARCH_QUEST_LEVEL_MAX = MonoBehaviourSingleton <UserInfoManager> .I.userInfo.constDefine.PARTY_SEARCH_QUEST_LEVEL_MAX;

        searchRequest.enemyLevelMax          = PlayerPrefs.GetInt("GACHA_SEARCH_LEVEL_MAX_KEY", pARTY_SEARCH_QUEST_LEVEL_MAX);
        searchRequest.targetEnemySpeciesName = PlayerPrefs.GetString("GACHA_SEARCH_SPECIES_KEY", (string)null);
    }
Ejemplo n.º 4
0
 public void SetSearchRequest(QuestSearchRoomCondition.SearchRequestParam request = null)
 {
     if (request != null)
     {
         ResetSearchRequestTemp();
         searchRequest = request;
     }
     else if (searchRequest == null)
     {
         ResetSearchRequestTemp();
         ResetSearchRequest();
     }
 }
Ejemplo n.º 5
0
 public void ResetSearchRequest()
 {
     searchRequest = new QuestSearchRoomCondition.SearchRequestParam();
 }
    public override void UpdateUI()
    {
        QuestSearchRoomCondition.SearchRequestParam searchRequest = MonoBehaviourSingleton <PartyManager> .I.searchRequest;
        bool   flag  = (searchRequest.questTypeBit & 4) != 0;
        bool   flag2 = (searchRequest.questTypeBit & 2) != 0;
        bool   flag3 = (searchRequest.questTypeBit & 1) != 0;
        bool   flag4 = (searchRequest.questTypeBit & 0x10) != 0;
        bool   flag5 = (flag3 && flag2 && flag && flag4) || (!flag3 && !flag2 && !flag && !flag4);
        string text  = string.Empty;
        string text2 = string.Empty;

        if (searchRequest.order == 0)
        {
            text  = base.sectionData.GetText("STR_SELECT_CONDITION_RECOMMEND");
            text2 = string.Empty;
        }
        else if (flag5)
        {
            text  = base.sectionData.GetText("STR_SELECT_CONDITION_ALL");
            text2 = string.Empty;
        }
        else
        {
            if (flag && string.IsNullOrEmpty(text))
            {
                text = base.sectionData.GetText("STR_SELECT_CONDITION_GACHA");
            }
            if (flag2)
            {
                if (string.IsNullOrEmpty(text))
                {
                    text = base.sectionData.GetText("STR_SELECT_CONDITION_EVENT");
                }
                else if (string.IsNullOrEmpty(text2))
                {
                    text2 = base.sectionData.GetText("STR_SELECT_CONDITION_EVENT");
                }
            }
            if (flag3)
            {
                if (string.IsNullOrEmpty(text))
                {
                    text = base.sectionData.GetText("STR_SELECT_CONDITION_NORMAL");
                }
                else if (string.IsNullOrEmpty(text2))
                {
                    text2 = base.sectionData.GetText("STR_SELECT_CONDITION_NORMAL");
                }
            }
        }
        SetLabelText((Enum)UI.LBL_CONDITION_A, text);
        SetLabelText((Enum)UI.LBL_CONDITION_B, text2);
        SetActive((Enum)UI.SPR_CONDITION_DIFFICULTY, false);
        SetActive((Enum)UI.STR_NO_CONDITION, true);
        bool is_visible = MonoBehaviourSingleton <PartyManager> .I.challengeInfo.NotClaer();

        SetActive((Enum)UI.SPR_CHALLENGE_NOT_CLEAR, is_visible);
        SetFontStyle((Enum)UI.LBL_CHALLENGE_NOT_CLEAR, 1);
        SetNpcMessage();
        if (!PartyManager.IsValidNotEmptyList())
        {
            SetActive((Enum)UI.GRD_QUEST, false);
            SetActive((Enum)UI.STR_NON_LIST, true);
        }
        else
        {
            PartyModel.Party[] partys = MonoBehaviourSingleton <PartyManager> .I.partys.ToArray();

            SetActive((Enum)UI.GRD_QUEST, true);
            SetActive((Enum)UI.STR_NON_LIST, false);
            SetGrid(UI.GRD_QUEST, "QuestSearchListSelectItem", partys.Length, false, delegate(int i, Transform t, bool is_recycle)
            {
                QuestTable.QuestTableData questData = Singleton <QuestTable> .I.GetQuestData((uint)partys[i].quest.questId);
                if (questData == null)
                {
                    SetActive(t, false);
                }
                else
                {
                    SetEvent(t, "SELECT_ROOM", i);
                    SetQuestData(questData, t);
                    if (questData.questType == QUEST_TYPE.GATE || questData.questType == QUEST_TYPE.DEFENSE || questData.questType == QUEST_TYPE.WAVE)
                    {
                        SetGateData(partys[i], t, questData.questType);
                    }
                    else
                    {
                        SetPartyData(partys[i], t);
                    }
                }
            });
            base.UpdateUI();
        }
    }