コード例 #1
0
    protected virtual void OnQuery_SLOT()
    {
        int num = (int)GameSection.GetEventData();

        selectEquipIndex = num >> 16;
        selectSkillIndex = num % 65536;
        if (lookOnly || selectSkillIndex < 0 || selectEquipIndex < 0)
        {
            GameSection.StopEvent();
        }
        else if (MonoBehaviourSingleton <InventoryManager> .I.skillItemInventory.GetCount() <= 0)
        {
            GameSection.ChangeEvent("NOT_HAVE_SKILL_ITEM", null);
        }
        else
        {
            GameSection.ChangeEvent("ATTACH", null);
            EquipItemInfo equipItemInfo = equipAndSkill[selectEquipIndex].equipItemInfo;
            GameSection.SetEventData(new object[4]
            {
                callSection,
                equipItemInfo.GetSkillItem(selectSkillIndex),
                equipItemInfo,
                selectSkillIndex
            });
        }
    }
コード例 #2
0
    private void OnQuery_LIST()
    {
        int result = -1;

        if (!int.TryParse(pageNo[0] + pageNo[1] + pageNo[2], out result))
        {
            GameSection.ChangeEvent("ERROR_NOT_NUMBER", null);
        }
        else
        {
            StatusEquipList statusEquipList = MonoBehaviourSingleton <GameSceneManager> .I.FindSection("StatusEquipList") as StatusEquipList;

            if (statusEquipList != null)
            {
                int maxPageNum = statusEquipList.GetMaxPageNum();
                if (maxPageNum < result)
                {
                    GameSection.ChangeEvent("OVER_NUMBER", null);
                }
                else
                {
                    result = Mathf.Max(0, result - 1);
                    statusEquipList.UpdateUI(result);
                }
            }
        }
    }
コード例 #3
0
 private void OnQuery_SKILL_GROW()
 {
     if (MonoBehaviourSingleton <InventoryManager> .I.skillItemInventory.GetCount() == 0)
     {
         GameSection.ChangeEvent("NOT_HAVE_SKILL_ITEM", null);
     }
 }
コード例 #4
0
 private void OnQuery_SETTING()
 {
     if (MonoBehaviourSingleton <LoungeMatchingManager> .I.loungeData == null)
     {
         GameSection.ChangeEvent("ERROR", null);
     }
 }
コード例 #5
0
 protected virtual void ChangeSelectItem(EquipItemInfo select_item, EquipItemInfo old_item)
 {
     GameSection.SetEventData(new ChangeEquipData(selectEquipSetData.setNo, selectEquipSetData.index, select_item));
     if (old_item == null || select_item == null)
     {
         OnQuery_MAIN_MENU_STATUS();
     }
     else
     {
         bool flag = false;
         for (int i = 0; i < old_item.GetMaxSlot(); i++)
         {
             if (old_item.GetSkillItem(i, MonoBehaviourSingleton <StatusManager> .I.GetCurrentEquipSetNo()) != null)
             {
                 flag = true;
                 break;
             }
         }
         if (flag)
         {
             migrationOldItem    = old_item;
             migrationSelectItem = select_item;
             GameSection.ChangeEvent("MIGRATION_SKILL_CONFIRM", null);
         }
         else
         {
             OnQuery_MAIN_MENU_STATUS();
         }
     }
 }
コード例 #6
0
	protected override void OnQuery_SELECT_ITEM()
	{
		if (localInventoryEquipData == null || localInventoryEquipData.Length == 0)
		{
			GameSection.StopEvent();
		}
		else
		{
			SmithManager.SmithGrowData smithData = MonoBehaviourSingleton<SmithManager>.I.GetSmithData<SmithManager.SmithGrowData>();
			if (smithData == null)
			{
				GameSection.StopEvent();
			}
			else
			{
				EquipItemInfo selectEquipData = smithData.selectEquipData;
				if (selectEquipData.IsLevelMax())
				{
					if (selectEquipData.tableData.IsEvolve())
					{
						GameSection.ChangeEvent("EVOLVE", null);
					}
					else if (selectEquipData.IsExceedMax() && !selectEquipData.tableData.IsShadow())
					{
						GameSection.ChangeEvent("ALREADY_LV_MAX", null);
					}
				}
			}
		}
	}
コード例 #7
0
    private void OnQuery_SELECT_COMPLETED_RUSH()
    {
        int index = (int)GameSection.GetEventData();

        DeliveryTable.DeliveryData deliveryData = clearedDeliveries[index];
        if (deliveryData.GetConditionType(0u) == DELIVERY_CONDITION_TYPE.COMPLETE_DELIVERY_ID)
        {
            int id = (int)deliveryData.id;
            DeliveryRewardList deliveryRewardList = new DeliveryRewardList();
            GameSection.SetEventData(new object[3]
            {
                id,
                deliveryRewardList,
                true
            });
        }
        else
        {
            ArenaTable.ArenaData arenaData = deliveryData.GetArenaData();
            MonoBehaviourSingleton <QuestManager> .I.SetCurrentQuestID((uint)arenaData.questIds[0], true);

            MonoBehaviourSingleton <QuestManager> .I.SetCurrentArenaId(arenaData.id);

            GameSection.ChangeEvent("TO_ROOM", deliveryData);
        }
    }
コード例 #8
0
    public void OnQuery_GACHA_DETAIL_MAX_PARAM_FROM_NEWS()
    {
        object[] array = GameSection.GetEventData() as object[];
        uint     num   = (uint)array[0];
        int      num2  = (int)array[1];

        CreateEquipItemTable.CreateEquipItemData[] sortedCreateEquipItemsByPart = Singleton <CreateEquipItemTable> .I.GetSortedCreateEquipItemsByPart(num);

        if (num2 >= sortedCreateEquipItemsByPart.Length || num2 <= -1)
        {
            GameSection.StopEvent();
        }
        else
        {
            CreateEquipItemTable.CreateEquipItemData createEquipItemData = sortedCreateEquipItemsByPart[num2];
            uint equipItemID = createEquipItemData.equipItemID;
            EquipItemTable.EquipItemData equipItemData = Singleton <EquipItemTable> .I.GetEquipItemData(equipItemID);

            GameSection.ChangeEvent("DETAIL_MAX_PARAM", new object[3]
            {
                ItemDetailEquip.CURRENT_SECTION.GACHA_EQUIP_PREVIEW,
                equipItemData,
                num
            });
        }
    }
コード例 #9
0
 public void OnQuery_FRIEND()
 {
     if (MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSceneName() == "FriendScene")
     {
         GameSection.ChangeEvent("[BACK]", null);
     }
 }
コード例 #10
0
    protected void OnQuery_DETAIL()
    {
        int num = (int)GameSection.GetEventData();

        if (num >= 0 && IsEnableShowDetailByLongTap())
        {
            SaveCurrentScrollPosition();
            if (tab == TAB_MODE.EQUIP)
            {
                GameSection.ChangeEvent("DETAIL_EQUIP", new object[2]
                {
                    ItemDetailEquip.CURRENT_SECTION.SMITH_SELL,
                    inventories[(int)tab].datas[num]
                });
            }
            else if (tab == TAB_MODE.SKILL)
            {
                ItemDetailSkillSimpleDialog.InitParam event_data = new ItemDetailSkillSimpleDialog.InitParam(new object[2]
                {
                    ItemDetailEquip.CURRENT_SECTION.SMITH_SELL,
                    inventories[(int)tab].datas[num]
                }, null);
                GameSection.ChangeEvent("DETAIL_SKILL", event_data);
            }
        }
    }
コード例 #11
0
    private void OnQuery_MATERIAL()
    {
        int num = (int)GameSection.GetEventData();
        SkillItemSortData item = inventory.datas[num] as SkillItemSortData;
        bool          flag     = materialSkillItem.Find((SkillItemInfo material) => material.uniqueID == item.GetUniqID()) != null;
        SkillItemInfo item2    = item.GetItemData() as SkillItemInfo;

        if (!IsEnableSelect(inventory.datas[num]))
        {
            if (item.IsFavorite())
            {
                GameSection.ChangeEvent("NOT_MATERIAL_FAVORITE", null);
            }
        }
        else if (flag)
        {
            materialSkillItem.Remove(item2);
        }
        else if (materialSkillItem.Count < MATERIAL_SELECT_MAX)
        {
            materialSkillItem.Add(item2);
        }
        bool flag2 = isSelectMax;

        isSelectMax = (materialSkillItem.Count == MATERIAL_SELECT_MAX);
        if (flag2 != isSelectMax)
        {
            UpdateInventory();
        }
        UpdateSelectMaterialIcon();
    }
コード例 #12
0
 private void OnQuery_CLOSE()
 {
     if (MonoBehaviourSingleton <GuildManager> .I.guildData != null && MonoBehaviourSingleton <GuildManager> .I.guildData.clanId != -1)
     {
         GameSection.ChangeEvent("CLOSE_UPDATE", null);
     }
 }
コード例 #13
0
    protected override void OnQuery_DETAIL()
    {
        int num = (int)GameSection.GetEventData();

        if (isVisualMode)
        {
            GameSection.ChangeEvent("VISUAL_DETAIL", null);
            OnQuery_VISUAL_DETAIL();
        }
        else
        {
            StatusEquip.LocalEquipSetData localEquipSetData = new StatusEquip.LocalEquipSetData(selfCharaEquipSetNo, num, localEquipSet);
            object[] array = CreateSelfEventData(num);
            if (localEquipSet.item[num] == null)
            {
                MonoBehaviourSingleton <StatusManager> .I.SetEquippingItem(null);

                MonoBehaviourSingleton <InventoryManager> .I.changeInventoryType = StatusTop.GetInventoryType(localEquipSet, num);
                ItemDetailEquip.DetailEquipEventData event_data = new ItemDetailEquip.DetailEquipEventData(array, localEquipSetData);
                GameSection.ChangeEvent("CHANGE_EQUIP", event_data);
            }
            else
            {
                object[] array2 = new object[array.Length + 1];
                int      i      = 0;
                for (int num2 = array.Length; i < num2; i++)
                {
                    array2[i] = array[i];
                }
                array2[1] = GetLocalEquipSetAttachSkillListData(selfCharaEquipSetNo)[num];
                array2[array2.Length - 1] = localEquipSetData;
                GameSection.SetEventData(array2);
            }
        }
    }
コード例 #14
0
 private void OnQuery_SELECT()
 {
     selectInventoryIndex = (int)GameSection.GetEventData();
     if (selectInventoryIndex == -1)
     {
         selectedUniqueId[equipIndex] = 0uL;
     }
     else
     {
         EquipItemSortData equipItemSortData = localInventoryEquipData[selectInventoryIndex] as EquipItemSortData;
         if (equipItemSortData.IsFavorite())
         {
             GameSection.ChangeEvent("NOT_SELECT_FAVORITE", null);
             return;
         }
         if (equipItemSortData.IsEquipping())
         {
             GameSection.ChangeEvent("NOT_SELECT_EQUIPPING", null);
             return;
         }
         if (equipItemSortData.GetLevel() < needLv)
         {
             GameSection.ChangeEvent("NOT_SELECT_LOW_LEVEL", null);
             return;
         }
         selectedUniqueId[equipIndex] = equipItemSortData.GetUniqID();
     }
     GameSection.SetEventData(selectedUniqueId);
 }
コード例 #15
0
    protected override void OnQuery_TRY_ON()
    {
        bool flag = GameSceneEvent.current.eventName == "TRY_ON";

        if (localInventoryEquipData != null && localInventoryEquipData.Length != 0)
        {
            selectInventoryIndex = (int)GameSection.GetEventData();
            SortCompareData sortCompareData = localInventoryEquipData[selectInventoryIndex];
            if (sortCompareData != null)
            {
                ulong uniqID = sortCompareData.GetUniqID();
                if (uniqID != 0L)
                {
                    SmithManager.SmithGrowData smithData = MonoBehaviourSingleton <SmithManager> .I.GetSmithData <SmithManager.SmithGrowData>();

                    smithData.selectEquipData = MonoBehaviourSingleton <InventoryManager> .I.equipItemInventory.Find(uniqID);
                }
                base.OnQuery_TRY_ON();
                if (flag)
                {
                    GameSection.ChangeEvent("SELECT_ITEM", null);
                    OnQuery_SELECT_ITEM();
                }
            }
        }
    }
コード例 #16
0
 public void OnQuery_PROFILE()
 {
     if (MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentSceneName() == "ProfileScene")
     {
         GameSection.ChangeEvent("[BACK]", null);
     }
 }
コード例 #17
0
 protected virtual void OnQuery_CLOSE()
 {
     if (IsOpenFromGachaQuest())
     {
         GameSection.ChangeEvent("BACK_TO_QUEST_SELECT", null);
     }
 }
コード例 #18
0
    public override void OnQuery_FOLLOW_INFO()
    {
        //IL_00af: Unknown result type (might be due to invalid IL or missing references)
        //IL_00b4: Expected O, but got Unknown
        int index = (int)GameSection.GetEventData();

        FriendMessageUserListModel.MessageUserInfo messageUserInfo = recvdata[index];
        if (messageUserInfo == null)
        {
            GameSection.StopEvent();
        }
        else if (!messageUserInfo.isPermitted)
        {
            GameSection.ChangeEvent("NOT_PERMITTED", null);
        }
        else
        {
            GameSection.ChangeEvent("TO_MESSAGE", null);
            GameSection.StayEvent();
            MonoBehaviourSingleton <FriendManager> .I.SendGetMessageDetailList(messageUserInfo.userId, 0, delegate(bool is_success)
            {
                GameSection.ResumeEvent(is_success, null);
            });

            MonoBehaviourSingleton <FriendManager> .I.SetNoReadMessageNum(MonoBehaviourSingleton <FriendManager> .I.noReadMessageNum - messageUserInfo.noReadNum);

            messageUserInfo.noReadNum = 0;
            Transform t = GetCtrl(UI.GRD_LIST).FindChild(index.ToString());
            SetBadge(t, messageUserInfo.noReadNum, 3, -10, -6, false);
        }
    }
コード例 #19
0
 protected override void OnQuery_DETAIL()
 {
     if (isVisualMode)
     {
         GameSection.ChangeEvent("VISUAL_DETAIL", null);
         OnQuery_VISUAL_DETAIL();
     }
     else
     {
         int num = (int)GameSection.GetEventData();
         if (localEquipSet.item[num] == null)
         {
             GameSection.StopEvent();
         }
         else if (isSelfData)
         {
             GameSection.SetEventData(CreateSelfEventData(num));
         }
         else
         {
             GameSection.SetEventData(new object[4]
             {
                 ItemDetailEquip.CURRENT_SECTION.QUEST_RESULT,
                 GetEquipSetAttachSkillListData(record.charaInfo.equipSet)[num],
                 record.charaInfo.sex,
                 record.charaInfo.faceId
             });
         }
     }
 }
コード例 #20
0
 private void OnQuery_CREATE_WEAPON()
 {
     if (!MonoBehaviourSingleton <UserInfoManager> .I.CheckTutorialBit(TUTORIAL_MENU_BIT.FORGE_ITEM))
     {
         if (MonoBehaviourSingleton <SmithManager> .I.smithBadgeData.GetBadgeNum(EQUIPMENT_TYPE.ARROW) > 0)
         {
             GameSection.ChangeEvent("CREATE", EQUIPMENT_TYPE.ARROW);
         }
         else if (MonoBehaviourSingleton <SmithManager> .I.smithBadgeData.GetBadgeNum(EQUIPMENT_TYPE.TWO_HAND_SWORD) > 0)
         {
             GameSection.ChangeEvent("CREATE", EQUIPMENT_TYPE.TWO_HAND_SWORD);
         }
         else if (MonoBehaviourSingleton <SmithManager> .I.smithBadgeData.GetBadgeNum(EQUIPMENT_TYPE.SPEAR) > 0)
         {
             GameSection.ChangeEvent("CREATE", EQUIPMENT_TYPE.SPEAR);
         }
         else if (MonoBehaviourSingleton <SmithManager> .I.smithBadgeData.GetBadgeNum(EQUIPMENT_TYPE.PAIR_SWORDS) > 0)
         {
             GameSection.ChangeEvent("CREATE", EQUIPMENT_TYPE.PAIR_SWORDS);
         }
         else
         {
             GameSection.ChangeEvent("CREATE", EQUIPMENT_TYPE.ONE_HAND_SWORD);
         }
     }
     else
     {
         GameSection.ChangeEvent("CREATE", EQUIPMENT_TYPE.ONE_HAND_SWORD);
     }
 }
コード例 #21
0
 private void OnQuery_CREATE()
 {
     if (MonoBehaviourSingleton <UserInfoManager> .I.userStatus.crystal < 15)
     {
         GameSection.ChangeEvent("DONT_HAVE_GEM", null);
     }
 }
コード例 #22
0
 private void OnQuery_NEXT()
 {
     if (MonoBehaviourSingleton <QuestManager> .I.compData == null)
     {
         GameSection.ChangeEvent("FAILED", null);
     }
 }
コード例 #23
0
 protected override void OnQuery_SELECT_ITEM()
 {
     if (OnSelectItemAndChekIsGoStatus())
     {
         GameSection.ChangeEvent("USER_EQUIP", null);
     }
 }
コード例 #24
0
 protected override void ChangeSelectItem(EquipItemInfo select_item, EquipItemInfo old_item)
 {
     GameSection.SetEventData(new ChangeEquipData(base.selectEquipSetData.setNo, base.selectEquipSetData.index, select_item));
     if (old_item == null || select_item == null)
     {
         GameSection.ChangeEvent("USER_EQUIP", null);
     }
     else
     {
         bool flag = false;
         for (int i = 0; i < old_item.GetMaxSlot(); i++)
         {
             if (old_item.GetSkillItem(i, MonoBehaviourSingleton <StatusManager> .I.GetCurrentEquipSetNo()) != null)
             {
                 flag = true;
                 break;
             }
         }
         if (flag)
         {
             migrationOldItem    = old_item;
             migrationSelectItem = select_item;
             object eventData = GameSection.GetEventData();
             GameSection.ChangeEvent("MIGRATION_SKILL_CONFIRM", null);
         }
         else
         {
             GameSection.ChangeEvent("USER_EQUIP", null);
         }
     }
 }
コード例 #25
0
 private void ToNotEnableSkillTypeConfirm()
 {
     //IL_0057: Unknown result type (might be due to invalid IL or missing references)
     if (is_not_enable_skill_type)
     {
         is_not_enable_skill_type = false;
         GameSection.ChangeEvent("COME_BACK", null);
         Action action = delegate
         {
             SortCompareData sortCompareData = inventory.datas[selectIndex];
             SkillItemInfo   skillItemInfo   = sortCompareData.GetItemData() as SkillItemInfo;
             EQUIPMENT_TYPE? enableEquipType = skillItemInfo.tableData.GetEnableEquipType();
             DispatchEvent("NOT_SKILL_ENABLE_TYPE", new object[1]
             {
                 MonoBehaviourSingleton <StatusManager> .I.GetEquipItemGroupString(enableEquipType.Value)
             });
         };
         if (MonoBehaviourSingleton <GameSceneManager> .I.GetCurrentScreenName().Contains(this.get_name()))
         {
             action();
         }
         else
         {
             this.StartCoroutine(DelayCall(action));
         }
     }
 }
コード例 #26
0
 private void CheckChangeEvent(bool is_send, string event_name = "", object event_data = null)
 {
     if (is_send)
     {
         GameSection.ChangeEvent(event_name, event_data);
     }
 }
コード例 #27
0
    protected void OnQuery_GROW()
    {
        if (MonoBehaviourSingleton <SmithManager> .I.GetSmithData <SmithManager.SmithGrowData>() == null)
        {
            MonoBehaviourSingleton <SmithManager> .I.CreateSmithData <SmithManager.SmithGrowData>();
        }
        EquipItemInfo equipItemInfo = detailItemData as EquipItemInfo;

        MonoBehaviourSingleton <SmithManager> .I.GetSmithData <SmithManager.SmithGrowData>().selectEquipData = equipItemInfo;

        if (equipItemInfo.IsLevelMax() && equipItemInfo.tableData.IsEvolve())
        {
            GameSection.SetEventData(new object[2]
            {
                SmithEquipBase.SmithType.EVOLVE,
                (detailItemData as EquipItemInfo).tableData.type
            });
            GameSection.ChangeEvent("EVOLVE", null);
        }
        else
        {
            GameSection.SetEventData(new object[2]
            {
                SmithEquipBase.SmithType.GROW,
                (detailItemData as EquipItemInfo).tableData.type
            });
        }
    }
コード例 #28
0
 protected virtual void OnQuery_DETAIL()
 {
     if (isVisualMode)
     {
         GameSection.ChangeEvent("VISUAL_DETAIL", null);
         OnQuery_VISUAL_DETAIL();
     }
     else
     {
         int      num   = (int)GameSection.GetEventData();
         object[] array = new object[4]
         {
             ItemDetailEquip.CURRENT_SECTION.QUEST_RESULT,
             GetEquipSetAttachSkillListData(data.equipSet)[num],
             data.sex,
             data.faceId
         };
         GameSection.SetEventData(new object[3]
         {
             array,
             false,
             false
         });
     }
 }
コード例 #29
0
 public void OnQuery_YES()
 {
     if (num >= item.GetNum())
     {
         GameSection.ChangeEvent("CLOSE_DETAIL", null);
     }
     if (item is ItemSortData)
     {
         GameSection.StayEvent();
         SendItem(delegate(bool b)
         {
             GameSection.ResumeEvent(b, null);
         });
     }
     else if (item is EquipItemSortData)
     {
         GameSection.StayEvent();
         sellConfirm(delegate(bool b)
         {
             if (!b)
             {
                 Debug.LogWarning((object)"sellConfirm = false");
                 GameSection.ResumeEvent(false, null);
             }
             else
             {
                 GameSection.ChangeStayEvent("NON_STACK_SELL", null);
                 SendEquip(new List <string>
                 {
                     item.GetUniqID().ToString()
                 }, delegate(bool is_success)
                 {
                     GameSection.ResumeEvent(is_success, null);
                 });
             }
         });
     }
     else if (item is SkillItemSortData)
     {
         GameSection.ChangeEvent("NON_STACK_SELL", null);
         List <string> list = new List <string>();
         list.Add(item.GetUniqID().ToString());
         GameSection.StayEvent();
         SendSkill(list, delegate(bool b)
         {
             GameSection.ResumeEvent(b, null);
         });
     }
     else if (item is AbilityItemSortData)
     {
         GameSection.StayEvent();
         List <string> list2 = new List <string>();
         list2.Add(item.GetUniqID().ToString());
         SendAbilityItem(list2, delegate(bool is_success)
         {
             GameSection.ResumeEvent(is_success, null);
         });
     }
 }
コード例 #30
0
 protected override void OnQuery_START()
 {
     if (MonoBehaviourSingleton <AchievementManager> .I.CheckEquipItemCollection(GetEquipTableData()))
     {
         GameSection.ChangeEvent("START_REGISTED", null);
     }
     base.OnQuery_START();
 }