Exemple #1
0
 /// <summary>
 /// 下阵
 /// </summary>
 /// <param name="petID"></param>
 public void RemovelineUp(uint petID)
 {
     if (m_petQuickList.Contains(petID))
     {
         m_petQuickList.Remove(petID);
         GameCmd.stSetQuickListPetUserCmd_CS cmd = new GameCmd.stSetQuickListPetUserCmd_CS();
         cmd.quick_list.AddRange(m_petQuickList);
         NetService.Instance.Send(cmd);
     }
 }
Exemple #2
0
    /// <summary>
    /// 发送给服务器设置列表
    /// </summary>
    public void SendQuickListMsg()
    {
        GameCmd.stSetQuickListPetUserCmd_CS cmd = new GameCmd.stSetQuickListPetUserCmd_CS();

        foreach (var id in GetUserQuicSettingList())
        {
            cmd.quick_list.Add(id);
        }
        NetService.Instance.Send(cmd);
    }
Exemple #3
0
 public void ReplaceLineUP(uint srcID, uint destID)
 {
     if (m_petQuickList.Contains(destID))
     {
         int index = m_petQuickList.IndexOf(destID);
         m_petQuickList.Remove(destID);
         m_petQuickList.Insert(index, srcID);
         GameCmd.stSetQuickListPetUserCmd_CS cmd = new GameCmd.stSetQuickListPetUserCmd_CS();
         cmd.quick_list.AddRange(m_petQuickList);
         NetService.Instance.Send(cmd);
     }
 }
Exemple #4
0
 /// <summary>
 /// 上阵
 /// </summary>
 /// <param name="petID"></param>
 public void AddLineUp(uint petID)
 {
     if (petID == 0)
     {
         return;
     }
     if (!m_petQuickList.Contains(petID))
     {
         m_petQuickList.Add(petID);
         GameCmd.stSetQuickListPetUserCmd_CS cmd = new GameCmd.stSetQuickListPetUserCmd_CS();
         cmd.quick_list.AddRange(m_petQuickList);
         NetService.Instance.Send(cmd);
     }
 }