public bool                                 BuffImpact_DispelByIndex(int nIndex)
    {
        _BUFF_IMPACT_INFO BuffImpactInfo = BuffImpact_GetByIndex(nIndex);

        if (BuffImpactInfo != null)
        {
            CGDispelBuffReq msgDispelBuffReq = new CGDispelBuffReq();
            msgDispelBuffReq.SN = (int)BuffImpactInfo.m_nSN;
            NetManager.GetNetManager().SendPacket(msgDispelBuffReq);
            return(true);
        }
        return(false);
    }
示例#2
0
 public void OnClick()
 {
     if (type_ == ENUM_BUFFER_TYPE.AVATAR)
     {
         //先不做是否能取消buff的判定
         _BUFF_IMPACT_INFO pBuffImpactInfo = CDataPool.Instance.BuffImpact_GetByIndex(index_);
         if (pBuffImpactInfo != null)
         {
             CGDispelBuffReq msgDispelBuffReq = new CGDispelBuffReq();
             msgDispelBuffReq.SN = (int)pBuffImpactInfo.m_nSN;
             NetManager.GetNetManager().SendPacket(msgDispelBuffReq);
         }
     }
 }
    public bool                                 BuffImpact_Dispel(int nSN)
    {
        _BUFF_IMPACT_INFO BuffImpactInfo = BuffImpact_Get(nSN);

        if (BuffImpactInfo != null)
        {
            CGDispelBuffReq msgDispelBuffReq = new CGDispelBuffReq();
            msgDispelBuffReq.SN = (int)nSN;
            NetManager.GetNetManager().SendPacket(msgDispelBuffReq);
            return(true);
        }
        else
        {
            return(false);
        }
    }