Exemple #1
0
    void OnFriendsRequestHandler(C2G.FriendsRequest packet, C2G.FriendsRequestAck ack)
    {
        switch (ack.result)
        {
        case pe_FriendsResult.Success:
            gameObject.SetActive(false);
            if (OnCallback != null)
            {
                OnCallback(new pd_FriendsInfo(m_Info));
            }
            break;

        case pe_FriendsResult.AlreadyRequest:
        case pe_FriendsResult.AlreadyRequested:
        case pe_FriendsResult.TargetFriendsCountMax:
            gameObject.SetActive(false);
            if (OnCallback != null)
            {
                OnCallback(m_Info);
            }
            Friends.ShowFriendsErrorTooltip(ack.result);
            break;

        default:
            Friends.ShowFriendsErrorTooltip(ack.result);
            break;
        }
    }
Exemple #2
0
    void OnFriendsRequestHandler(C2G.FriendsRequest packet, C2G.FriendsRequestAck ack)
    {
        switch (ack.result)
        {
        case pe_FriendsResult.Success:
            m_Players.Clear();
            InitItem();
            break;

        default:
            ShowFriendsErrorTooltip(ack.result);
            if (ack.request_count > 0)
            {
                m_Players.Clear();
                InitItem();
            }
            break;
        }
    }
Exemple #3
0
    void OnFriendsRequestHandler(C2G.FriendsRequest send, C2G.FriendsRequestAck ack)
    {
        switch (ack.result)
        {
        case pe_FriendsResult.Success:
            Tooltip.Instance.ShowMessageKey("RequestedFriends");
            Close();
            break;

        case pe_FriendsResult.AlreadyRequest:
        case pe_FriendsResult.AlreadyRequested:
        case pe_FriendsResult.TargetFriendsCountMax:
            gameObject.SetActive(false);
            Friends.ShowFriendsErrorTooltip(ack.result);
            break;

        default:
            Friends.ShowFriendsErrorTooltip(ack.result);
            break;
        }
    }