Exemplo n.º 1
0
 /// <summary>
 /// 获取俱乐部玩家信息并刷新
 /// </summary>
 /// <param name="callback"></param>
 public void SendGetClubPlayerInfoAndUpdate(CallBack <ClubInfo> callback)
 {
     NetProcess.SendRequest <CommonSendProto>(null, ProtoIdMap.CMD_SendGetClubUsers, (msg) =>
     {
         ClubPlayerInfoAck data = msg.Read <ClubPlayerInfoAck>();
         if (data.code == 1)
         {
             if (data.data != null)
             {
                 ClubModel.Inst.AllPlayerPeach = data.data.allPlayerPeach;
             }
             if (data.data != null && data.data.list != null)
             {
                 ClubModel.Inst.ClubPlayerInfoData = data.data.list;
             }
             if (callback != null)
             {
                 callback(ClubModel.Inst.mClubData);
             }
         }
         else
         {
             GameUtils.ShowErrorTips(data.code);
         }
     });
 }
Exemplo n.º 2
0
    /// <summary>
    /// 获取俱乐部玩家列表
    /// </summary>
    /// <param name="call"></param>
    public void SendGetClubPlayerInfo()
    {
        CommonSendProto req = new CommonSendProto();

        NetProcess.SendRequest <CommonSendProto>(req, ProtoIdMap.CMD_SendGetClubUsers, (msg) =>
        {
            ClubPlayerInfoAck data = msg.Read <ClubPlayerInfoAck>();
            if (data.code == 1)
            {
                if (data.data != null)
                {
                    ClubModel.Inst.AllPlayerPeach = data.data.allPlayerPeach;
                }
                if (data.data != null && data.data.list != null)
                {
                    ClubModel.Inst.ClubPlayerInfoData = data.data.list;
                }
                ClubView view = Global.Inst.GetController <ClubController>().OpenWindow() as ClubView;
                view.SetData(ClubModel.Inst.mClubData);
            }
            else
            {
                GameUtils.ShowErrorTips(data.code);
            }
        });
    }