public uint Execute(PacketDistributed ipacket)
        {
            CG_RESTAURANT_VISITFRIEND packet = (CG_RESTAURANT_VISITFRIEND )ipacket;

            if (null == packet)
            {
                return((uint)PACKET_EXE.PACKET_EXE_ERROR);
            }
            //enter your logic
            return((uint)PACKET_EXE.PACKET_EXE_CONTINUE);
        }
Пример #2
0
    // 选择了一个好友名字,发送进入好友酒楼申请
    void OnChooseFriend(System.UInt64 friendID, string friendName)
    {
        //if (!m_bSelfData)
        //{
        //    GUIData.AddNotifyData("#{2017}");
        //    return;
        //}
        //if (Time.realtimeSinceStartup - m_lastRequestFriendTime < RequestFrinedDataDelay)
        //{
        //    // 操作过于频繁,请稍后再试
        //    GUIData.AddNotifyData("#{1981}");
        //    return;
        //}

        m_lastRequestFriendTime = Time.realtimeSinceStartup;
        CG_RESTAURANT_VISITFRIEND packet = (CG_RESTAURANT_VISITFRIEND)PacketDistributed.CreatePacket(MessageID.PACKET_CG_RESTAURANT_VISITFRIEND);

        packet.FriendGuid = friendID;
        packet.SendPacket();

        UIManager.CloseUI(UIInfo.RelationNamePopWindow);
    }