示例#1
0
    /// <summary>
    /// フレンド申請受諾通信
    /// </summary>
    private void sendFriendConsent()
    {
        uint[] selectFriendArray = new uint[1];
        selectFriendArray[0] = m_SelectFriend.FriendData.user_id;

        ServerDataUtilSend.SendPacketAPI_FriendConsent(selectFriendArray)
        .setSuccessAction(_data =>
        {
            UserDataAdmin.Instance.m_StructFriendList = UserDataAdmin.FriendListClipNotExist(_data.GetResult <RecvFriendConsent>().result.friend);

            Dialog _newDialog = Dialog.Create(DialogType.DialogOK);
            _newDialog.SetDialogTextFromTextkey(DialogTextType.Title, "fr157q_title");
            _newDialog.SetDialogTextFromTextkey(DialogTextType.MainText, "fr157q_content");
            _newDialog.SetDialogTextFromTextkey(DialogTextType.OKText, "common_button1");
            _newDialog.SetDialogEvent(DialogButtonEventType.OK, () =>
            {
                MainMenuManager.Instance.SubTab.updateTabItem();

                updateFriendList();

                StartCoroutine(MainMenuWebViewShowChk.PopupWebViewStart(MainMenuWebViewShowChk.PopupWebViewType.Mission));
            });
            _newDialog.Show();
        })
        .setErrorAction(_data =>
        {
            MainMenuUtil.openFriendRequestErrorDialog(_data.m_PacketCode);
        })
        .SendStart();
    }
示例#2
0
    /// <summary>
    /// フレンド申請キャンセル通信
    /// </summary>
    private void sendFriendRequestCancel()
    {
        uint[] selectFriendArray = new uint[1];
        selectFriendArray[0] = m_SelectFriend.FriendData.user_id;
        ServerDataUtilSend.SendPacketAPI_FriendRefusal(selectFriendArray)
        .setSuccessAction(_data =>
        {
            UserDataAdmin.Instance.m_StructFriendList = UserDataAdmin.FriendListClipNotExist(_data.GetResult <RecvFriendRefusal>().result.friend);

            Dialog _newDialog = Dialog.Create(DialogType.DialogOK);
            _newDialog.SetDialogTextFromTextkey(DialogTextType.Title, "fr159q_title");
            string mainFormat = GameTextUtil.GetText("fr159q_content");
            _newDialog.SetDialogText(DialogTextType.MainText, string.Format(mainFormat, m_SelectFriend.FriendData.user_name));
            _newDialog.SetDialogTextFromTextkey(DialogTextType.OKText, "common_button1");
            _newDialog.SetDialogEvent(DialogButtonEventType.OK, () =>
            {
                MainMenuManager.Instance.SubTab.updateTabItem();

                updateFriendList();
            });
            _newDialog.Show();
        })
        .setErrorAction(_data =>
        {
            MainMenuUtil.openFriendRequestErrorDialog(_data.m_PacketCode);
        })
        .SendStart();
    }
    private void updateAreaAmend(uint area_id)
    {
        MasterDataArea areaMaster = MasterFinder <MasterDataArea> .Instance.Find((int)area_id);

        if (areaMaster == null)
        {
            return;
        }

        m_AreaAmendParam = MainMenuUtil.CreateAreaParamAmend(areaMaster);

        m_ChallengeSelect.IsViewFlag = false;
        m_AreaFlagTime    = 0.0f;
        m_CurrentAreaFlag = 0;
        m_AreaFlagSprits.Clear();
        m_AreaFlagValue.Clear();

        if (m_AreaAmendParam.m_FlagAmendCoin)
        {
            m_AreaFlagSprits.Add(ResourceManager.Instance.Load("flag_coin"));
            m_AreaFlagValue.Add(getStringFlagRate(m_AreaAmendParam.m_QuestSelectAreaAmendCoin));
        }
        if (m_AreaAmendParam.m_FlagAmendDrop)
        {
            m_AreaFlagSprits.Add(ResourceManager.Instance.Load("flag_drop"));
            m_AreaFlagValue.Add(getStringFlagRate(m_AreaAmendParam.m_QuestSelectAreaAmendDrop));
        }
        if (m_AreaAmendParam.m_FlagAmendEXP)
        {
            m_AreaFlagSprits.Add(ResourceManager.Instance.Load("flag_exp"));
            m_AreaFlagValue.Add(getStringFlagRate(m_AreaAmendParam.m_QuestSelectAreaAmendEXP));
        }
        if (m_AreaAmendParam.m_FlagAmendTicket)
        {
            m_AreaFlagSprits.Add(ResourceManager.Instance.Load("flag_ticket"));
            m_AreaFlagValue.Add(getStringFlagRate(m_AreaAmendParam.m_QuestSelectAreaAmendTicket));
        }
        if (m_AreaAmendParam.m_FlagAmendStamina)
        {
            m_AreaFlagSprits.Add(ResourceManager.Instance.Load("flag_stm"));
            m_AreaFlagValue.Add("");
        }
        if (m_AreaAmendParam.m_FlagAmendGuerrillaBoss)
        {
            m_AreaFlagSprits.Add(ResourceManager.Instance.Load("flag_boss"));
            m_AreaFlagValue.Add("");
        }
        if (m_AreaAmendParam.m_FlagAmendLinkPoint)
        {
            m_AreaFlagSprits.Add(ResourceManager.Instance.Load("flag_link"));
            m_AreaFlagValue.Add(getStringFlagRate(m_AreaAmendParam.m_QuestSelectAreaAmendLinkPoint));
        }

        if (m_AreaFlagSprits.Count != 0)
        {
            m_ChallengeSelect.IsViewFlag = true;
            m_ChallengeSelect.FlagImage  = m_AreaFlagSprits[m_CurrentAreaFlag];
            m_ChallengeSelect.FlagValue  = m_AreaFlagValue[m_CurrentAreaFlag];
        }
    }
示例#4
0
    /// <summary>
    /// 素材選択で選択できるユニットかどうか
    /// </summary>
    /// <param name="_unit"></param>
    /// <returns></returns>
    private bool CheckMaterialUnit(PacketStructUnit _unit)
    {
        //ベース素材
        if (m_BaseUnit != null &&
            m_BaseUnit.unique_id == _unit.unique_id)
        {
            return(true);
        }
        //素材対象
        if (!IsMaterialUnit(_unit.id))
        {
            return(false);
        }
        // リンクチェック
        if (_unit.link_info != (int)CHARALINK_TYPE.CHARALINK_TYPE_NONE)
        {
            return(false);
        }
        // パーティチェック
        if (MainMenuUtil.ChkUnitPartyAssign(_unit.unique_id))
        {
            return(false);
        }
        // お気に入り
        if (MainMenuUtil.ChkUnitFavorite(_unit.unique_id))
        {
            return(false);
        }

        return(true);
    }
示例#5
0
    public void updateUnitList()
    {
        PacketStructUnit[] unitlist = UserDataAdmin.Instance.m_StructPlayer.unit_list;

        List <UnitGridContext> unitList = new List <UnitGridContext>();

        for (int i = 0; i < unitlist.Length; i++)
        {
            var             model = new ListItemModel((uint)i);
            UnitGridContext unit  = new UnitGridContext(model);
            unit.CharaMasterData = MasterFinder <MasterDataParamChara> .Instance.Find((int)unitlist[i].id);

            unit.UnitData = unitlist[i];
            unit.SetUnitParam(unit.UnitData, unit.CharaMasterData);
            if (CheckUnit(unitlist[i].unique_id))
            {
                unit.UnitIconType = MasterDataDefineLabel.UnitIconType.NONE;
            }
            else
            {
                unit.UnitIconType = MasterDataDefineLabel.UnitIconType.GRAY_OUT_ENABLE_BUTTON;
            }

            if (unitlist[i].link_info != (int)CHARALINK_TYPE.CHARALINK_TYPE_NONE)
            {
                unit.LinkMark = MainMenuUtil.GetLinkMark(unitlist[i], null);
            }

            unitList.Add(unit);
        }

        m_UnitGrid.CreateList(unitList);
        m_UnitGrid.ClickUnitAction     = SelectUnit;
        m_UnitGrid.LongPressUnitAction = SelectUnitLongPress;
    }
示例#6
0
    private void sendFriendRequest()
    {
        uint[] useridArray = new uint[1];
        useridArray[0] = m_SearchUserId;
        ServerDataUtilSend.SendPacketAPI_FriendRequest(useridArray)
        .setSuccessAction(_data =>
        {
            UserDataAdmin.Instance.m_StructFriendList = UserDataAdmin.FriendListClipNotExist(_data.GetResult <RecvFriendRequest>().result.friend);
            // すでにお気に入り登録しているフレンドの可能性があるので削除しておく
            LocalSaveManager.Instance.SaveFuncAddFavoriteFriend(useridArray[0], false, true);

            MainMenuManager.Instance.SubTab.updateTabItem();

            Dialog _newDialog = Dialog.Create(DialogType.DialogOK);
            _newDialog.SetDialogTextFromTextkey(DialogTextType.Title, "fr164q_title");
            _newDialog.SetDialogTextFromTextkey(DialogTextType.MainText, "fr164q_content");
            _newDialog.SetDialogTextFromTextkey(DialogTextType.OKText, "common_button1");
            _newDialog.EnableFadePanel();
            _newDialog.Show();

            resetSearchUserId();
        })
        .setErrorAction(_data =>
        {
            MainMenuUtil.openFriendRequestErrorDialog(_data.m_PacketCode, resetSearchUserId);
        })
        .SendStart();
    }
示例#7
0
    public void setupEvolveUnit(MasterDataParamChara _master, PacketStructUnit _unit_data = null)
    {
        if (_master == null)
        {
            return;
        }

        EvolUnitIcon.IsActiveIcon = true;
        UnitIconImageProvider.Instance.Get(
            _master.fix_id,
            sprite =>
        {
            EvolUnitIcon.IconImage = sprite;
        },
            true);

        if (_unit_data != null)
        {
            EvolUnitIcon.LinkIcon = MainMenuUtil.GetLinkMark(_unit_data);
        }
        EvolUnitIcon.CharaNo      = _master.draw_id;
        EvolUnitIcon.chara_fix_id = _master.fix_id;

        EvolUnitIcon.Attribute_circle = MainMenuUtil.GetElementCircleSprite(_master.element);
    }
示例#8
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="hasAreaCount"></param>
    /// <param name="hasSelectArea"></param>
    private void updateEpisodeListInfo(ref int hasAreaCount, ref bool hasSelectArea)
    {
        hasAreaCount  = 0;
        hasSelectArea = false;

        for (int i = 0; i < m_QuestSelect.EpisodeList.Count; ++i)
        {
            updateEpsodeTime(m_QuestSelect.EpisodeList[i], m_QuestSelect.EpisodeList[i].master);

            bool hasArea           = false;
            bool hasQuestCleard    = true;
            bool hasQuestCompleted = true;
            bool hasQuestNew       = false;
            MasterDataGuerrillaBoss guerrillaBoss = null;

            MainMenuUtil.ChkActiveArea(m_MasterAreaCategory, m_QuestSelect.EpisodeList[i].master, ref hasArea, ref hasQuestCompleted, ref hasQuestCleard, ref hasQuestNew, ref guerrillaBoss);

            updateEpisodeFlag(m_QuestSelect.EpisodeList[i], hasQuestCleard, hasQuestCompleted, guerrillaBoss);

            if (hasArea == true)
            {
                if (i == m_SelectAreaIndex)
                {
                    hasSelectArea = true;
                }

                hasAreaCount++;
            }
        }
    }
示例#9
0
    public QuestMissionContext(PacketAchievement clearAchievement)
    {
        MasterDataPresent presentData = (!clearAchievement.present_ids.IsNullOrEmpty()) ? MasterDataUtil.GetPresentParamFromID(clearAchievement.present_ids[0]) : null;

        if (presentData != null)
        {
            //TODO MasterDataAchievementConverted → PresentMasterCount とまとめたい
            fix_id = clearAchievement.fix_id;
            int  mastercount = 1;
            uint presentid   = clearAchievement.present_ids[0];
            for (int j = 1; j < clearAchievement.present_ids.Length; j++)
            {
                if (presentid == clearAchievement.present_ids[j])
                {
                    mastercount += 1;
                }
            }

            int itemValue = MasterDataUtil.GetPresentCount(presentData) * mastercount;

            Title    = clearAchievement.draw_msg;
            ItemName = MasterDataUtil.GetPresentName(presentData);
            MainMenuUtil.GetPresentIcon(
                presentData,
                sprite =>
            {
                IconImage = sprite;
            });
            IsViewCount = false;
            ItemValue   = (itemValue > 0) ? itemValue.ToString() : "";
        }
    }
示例#10
0
    /// <summary>
    ///
    /// </summary>
    /// <param name="present_ids"></param>
    private void setupPresent(int[] present_ids)
    {
        MasterDataPresent present = MasterDataUtil.GetPresentParamFromID((uint)present_ids[0]);

        m_SpriteName = string.Empty;
        MainMenuUtil.GetPresentIcon(present, ref m_SpriteName, (sprite) =>
        {
            if (MainMenuUtil.IsWriteIcon(ref m_SpriteName, sprite))
            {
                IconImage = sprite;
            }
        });

        ItemName = MasterDataUtil.GetPresentName(present);
        int num   = MasterDataUtil.GetPresentCount(present);
        int count = 0;

        for (int i = 0; i < present_ids.Length; i++)
        {
            if (present_ids[0] == present_ids[i])
            {
                count++;
            }
        }

        ItemNum = string.Format("{0}", num * count);
    }
    /// <summary>
    /// リンクキャラの作成
    /// </summary>
    /// <param name="unit"></param>
    void SetupLinkChara(PartyMemberUnitContext unit)
    {
        if (unit != null && unit.UnitData != null)
        {
            var linkData = CharaLinkUtil.GetLinkUnit(unit.UnitData.link_unique_id);
            List <MasterDataParamChara> charaMasterList = MasterFinder <MasterDataParamChara> .Instance.FindAll();

            if (linkData != null && linkData.id > 0)
            {
                unit.LinkCharaMaster = charaMasterList.Find((v) => v.fix_id == linkData.id);
                UnitIconImageProvider.Instance.Get(
                    linkData.id,
                    sprite =>
                {
                    unit.LinkUnitImage = sprite;
                });
                unit.IsEmptyLinkUnit = false;

                if (unit.LinkCharaMaster != null)
                {
                    unit.LinkOutSideCircleImage = MainMenuUtil.GetElementCircleSprite(unit.LinkCharaMaster.element);
                }
                return;
            }
        }
        unit.LinkOutSideCircleImage = ResourceManager.Instance.Load("icon_circle_deco", ResourceType.Common);
        unit.LinkUnitImage          = ResourceManager.Instance.Load("icon_empty2", ResourceType.Menu);
        unit.IsEmptyLinkUnit        = true;
    }
    /// <summary>
    /// ユニットリストの作成
    /// </summary>
    void CreateUnitGrid()
    {
        //ユニット情報構築
        PacketStructUnit[] party = new PacketStructUnit[m_PartyMemberUnitGroup.Units.Count];
        for (int i = 0; i < m_PartyMemberUnitGroup.Units.Count; ++i)
        {
            party[i] = m_PartyMemberUnitGroup.Units[i].UnitData;
        }

        List <UnitGridContext> unitList = MainMenuUtil.MakeUnitGridContextList(party);

        if (unitList == null)
        {
            Debug.LogError("unitlist is null");
            return;
        }

        m_UnitGrid.OnClickSortButtonAction = OnClockSortButton;
        m_UnitGrid.ClickUnitAction         = OnSelectUnit;
        m_UnitGrid.LongPressUnitAction     = OnSelectUnitLongPress;

        m_UnitGrid.SetUpSortData(LocalSaveManager.Instance.LoadFuncSortFilterPartyForm());
        m_UnitGrid.CreateList(unitList);

        m_UnitGrid.SetupUnitSelected = SetupUintSelected;
    }
示例#13
0
    public void setup(MasterDataParamChara _master)
    {
        IconSelect = MainMenuUtil.GetElementCircleSprite(_master.element);
        UnitIconImageProvider.Instance.Get(
            _master.fix_id,
            sprite =>
        {
            Icon = sprite;
        });

        CharaName = _master.name;
        string noFormat = GameTextUtil.GetText("unit_status1");

        CharaNo = string.Format(noFormat, _master.draw_id);
        Rarity  = (uint)_master.rare + 1;

        RaceImage = MainMenuUtil.GetTextKindSprite(_master.kind, false);
        if (_master.sub_kind != MasterDataDefineLabel.KindType.NONE)
        {
            SubRaceImage = MainMenuUtil.GetTextKindSprite(_master.sub_kind, false);
        }
        else
        {
            SubRaceImage = null;
        }

        AttributeImage      = MainMenuUtil.GetTextElementSprite(_master.element);
        AttributeImageColor = ColorUtil.GetElementLabelColor(_master.element);
    }
示例#14
0
    public static GameObject CreateUnitListItem()
    {
        var root = GameObject.Find("/ListItemPool");

        if (root == null)
        {
            var prefab = Resources.Load <GameObject>(GridViewPrefabPath);
            Debug.Assert(prefab != null, "prefab : " + GridViewPrefabPath + " not found");
            var node = GameObject.Instantiate(prefab);
            Debug.Assert(node != null, "failed to Instantiate prefab : " + GridViewPrefabPath);
            var view = node.GetComponent <UnitGridView>();
            Debug.Assert(view != null, "Component of UnitGridView not found");
            List <UnitGridContext> unitList = MainMenuUtil.MakeUnitGridContextList();
            if (unitList.Count > 0)
            {
                root = new GameObject("ListItemPool");
                for (int i = 0; i < view.m_horizontalCount * view.m_verticalCount; i++)
                {
                    var go = Instantiate(Resources.Load("Prefab/UnitGrid/UnitListItem"), root.transform) as GameObject;
                    var cc = go.GetComponent <M4uContextRoot>();
                    cc.Context = (M4uContextInterface)unitList[0];
                    go.name    = "UnitListItem";
                }
            }
            Destroy(node);
        }
        return(root);
    }
示例#15
0
    // レコードの追加
    public void AddRecord(int category, ServerDataDefine.PacketStructPresent data)
    {
        var contex = new PresentRecordListItemContex();

        // 共通
        contex.FixId         = data.serial_id;
        contex.CaptionText00 = MainMenuUtil.GetPresentCount(data).ToString();
        contex.CaptionText01 = data.message;
        contex.NoticeText    = "";
        contex.NoticeEnable  = false;
        if ((MasterDataDefineLabel.PresentType)data.present_type == MasterDataDefineLabel.PresentType.NOTICE)
        {
            string[] notice = data.message.Split(new String[] { message_split_text }, StringSplitOptions.None);
            if (notice.Length >= 2)
            {
                contex.CaptionText00 = "1";
                contex.CaptionText01 = notice[0];
                contex.NoticeText    = notice[1];
                contex.NoticeEnable  = true;
            }
        }
        contex.Category = category;

        // 画像はカテゴリ別に差し替え可能にする
        image(data, sprite => { contex.IconImage = sprite; });

        // ボタンフィードバック
        contex.DidSelectItem += OnClickedRecordButton;

        // 枠色変更
        contex.IconColor  = IconColor[contex.Category];
        contex.FrameColor = FrameColor[contex.Category];

        // レコードの追加先を指定
        switch ((Category)contex.Category)
        {
        case Category.Present:
            // アイテム受領期間までの残り時間
            if (data.delete_timing == 1)
            {
                // 無期限
                //contex.CaptionText02 = "ENDLESS";
            }
            else
            {
                DateTime date = TimeUtil.ConvertServerTimeToLocalTime((ulong)data.delete_timing);
                contex.CaptionText02 = contex.TimeLeftText(date);
            }
            contex.Caption01_H = 110;

            Records0.Add(contex);
            break;

        case Category.PresentLog:
            contex.CaptionText02 = "";
            contex.Caption01_H   = 80;
            Records1.Add(contex);
            break;
        }
    }
示例#16
0
    private void Awake()
    {
        GetComponent <M4uContextRoot>().Context = this;

        BossIconList   = new List <BossIconContext>();
        BossSpriteList = new List <BossSpriteContext>();

        Title        = "";
        Time         = "";
        IconImage    = null;
        ElementImage = MainMenuUtil.GetElementCircleSprite(MasterDataDefineLabel.ElementType.NAUGHT);

        RewardLabel = GameTextUtil.GetText("growth_boss_10");
        RuleLabel   = GameTextUtil.GetText("growth_boss_11");
        AttrLabel   = GameTextUtil.GetText("growth_boss_12");

        IsViewSkipButton   = true;
        IsActiveSkipButton = false;
        IsActiveOkButton   = false;

        IsViewFlag = false;
        FlagImage  = null;
        FlagValue  = "";

        IsViewRewardFlag = false;

        BossPanelImage.color = new Color(1, 1, 1, 0);
    }
示例#17
0
    private bool CheckLinkTargetUnit(long _unique_id)
    {
        PacketStructUnit _baseUnit   = UserDataAdmin.Instance.SearchChara(MainMenuParam.m_LinkBaseUnitUniqueId);
        PacketStructUnit _targetUnit = UserDataAdmin.Instance.SearchChara(_unique_id);

        //ベースに設定されている
        if (_unique_id == MainMenuParam.m_LinkBaseUnitUniqueId)
        {
            return(false);
        }
        //ベースと同じユニットID
        if (_baseUnit.id == _targetUnit.id)
        {
            return(false);
        }
        // パーティチェック
        if (MainMenuUtil.ChkUnitPartyAssign(_unique_id))
        {
            return(false);
        }
        //リンクしている・されている
        if (_targetUnit.link_info != (uint)CHARALINK_TYPE.CHARALINK_TYPE_NONE)
        {
            return(false);
        }
        return(true);
    }
    private void setupFriendList(ref List<FriendDataSetting> friend_list)
    {
        for (int i = 0; i < friend_list.Count; i++)
        {
            friend_list[i].CharaOnce = MainMenuUtil.CreateFriendCharaOnce(friend_list[i].FriendData);
            //ソート用パラメータ設定
            friend_list[i].setSortParamFriend(friend_list[i].FriendData, friend_list[i].CharaOnce, friend_list[i].MasterData);
            friend_list[i].IsEnableButton = true;
            friend_list[i].DidSelectFriend += OnSelectFriend;
            friend_list[i].DidSelectIcon += OnSelectUnitIcon;
            switch (friend_list[i].FriendData.friend_state)
            {
                case (uint)FRIEND_STATE.FRIEND_STATE_SUCCESS:
                    friend_list[i].m_Flag = FriendDataItem.FlagType.FRIEND;
                    break;
                case (uint)FRIEND_STATE.FRIEND_STATE_UNRELATED:
                    friend_list[i].m_Flag = FriendDataItem.FlagType.HELPER;
                    break;
                default:
                    break;
            }

            //	クエストの設定を見てフレンドポイントを付与するかどうかを決める
            if (m_GetQuestFriendPointEnabel == false)
            {
                friend_list[i].IsViewFriendPoint = false;
            }
            else
            {
                friend_list[i].IsViewFriendPoint = (LocalSaveManager.Instance.GetLocalSaveUseFriend(friend_list[i].FriendData.user_id) == null);
            }
        }
    }
示例#19
0
    /// <summary>
    /// リストの作成
    /// </summary>
    /// <param name="periodLoginMaster"></param>
    public void SetUpList(LoginBonusRecordListContext item)
    {
        SetCount(item.date_count);
        Presents.Clear();
        for (int i = 0; i < item.present_ids.Length; ++i)
        {
            int presentID = item.present_ids[i];
            MasterDataPresent presentMaster = MasterDataUtil.GetPresentParamFromID((uint)presentID);

            LoginBonusPresentListContext present = new LoginBonusPresentListContext();
            MainMenuUtil.GetPresentIcon(presentMaster, sprite => {
                present.IconImage = sprite;
            });
            present.NameText = MasterDataUtil.GetPresentName(presentMaster);
            present.NumText  = string.Format(GameTextUtil.GetText("loginbonus_amount"), MasterDataUtil.GetPresentCount(presentMaster));
            present.NumRate  = GameTextUtil.GetText("loginbonus_multipled");
            Presents.Add(present);
        }

        // 先頭のアイテムの線を非表示にする
        LoginBonusPresentListContext selectItem = Presents.First();

        if (selectItem != null)
        {
            selectItem.IsViewBorder = false;
        }


        PresentItemCount = Presents.Count;
    }
示例#20
0
    /// <summary>
    /// フレンドリストの情報作成
    /// </summary>
    void CreateFriendList()
    {
        MainMenuUtil.CreateFriendList(ref m_FriendList, FRIEND_STATE.FRIEND_STATE_SUCCESS, SelectIcon, SelectFriend);
        m_FriendList.SetUpSortData(LocalSaveManager.Instance.LoadFuncSortFilterFriendList());
        m_FriendList.OnClickSortButtonAction = OnClockSortButton;
        m_FriendList.Init();

        updateFriendCount();
    }
示例#21
0
    private void SetModel()
    {
        m_helpBufEvent = MainMenuUtil.checkHelpBufEvent();
        CheckSkillUpEvent();
        m_unitBufEvent = (MainMenuParam.m_BlendBuildEventSLV != 0);
        m_footer       = new MainMenuFooterModel();

        m_footer.OnDisappearingBegan += () =>
        {
            PlayAnimation(DisappearAnimationName);
        };

        m_footer.OnAppeared += () =>
        {
            m_isFooterAppeared = true;
            m_helpButton       = ButtonList[(int)FOOTER_MENU_TYPE.QUEST].GetComponentInChildren <MainMenuFooterHelpButton>();
            if (m_helpButton != null)
            {
                if (MainMenuManager.Instance != null &&
                    MainMenuManager.Instance.currentCategory == MAINMENU_CATEGORY.QUEST)
                {
                    m_helpButton.setBufEvent(false);
                }
                else
                {
                    if (MainMenuParam.m_PartyAssignPrevPage == MAINMENU_SEQ.SEQ_QUEST_SELECT_PARTY)
                    {
                        m_helpButton.setBufEvent(false);
                    }
                    else
                    {
                        m_helpButton.setBufEvent(true);
                    }
                }
            }
            m_unitsButton = ButtonList[(int)FOOTER_MENU_TYPE.UNITS].GetComponentInChildren <MainMenuFooterUnitsButton>();
            if (m_unitsButton != null)
            {
                if (MainMenuManager.Instance != null &&
                    MainMenuManager.Instance.currentCategory == MAINMENU_CATEGORY.UNIT)
                {
                    m_unitsButton.setBufEvent(false);
                }
                else
                {
                    m_unitsButton.setBufEvent(true);
                }
            }
            m_gachaButton = ButtonList[(int)FOOTER_MENU_TYPE.SCRATCH].GetComponentInChildren <MainMenuFooterGachaButton>();
            if (m_gachaButton != null)
            {
                bool bFlag = MasterDataUtil.CheckFirstTimeFree();
                m_gachaButton.SetFlag(bFlag);
            }
        };
    }
示例#22
0
    /// <summary>
    /// ユニット設定(お気に入り登録あり)
    /// </summary>
    /// <param name="_mainUnit"></param>
    /// <param name="_subUnit"></param>
    /// <param name="_unitContext"></param>
    public void SetUnitFavorite(PacketStructUnit _mainUnit, PacketStructUnit _subUnit, UnitGridContext _unitContext)
    {
        SetUnit(_mainUnit, _subUnit);

        m_bFavorite = true;
        m_UnitDetailPanel.IsViewFavorite = true;

        m_MainUnitContext            = _unitContext;
        m_UnitDetailPanel.IsFavorite = MainMenuUtil.ChkFavoritedUnit(_mainUnit.unique_id);
    }
    /// <summary>
    /// フレンドリスト更新(フレンド申し込みリスト)
    /// </summary>
    private void updateFriendList()
    {
        MainMenuUtil.CreateFriendList(ref m_FriendList, FRIEND_STATE.FRIEND_STATE_WAIT_HIM, SelectIcon, SelectFriend);
        m_FriendList.SetUpSortData(LocalSaveManager.Instance.LoadFuncSortFilterFriendWaitHim());
        m_FriendList.OnClickSortButtonAction = OnClockSortButton;
        m_FriendList.Init();

        //
        updateCount();
    }
    public void AddFilterSwitch(MasterDataDefineLabel.KindType kindType)
    {
        SortDialogSwitchListContext filterSwitch = new SortDialogSwitchListContext();

        filterSwitch.KindType      = kindType;
        filterSwitch.NameImage     = MainMenuUtil.GetTextKindSprite(kindType, true);
        filterSwitch.IsSelect      = CheckSelectFilter(kindType, m_SortDialog.m_SortData);
        filterSwitch.DidSelectItem = OnClickSwitch;
        FilterSwitches.Add(filterSwitch);
    }
示例#25
0
    public void SearchFriend(string _userId)
    {
        //----------------------------------------
        // 入力されているIDを算出。
        // IDが数値でないならエラー
        //----------------------------------------
        m_SearchUserId = UnityUtil.CreateFriendUserID(_userId);
        if (m_SearchUserId != 0)
        {
            if (m_SearchUserId == UserDataAdmin.Instance.m_StructPlayer.user.user_id)
            {
                Dialog _newDialog = Dialog.Create(DialogType.DialogOK);
                _newDialog.SetDialogTextFromTextkey(DialogTextType.Title, "fr163q_title");
                _newDialog.SetDialogTextFromTextkey(DialogTextType.MainText, "fr163q_content4");
                _newDialog.SetDialogTextFromTextkey(DialogTextType.OKText, "common_button6");
                _newDialog.SetDialogEvent(DialogButtonEventType.OK, () =>
                {
                    resetSearchUserId();
                });
                _newDialog.EnableFadePanel();
                _newDialog.Show();

                SoundUtil.PlaySE(SEID.SE_MENU_OK);
            }
            else
            {
                ServerDataUtilSend.SendPacketAPI_FriendSearch(m_SearchUserId)
                .setSuccessAction(_data =>
                {
                    requestSuccess(_data.GetResult <RecvFriendSearch>().result.friend);
                })
                .setErrorAction(_data =>
                {
                    MainMenuUtil.openFriendRequestErrorDialog(_data.m_PacketCode, resetSearchUserId);
                })
                .SendStart();
                SoundUtil.PlaySE(SEID.SE_MENU_OK);
            }
        }
        else
        {
            Dialog _newDialog = Dialog.Create(DialogType.DialogOK);
            _newDialog.SetDialogTextFromTextkey(DialogTextType.Title, "fr163q_title");
            _newDialog.SetDialogTextFromTextkey(DialogTextType.MainText, "fr163q_content3");
            _newDialog.SetDialogTextFromTextkey(DialogTextType.OKText, "common_button6");
            _newDialog.SetDialogEvent(DialogButtonEventType.OK, () =>
            {
            });
            _newDialog.EnableFadePanel();
            _newDialog.Show();

            SoundUtil.PlaySE(SEID.SE_MENU_OK);
        }
    }
示例#26
0
    public void OpenSaleDialog()
    {
        if (!IsSaleUnit())
        {
            return;
        }

        SoundUtil.PlaySE(SEID.SE_MENU_OK2);

        //----------------------------------------
        // パラメータリミットチェック
        //----------------------------------------
        //チェック対象:コイン・ユニットポイント
        PRM_LIMIT_ERROR_TYPE ret = MainMenuUtil.ChkPrmLimit((uint)m_UnitBGPanel.Money, 0, 0, 0, (uint)m_UnitBGPanel.Point);
        Dialog warningDialog     = null;

        switch (ret)
        {
        case PRM_LIMIT_ERROR_TYPE.PRM_LIMIT_ERR_COIN:
            // コインが最大数オーバー
            warningDialog = Dialog.Create(DialogType.DialogYesNo);
            warningDialog.SetDialogTextFromTextkey(DialogTextType.Title, "ERROR_SALE_LIMIT_COIN_TITLE");
            warningDialog.SetDialogTextFromTextkey(DialogTextType.MainText, "ERROR_SALE_LIMIT_COIN");
            break;

        case PRM_LIMIT_ERROR_TYPE.PRM_LIMIT_ERR_UNITPOINT:
            // ユニットポイントが最大数オーバー
            warningDialog = Dialog.Create(DialogType.DialogYesNo);
            warningDialog.SetDialogTextFromTextkey(DialogTextType.Title, "ERROR_SALE_LIMIT_UNITPOINT_TITLE");
            warningDialog.SetDialogTextFromTextkey(DialogTextType.MainText, "ERROR_SALE_LIMIT_UNITPOINT");
            break;

        case PRM_LIMIT_ERROR_TYPE.PRM_LIMIT_ERR_OTHER:
            // コインとユニットポイントが最大数オーバー
            warningDialog = Dialog.Create(DialogType.DialogYesNo);
            warningDialog.SetDialogTextFromTextkey(DialogTextType.Title, "ERROR_SALE_LIMIT_OTHER_TITLE");
            warningDialog.SetDialogTextFromTextkey(DialogTextType.MainText, "ERROR_SALE_LIMIT_OTHER");
            break;
        }

        if (warningDialog != null)
        {
            warningDialog.SetDialogTextFromTextkey(DialogTextType.YesText, "common_button4");
            warningDialog.SetDialogTextFromTextkey(DialogTextType.NoText, "common_button5");
            warningDialog.SetDialogEvent(DialogButtonEventType.YES, () =>
            {
                openSaleWarningDialog();
            });
            warningDialog.Show();
            return;
        }

        openSaleWarningDialog();
    }
示例#27
0
    static public bool MoveQuestDetail(MasterDataQuest2 quest2Master)
    {
        if (quest2Master == null)
        {
            return(false);
        }

        MasterDataArea areaMaster = MasterFinder <MasterDataArea> .Instance.Find((int)quest2Master.area_id);

        MainMenuQuestSelect.AreaAmendParam areaAmendParam = MainMenuUtil.CreateAreaParamAmend(areaMaster);

        MainMenuParam.m_QuestStamina = 0;
        MainMenuParam.m_QuestKey     = 0;
        MainMenuParam.m_QuestTicket  = 0;
        switch (quest2Master.consume_type)
        {
        case 1:
            if (areaAmendParam.m_QuestSelectAreaAmendStamina == 100)
            {
                MainMenuParam.m_QuestStamina = (uint)quest2Master.consume_value;
            }
            else
            {
                uint point = (uint)((float)quest2Master.consume_value * ((float)areaAmendParam.m_QuestSelectAreaAmendStamina / 100.0f));
                MainMenuParam.m_QuestStamina = point;
            }
            break;

        case 2:
            MainMenuParam.m_QuestKey = (uint)quest2Master.consume_value;
            break;

        case 3:
            MainMenuParam.m_QuestTicket = (uint)quest2Master.consume_value;
            break;
        }

        if (MainMenuManager.HasInstance)
        {
            MainMenuParam.m_QuestSelectAreaID     = areaMaster.fix_id;
            MainMenuParam.m_QuestSelectMissionID  = quest2Master.fix_id;
            MainMenuParam.m_QuestAreaAmendList    = areaAmendParam.m_AreaMasterDataAmendList;
            MainMenuParam.m_QuestStaminaAmend     = (float)areaAmendParam.m_QuestSelectAreaAmendStamina / 100.0f;
            MainMenuParam.m_QuestSelectAreaCateID = areaMaster.area_cate_id;
            m_jmpQuestSelectAreaCateID            = areaMaster.area_cate_id;
            m_jmpQuestSelectAreaID = areaMaster.fix_id;

            MainMenuManager.Instance.AddSwitchRequest(MAINMENU_SEQ.SEQ_QUEST_SELECT_DETAIL, false, false, true);
        }

        return(true);
    }
示例#28
0
    public void SetUnitData(ref PartyMemberStatusListItemContext unitStatus, PacketStructUnit unitData, PacketStructUnit[] partyUnits)
    {
        if (unitStatus == null)
        {
            return;
        }

        MasterDataParamChara charMaster = null;

        if (unitData == null || unitData.id == 0)
        {
            unitStatus.HpText  = "";
            unitStatus.AtkText = "";
            unitStatus.Cost    = 0;
            unitStatus.Charm   = 0;
        }
        else
        {
            charMaster = MasterFinder <MasterDataParamChara> .Instance.Find((int)unitData.id);

            SetUpCharaData(ref unitStatus, unitData, CharaLinkUtil.GetLinkUnit(unitData.link_unique_id), false, partyUnits);
        }

        MasterDataSkillActive skill1 = null;

        if (charMaster != null && charMaster.skill_active0 > 0)
        {
            skill1 = MasterFinder <MasterDataSkillActive> .Instance.Find((int)charMaster.skill_active0);
        }
        unitStatus.IsActiveSkill1Empty = (skill1 == null);
        unitStatus.Skill1Cost1         = (skill1 != null) ? MainMenuUtil.GetSkillElementIcon(skill1.cost1) : null;
        unitStatus.Skill1Cost2         = (skill1 != null) ? MainMenuUtil.GetSkillElementIcon(skill1.cost2) : null;
        unitStatus.Skill1Cost3         = (skill1 != null) ? MainMenuUtil.GetSkillElementIcon(skill1.cost3) : null;
        unitStatus.Skill1Cost4         = (skill1 != null) ? MainMenuUtil.GetSkillElementIcon(skill1.cost4) : null;
        unitStatus.Skill1Cost5         = (skill1 != null) ? MainMenuUtil.GetSkillElementIcon(skill1.cost5) : null;
        unitStatus.Skill1Color         = (skill1 != null) ? MainMenuUtil.GetSkillElementColor("S1", skill1.skill_element) : null;

        MasterDataSkillActive skill2 = null;

        if (charMaster != null && charMaster.skill_active1 > 0)
        {
            skill2 = MasterFinder <MasterDataSkillActive> .Instance.Find((int)charMaster.skill_active1);
        }
        unitStatus.IsActiveSkill2Empty = (skill2 == null);
        unitStatus.Skill2Cost1         = (skill2 != null) ? MainMenuUtil.GetSkillElementIcon(skill2.cost1) : null;
        unitStatus.Skill2Cost2         = (skill2 != null) ? MainMenuUtil.GetSkillElementIcon(skill2.cost2) : null;
        unitStatus.Skill2Cost3         = (skill2 != null) ? MainMenuUtil.GetSkillElementIcon(skill2.cost3) : null;
        unitStatus.Skill2Cost4         = (skill2 != null) ? MainMenuUtil.GetSkillElementIcon(skill2.cost4) : null;
        unitStatus.Skill2Cost5         = (skill2 != null) ? MainMenuUtil.GetSkillElementIcon(skill2.cost5) : null;
        unitStatus.Skill2Color         = (skill2 != null) ? MainMenuUtil.GetSkillElementColor("S2", skill2.skill_element) : null;
    }
示例#29
0
 /// <summary>
 /// ログインパック取得
 /// </summary>
 public void OnLoginPack()
 {
     ServerDataUtilSend.SendPacketAPI_LoginPack(true, true, true, true).
     setSuccessAction(
         _data =>
     {
         MainMenuUtil.setupLoginPack(_data.GetResult <RecvLoginPack>().result);
         CommonFSM.Instance.SendFsmNextEvent();
     }).
     setErrorAction(
         _data =>
     {
         CommonFSM.Instance.SendFsmNextEvent();
     }).
     SendStart();
 }
示例#30
0
    /// <summary>
    /// アイテム効果時間更新
    /// </summary>
    private void updateItemEffectTime()
    {
        if (ItemEffectList.Count == 0)
        {
            return;
        }

        //
        bool bDelData = false;
        List <ItemEffectContext> tmpList = new List <ItemEffectContext>();

        for (int i = 0; i < ItemEffectList.Count; i++)
        {
            if (ItemEffectList[i].ItemMaster == null)
            {
                //マスターがないのは初心者ブースト表示
                tmpList.Add(ItemEffectList[i]);
                continue;
            }
            //効果時間内?
            if (MainMenuUtil.IsItemEffectValid(ItemEffectList[i].ItemMaster))
            {
                //残り時間更新
                ItemEffectList[i].Time = MainMenuUtil.GetItemEffectLeftTimeString(ItemEffectList[i].ItemMaster);
                //仮リスト追加
                tmpList.Add(ItemEffectList[i]);
            }
            else
            {
                //削除データあり
                bDelData = true;
            }
        }
        if (bDelData)
        {
            ItemEffectList.Clear();
            for (int i = 0; i < tmpList.Count; i++)
            {
                if (tmpList[i].ItemMaster == null && tmpList.Count < 4)
                {
                    tmpList[i].IsViewIcon = true;
                }
                ItemEffectList.Add(tmpList[i]);
            }
            IsActiveNoItem = (ItemEffectList.Count == 0) ? true : false;
        }
    }