Пример #1
0
    private void OnReq_MainCopy(MessageRecv obj)
    {
        System.IO.MemoryStream ms  = new System.IO.MemoryStream(obj.Data);
        MainCopyReq            req = Serializer.Deserialize <MainCopyReq>(ms);

        FTEctypeData.CopyID = req.CopyID;
        MainCopyAck ack = new MainCopyAck();

        NetworkManager.Instance.Send(MessageID.MSG_MAIN_COPY_ACK, ack, 0, 0);
    }
Пример #2
0
    public void TryMainCopyReq(UInt64 roleGUID, Int32 dwCopyID)
    {
        DCopy copyDB = ReadCfgCopy.GetDataById(dwCopyID);

        if (GTItemHelper.CheckItemEnongh(copyDB.CostActionId, copyDB.CostActionNum) == false)
        {
            return;
        }

        MainCopyReq req = new MainCopyReq();

        req.CopyID = dwCopyID;
        NetworkManager.Instance.Send <MainCopyReq>(MessageID.MSG_MAIN_COPY_REQ, req, roleGUID, 0);
    }