public void SendTutorialBit(TUTORIAL_MENU_BIT bit, Action <bool> call_back = null) { if (!TutorialStep.HasAllTutorialCompleted()) { if (call_back != null) { call_back(false); } } else if (CheckTutorialBit(bit)) { if (call_back != null) { call_back(true); } } else { UserStatusTutorialModel.RequestSendForm requestSendForm = new UserStatusTutorialModel.RequestSendForm(); requestSendForm.bit = (int)bit; Protocol.Send(UserStatusTutorialModel.URL, requestSendForm, delegate(UserStatusTutorialModel ret) { bool obj = ErrorCodeChecker.IsSuccess(ret.Error); if (call_back != null) { call_back(obj); } }, string.Empty); } }
public static void SendTutorialBit(TUTORIAL_MENU_BIT bit, Action <bool> callback = null) { Protocol.Force(delegate { MonoBehaviourSingleton <UserInfoManager> .I.SendTutorialBit(bit, callback); }); }
public bool CheckTutorialBitUnlock(TUTORIAL_MENU_BIT bit, long oldTutorialBit) { if ((oldTutorialBit & (1L << (int)bit)) != 0) { return(false); } return(CheckTutorialBit(bit)); }
public bool CheckTutorialBit(TUTORIAL_MENU_BIT bit) { if (bit == TUTORIAL_MENU_BIT.MAX) { return(false); } return((userStatus.TutorialBit & (1L << (int)bit)) != 0); }
private void Start() { //IL_0041: Unknown result type (might be due to invalid IL or missing references) if (MonoBehaviourSingleton <UserInfoManager> .I.userStatus.IsTutorialBitReady) { TUTORIAL_MENU_BIT bit = (TUTORIAL_MENU_BIT)(int)Enum.Parse(typeof(TUTORIAL_MENU_BIT), TutorialBitString); if (!MonoBehaviourSingleton <UserInfoManager> .I.CheckTutorialBit(bit)) { this.get_gameObject().SetActive(false); } } }
public TutorialMessageData GetEnableExecTutorial(string section_name, bool is_force, bool is_new_section, string event_name = null) { TutorialReadData save_data = Singleton <TutorialMessageTable> .I.ReadData; List <TutorialMessageData> list = new List <TutorialMessageData>(); tutorialSectionMessages.ForEach(delegate(TutorialMessageData o) { if (!(o.sectionName != section_name)) { if (!TutorialStep.HasAllTutorialCompleted() && o.completedTutorialStep != -1) { if (o.completedTutorialStep == 0 || (MonoBehaviourSingleton <UserInfoManager> .IsValid() && MonoBehaviourSingleton <UserInfoManager> .I.userStatus.tutorialStep >= o.completedTutorialStep) || (o.sceneName == "StatusScene" && o.sectionName == "StatusTop" && o.messageId == 1 && TutorialStep.isChangeLocalEquip)) { return; } } else if ((o.completedTutorialStep != 0 && o.completedTutorialStep != -1) || (!is_force && !o.GetFinishTutorialBit().HasValue&& o.completedTutorialStep >= 0 && save_data.HasRead(o.tutorialId)) || (o.appearId > 0 && !save_data.HasRead(o.appearId)) || (o.appearId < 0 && save_data.LastRead() != -o.appearId)) { return; } if (o.GetFinishTutorialBit().HasValue) { TUTORIAL_MENU_BIT value = o.GetFinishTutorialBit().Value; if (MonoBehaviourSingleton <UserInfoManager> .I.CheckTutorialBit(value)) { return; } } if (o.GetAppearTutorialBit().HasValue) { TUTORIAL_MENU_BIT value2 = o.GetAppearTutorialBit().Value; if (!MonoBehaviourSingleton <UserInfoManager> .I.CheckTutorialBit(value2)) { return; } } if ((o.appearDeliveryId == 0 || (MonoBehaviourSingleton <DeliveryManager> .IsValid() && MonoBehaviourSingleton <DeliveryManager> .I.IsClearDelivery((uint)o.appearDeliveryId))) && (!o.isNewSectionOnly || is_new_section)) { if (!string.IsNullOrEmpty(event_name)) { if (o.triggerEventName != event_name) { return; } } else if (!string.IsNullOrEmpty(o.triggerEventName)) { return; } if ((!(o.sectionName == "WorldMap") && !(o.sectionName == "RegionMap")) || !string.IsNullOrEmpty(event_name) || !MonoBehaviourSingleton <WorldMapManager> .IsValid() || (!MonoBehaviourSingleton <WorldMapManager> .I.isDisplayQuestTargetMode() && !MonoBehaviourSingleton <WorldMapManager> .I.ignoreTutorial)) { if (o.sectionName == "EquipSetDetailAttachSkillDialog" && !string.IsNullOrEmpty(o.checkKeyword)) { uint target_id = uint.Parse(o.checkKeyword); bool find_non_equip_attack_skill = false; MonoBehaviourSingleton <InventoryManager> .I.ForAllSkillItemInventory(delegate(SkillItemInfo data) { if (!find_non_equip_attack_skill && data != null && data.tableData.type == SKILL_SLOT_TYPE.ATTACK && !data.isAttached && target_id != data.tableID) { find_non_equip_attack_skill = true; } }); if (!find_non_equip_attack_skill) { return; } bool is_equip_first_slot = false; if (MonoBehaviourSingleton <StatusManager> .I.GetLocalEquipSet() == null) { MonoBehaviourSingleton <StatusManager> .I.CreateLocalEquipSetData(); } int eSetNo = MonoBehaviourSingleton <UserInfoManager> .I.userStatus.eSetNo; EquipItemInfo main_weapon = MonoBehaviourSingleton <StatusManager> .I.GetLocalEquipSet()[eSetNo].item[0]; if (main_weapon != null) { MonoBehaviourSingleton <InventoryManager> .I.ForAllSkillItemInventory(delegate(SkillItemInfo data) { if (!is_equip_first_slot && data != null) { EquipSetSkillData equipSetSkillData = data.equipSetSkill.Find((EquipSetSkillData x) => x.equipSetNo == MonoBehaviourSingleton <StatusManager> .I.GetCurrentEquipSetNo()); if (equipSetSkillData != null && equipSetSkillData.equipItemUniqId == main_weapon.uniqueID && equipSetSkillData.equipSlotNo == 0) { is_equip_first_slot = true; } } }); } if (!is_equip_first_slot) { int index = o.messageData.Count - 1; o.messageData[index].waitEventName = o.messageData[index].waitEventName.Replace("_DETAIL", string.Empty); Debug.LogWarning((object)("replace : " + o.messageData[index].waitEventName)); } } list.Add(o); } } } }); if (list.Count == 0) { return(null); } list.Sort((TutorialMessageData l, TutorialMessageData r) => l.messageId - r.messageId); return(list[0]); }