public virtual void Setup(Transform t, DeliveryTable.DeliveryData info) { //IL_01bd: Unknown result type (might be due to invalid IL or missing references) //IL_040b: Unknown result type (might be due to invalid IL or missing references) SetIcon(t, info); SetDeliveryName(t, info); bool is_visible = MonoBehaviourSingleton <DeliveryManager> .I.IsCompletableDelivery((int)info.id); SetActive(t, UI.OBJ_REQUEST_OK, is_visible); SetActive(t, UI.OBJ_REQUEST_COMPLETED, false); MonoBehaviourSingleton <DeliveryManager> .I.GetDeliveryDataAllNeeds((int)info.id, out int have, out int need, out string item_name, out string limit_time); SetLabelText(t, UI.LBL_HAVE, have.ToString()); SetLabelText(t, UI.LBL_NEED, need.ToString()); SetLabelText(t, UI.LBL_NEED_ITEM_NAME, item_name); SetLabelText(t, UI.LBL_LIMIT, limit_time); SetFrame(t, info); if (info.GetUIType() == DeliveryTable.UIType.STORY) { SetActive(t, UI.SPR_TYPE_TEXT_STORY, info.GetRegionDifficultyType() == REGION_DIFFICULTY_TYPE.NORMAL); SetActive(t, UI.SPR_TYPE_TEXT_STORY_HARD, info.GetRegionDifficultyType() == REGION_DIFFICULTY_TYPE.HARD); } if (info.GetUIType() == DeliveryTable.UIType.NONE) { SetActive(t, UI.SPR_TYPE_TEXT_SUB_HARD, info.GetRegionDifficultyType() == REGION_DIFFICULTY_TYPE.HARD); } DeliveryTable.UIType uIType = info.GetUITextType(); if (uIType == DeliveryTable.UIType.NONE) { uIType = info.GetUIType(); } SetActive(t, UI.SPR_TYPE_EVENT_TEXT, uIType == DeliveryTable.UIType.EVENT); SetActive(t, UI.SPR_TYPE_DAILY_TEXT, uIType == DeliveryTable.UIType.DAILY); SetActive(t, UI.SPR_TYPE_WEEKLY_TEXT, uIType == DeliveryTable.UIType.WEEKLY); SetActive(t, UI.SPR_DROP_DIFFICULTY_RARE, info.GetDeliveryDropRarity() == DELIVERY_DROP_DIFFICULTY.RARE); SetActive(t, UI.SPR_DROP_DIFFICULTY_SUPER_RARE, info.GetDeliveryDropRarity() == DELIVERY_DROP_DIFFICULTY.SUPER_RARE); DeliveryDropRareTextColor componentInChildren = t.GetComponentInChildren <DeliveryDropRareTextColor>(); if (componentInChildren != null) { UILabel component = base.GetComponent <UILabel>(t, (Enum)UI.LBL_NEED_ITEM_NAME); if (component != null) { SetColor(t, UI.LBL_NEED_ITEM_NAME, componentInChildren.GetRarityColor(info.GetDeliveryDropRarity())); } } SetSprite(t, UI.SPR_FRAME, SPR_FRAME_TYPE[info.DeliveryTypeIndex()]); int num = 0; List <DeliveryRewardTable.DeliveryRewardData.Reward> list = new List <DeliveryRewardTable.DeliveryRewardData.Reward>(); DeliveryRewardTable.DeliveryRewardData[] deliveryRewardTableData = Singleton <DeliveryRewardTable> .I.GetDeliveryRewardTableData(info.id); if (deliveryRewardTableData != null) { DeliveryRewardTable.DeliveryRewardData[] array = deliveryRewardTableData; foreach (DeliveryRewardTable.DeliveryRewardData deliveryRewardData in array) { list.Add(deliveryRewardData.reward); } } List <PointShopGetPointTable.Data> fromDeiliveryId = Singleton <PointShopGetPointTable> .I.GetFromDeiliveryId(info.id); if (fromDeiliveryId.Any()) { foreach (PointShopGetPointTable.Data item in fromDeiliveryId) { DeliveryRewardTable.DeliveryRewardData.Reward reward = new DeliveryRewardTable.DeliveryRewardData.Reward(); reward.item_id = item.pointShopId; reward.num = item.basePoint; reward.type = REWARD_TYPE.POINT_SHOP_POINT; list.Add(reward); } } if (list.Any()) { if (list.Count >= 2) { list = (from x in list orderby GetRewardPriority(x) select x).ToList(); } UI[] array2 = new UI[2] { UI.OBJ_ICON_ROOT_1, UI.OBJ_ICON_ROOT_2 }; for (int j = 0; j < 2; j++) { bool flag = list.Count >= j + 1; SetActive(t, array2[j], flag); if (flag) { DeliveryRewardTable.DeliveryRewardData.Reward reward2 = list[j]; ItemIcon itemIcon = ItemIcon.CreateRewardItemIcon(reward2.type, reward2.item_id, FindCtrl(t, array2[j]), -1, null, 0, false, -1, false, null, false, false, ItemIcon.QUEST_ICON_SIZE_TYPE.REWARD_DELIVERY_LIST); if (itemIcon != null) { itemIcon.SetEnableCollider(false); } } } } QuestTable.QuestTableData questData = info.GetQuestData(); if (questData != null) { bool flag2 = questData.level > (int)MonoBehaviourSingleton <UserInfoManager> .I.userStatus.level; UIWidget[] componentsInChildren = FindCtrl(t, UI.SPR_FRAME).GetComponentsInChildren <UIWidget>(); UIWidget[] array3 = componentsInChildren; foreach (UIWidget uIWidget in array3) { if (flag2 && !uIWidget.get_name().Contains("Mask")) { uIWidget.color = Color.get_gray(); } } SetActive(t, UI.OBJ_LEVEL_LIMIT, flag2); SetLabelText(t, UI.LBL_LEVEL_LIMIT, string.Format(StringTable.Get(STRING_CATEGORY.QUEST_DELIVERY, 3u), questData.level)); SetButtonEnabled(t, !flag2); } else { SetActive(t, UI.OBJ_LEVEL_LIMIT, false); } UIGrid component2 = base.GetComponent <UIGrid>(t, (Enum)UI.GRD_ICON_ROOT); if (component2 != null) { component2.Reposition(); } }
public override void UpdateUI() { //IL_0089: Unknown result type (might be due to invalid IL or missing references) //IL_0145: Unknown result type (might be due to invalid IL or missing references) //IL_014f: Unknown result type (might be due to invalid IL or missing references) //IL_01df: Unknown result type (might be due to invalid IL or missing references) //IL_01e4: Expected O, but got Unknown //IL_05e2: Unknown result type (might be due to invalid IL or missing references) //IL_05ff: Unknown result type (might be due to invalid IL or missing references) //IL_07e0: Unknown result type (might be due to invalid IL or missing references) //IL_07ed: Unknown result type (might be due to invalid IL or missing references) OpenTutorial(); UpdateTitle(); SetSprite(baseRoot, UI.SPR_WINDOW, SPR_WINDOW_TYPE[info.DeliveryTypeIndex()]); SetSprite(baseRoot, UI.SPR_MESSAGE_BG, SPR_MESSAGE_BG_TYPE[info.DeliveryTypeIndex()]); bool flag = false; if (Object.op_Implicit(submissionFrame)) { UpdateSubMissionButton(); UpdateSubMission(); flag = submissionFrame.get_gameObject().get_activeSelf(); SetActive((Enum)UI.STR_BTN_SUBMISSION, !flag); SetActive((Enum)UI.STR_BTN_SUBMISSION_BACK, flag); } Transform root = targetFrame; MonoBehaviourSingleton <DeliveryManager> .I.GetTargetEnemyData(deliveryID, out targetQuestID, out targetMapID, out string map_name, out string enemy_name, out DIFFICULTY_TYPE?difficulty, out targetPortalID); SetLabelText(root, UI.LBL_PLACE_NAME, map_name); MonoBehaviourSingleton <DeliveryManager> .I.GetAllProgressDelivery(deliveryID, out int have, out int need); SetLabelText(root, UI.LBL_HAVE, (!isComplete) ? have.ToString() : need.ToString()); SetColor(root, UI.LBL_HAVE, (!isComplete) ? Color.get_red() : Color.get_white()); SetLabelText(root, UI.LBL_NEED, need.ToString()); SetLabelText(root, UI.LBL_NEED_ITEM_NAME, MonoBehaviourSingleton <DeliveryManager> .I.GetTargetItemName(deliveryID, 0u)); if (info.IsDefeatCondition(0u)) { if (targetQuestID != 0) { isQuestEnemy = true; Transform val = FindCtrl(root, UI.OBJ_DIFFICULTY_ROOT); int value = (int)difficulty.Value; int j = 0; for (int childCount = val.get_childCount(); j < childCount; j++) { Transform t2 = val.GetChild(j); SetActive(t2, j <= value); } SetLabelText(root, UI.LBL_GET_PLACE, base.sectionData.GetText("GET_QUEST")); } else { isQuestEnemy = false; SetLabelText(root, UI.LBL_GET_PLACE, base.sectionData.GetText("GET_AREA")); } SetLabelText(root, UI.LBL_ENEMY_NAME, string.Format(StringTable.Get(STRING_CATEGORY.TEXT_SCRIPT, 3u), enemy_name)); } else { isQuestEnemy = false; SetLabelText(root, UI.LBL_GET_PLACE, StringTable.Get(STRING_CATEGORY.DELIVERY_CONDITION_PLACE, (uint)info.GetConditionType(0u))); SetLabelText(root, UI.LBL_ENEMY_NAME, enemy_name); } SetActive(root, UI.OBJ_DIFFICULTY_ROOT, isQuestEnemy); SetActive(root, UI.OBJ_ENEMY_NAME_ROOT, !isQuestEnemy); UpdateNPC(map_name, enemy_name); if ((isComplete || isNotice) && !isCompletedEventDelivery) { SetActive((Enum)UI.OBJ_BACK, false); SetActive((Enum)UI.BTN_CREATE, false); SetActive((Enum)UI.BTN_JOIN, false); SetActive((Enum)UI.BTN_MATCHING, false); UpdateUIJumpButton(JumpButtonType.Complete); } else { SetActive((Enum)UI.OBJ_BACK, true); bool flag2 = true; bool flag3 = false; if (info == null || info.IsDefeatCondition(0u) || targetMapID != 0) { if (isQuestEnemy) { if (isInGameScene) { flag2 = false; } } else { bool flag4 = FieldManager.HasWorldMap(targetMapID); if (isInGameScene) { if (MonoBehaviourSingleton <FieldManager> .I.currentMapID == targetMapID) { if (flag4) { flag3 = true; } else { flag2 = false; } } else if (flag4) { if (!MonoBehaviourSingleton <FieldManager> .I.CanJumpToMap(targetMapID) || WorldMapManager.IsValidPortalIDs(targetPortalID)) { flag3 = true; } } else if (!MonoBehaviourSingleton <FieldManager> .I.CanJumpToMap(targetMapID)) { flag2 = false; } } else if (flag4) { if (!MonoBehaviourSingleton <FieldManager> .I.CanJumpToMap(targetMapID) || WorldMapManager.IsValidPortalIDs(targetPortalID)) { flag3 = true; } } else if (!MonoBehaviourSingleton <FieldManager> .I.CanJumpToMap(targetMapID)) { flag2 = false; } } } else { flag2 = (info.GetDeliveryJumpType() != DeliveryTable.DELIVERY_JUMPTYPE.UNDEFINED); } JumpButtonType jumpButtonType = JumpButtonType.Invalid; if (flag2) { if (info != null && info.GetDeliveryJumpType() != 0) { jumpButtonType = ConvertDeliveryJumpType(); } else { if (info != null) { QuestTable.QuestTableData questData = info.GetQuestData(); if (questData != null && questData.questType == QUEST_TYPE.WAVE) { jumpButtonType = JumpButtonType.WaveRoom; } } if (jumpButtonType != JumpButtonType.WaveRoom) { jumpButtonType = ((!flag3) ? JumpButtonType.Quest : JumpButtonType.Map); } } UpdateUIJumpButton(jumpButtonType); } else { SetActive(baseRoot, UI.BTN_JUMP_QUEST, false); SetActive(baseRoot, UI.BTN_JUMP_MAP, false); SetActive(baseRoot, UI.BTN_JUMP_GACHATOP, false); SetActive(baseRoot, UI.BTN_JUMP_INVALID, false); SetActive(baseRoot, UI.BTN_WAVEMATCH_NEW, false); SetActive(baseRoot, UI.BTN_WAVEMATCH_PASS, false); SetActive(baseRoot, UI.BTN_WAVEMATCH_AUTO, false); SetActive(baseRoot, UI.BTN_COMPLETE, false); } if (flag3 && MonoBehaviourSingleton <FieldManager> .I.currentMapID != targetMapID) { SetColor(baseRoot, UI.LBL_PLACE_NAME, Color.get_red()); } else { SetColor(baseRoot, UI.LBL_PLACE_NAME, Color.get_white()); } } int money = 0; int exp = 0; if (rewardData != null) { SetGrid(baseRoot, UI.GRD_REWARD, string.Empty, rewardData.Length, false, delegate(int i, Transform t, bool is_recycle) { DeliveryRewardTable.DeliveryRewardData.Reward reward = rewardData[i].reward; bool is_visible = false; if (reward.type == REWARD_TYPE.MONEY) { money += reward.num; } else if (reward.type == REWARD_TYPE.EXP) { exp += reward.num; } else { is_visible = true; ItemIcon itemIcon = ItemIcon.CreateRewardItemIcon(reward.type, reward.item_id, t, reward.num, string.Empty, 0, false, -1, false, null, false, false, ItemIcon.QUEST_ICON_SIZE_TYPE.REWARD_DELIVERY_DETAIL); SetMaterialInfo(itemIcon.transform, reward.type, reward.item_id, null); itemIcon.SetRewardBG(true); } SetActive(t, is_visible); }); } SetLabelText(baseRoot, UI.LBL_MONEY, money.ToString()); SetLabelText(baseRoot, UI.LBL_EXP, exp.ToString()); SetActive(baseRoot, UI.OBJ_COMPLETE_ROOT, isComplete && !flag); SetActive(baseRoot, UI.OBJ_UNLOCK_PORTAL_ROOT, isComplete); if (isComplete) { string text = string.Empty; List <FieldMapTable.PortalTableData> deliveryRelationPortalData = Singleton <FieldMapTable> .I.GetDeliveryRelationPortalData(info.id); switch (deliveryRelationPortalData.Count) { case 1: { FieldMapTable.FieldMapTableData fieldMapData = Singleton <FieldMapTable> .I.GetFieldMapData(deliveryRelationPortalData[0].srcMapID); if (fieldMapData != null) { text = fieldMapData.mapName; } break; } default: text = base.sectionData.GetText("MULTI_UNLOCK"); break; case 0: break; } bool flag5 = !string.IsNullOrEmpty(text); if (!TutorialStep.HasFirstDeliveryCompleted()) { flag5 = false; } SetActive(baseRoot, UI.OBJ_UNLOCK_PORTAL_ROOT, flag5 && !isCompletedEventDelivery); SetLabelText(baseRoot, UI.LBL_UNLOCK_PORTAL, text); if (isCompletedEventDelivery) { SkipTween(baseRoot, UI.OBJ_COMPLETE_ROOT, true, 0); } else { this.StartCoroutine(StartTweenCoroutine(flag5)); } } this.StartCoroutine(SetPointShopGetPointUI()); }