Beispiel #1
0
    void OnFriendsGiftGetHandler(C2G.FriendsGiftGet packet, C2G.FriendsGiftGetAck ack)
    {
        m_Friends.ForEach(e => e.state_info.available_gift = false);
        switch (ack.result)
        {
        case pe_FriendsResult.Success:
            Network.PlayerInfo.SetGoodsValue(pe_GoodsType.token_friends, ack.token_friends);
            Tooltip.Instance.ShowMessageKeyFormat("FriendsGiftGetAllCompleted", ack.token_friends);
            break;

        default:
            ShowFriendsErrorTooltip(ack.result);
            break;
        }
        InitItem();
        UpdateSendGetButton();
    }
Beispiel #2
0
    void OnFriendsGiftGetHandler(C2G.FriendsGiftGet packet, C2G.FriendsGiftGetAck ack)
    {
        //pd_FriendsInfo friends_info = m_Info as pd_FriendsInfo;
        switch (ack.result)
        {
        case pe_FriendsResult.Success:
            Tooltip.Instance.ShowMessageKey("FriendsSendGiftSuccess");
            StateInfo.available_gift = false;
            Network.PlayerInfo.SetGoodsValue(pe_GoodsType.token_friends, ack.token_friends);
            UpdateButton();
            if (OnCallback != null)
            {
                OnCallback(m_Info);
            }
            break;

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