public uint Execute(PacketDistributed ipacket) { CG_FINDPLAYER packet = (CG_FINDPLAYER )ipacket; if (null == packet) { return((uint)PACKET_EXE.PACKET_EXE_ERROR); } //enter your logic return((uint)PACKET_EXE.PACKET_EXE_CONTINUE); }
//点击玩家查找按钮 void OnClickSearch() { if (null == m_NameInput) { return; } //清空表格内容 ClearPleyrFindItem(); //向服务器发送超找好友包 CG_FINDPLAYER msg = (CG_FINDPLAYER)PacketDistributed.CreatePacket(MessageID.PACKET_CG_FINDPLAYER); msg.Guid = GlobeVar.INVALID_GUID; msg.Name = m_NameInput.value; msg.SendPacket(); }