Inheritance: global::ProtoBuf.IExtensible
コード例 #1
0
        public void RequireUseItem(NFrame.NFGUID objectID, string strItemID, NFrame.NFGUID nTargetID)
        {
            NFMsg.ReqAckUseItem xData = new NFMsg.ReqAckUseItem();
            xData.user            = NFNetController.NFToPB(objectID);
            xData.item_guid       = new NFMsg.Ident();
            xData.item            = new ItemStruct();
            xData.item.item_id    = strItemID;
            xData.item.item_count = 1;
            xData.targetid        = (NFNetController.NFToPB(nTargetID));

            mxBody.SetLength(0);
            mxSerializer.Serialize(mxBody, xData);

            SendMsg(objectID, NFMsg.EGameMsgID.EGMI_REQ_ITEM_OBJECT, mxBody);
        }
コード例 #2
0
        public void RequireUseItem(NFrame.NFGUID objectID, string strItemID, NFrame.NFGUID nTargetID, UnityEngine.Vector3 pos)
        {
            NFMsg.ReqAckUseItem xData = new NFMsg.ReqAckUseItem();
            xData.user            = NFNetController.NFToPB(objectID);
            xData.item_guid       = new NFMsg.Ident();
            xData.item            = new ItemStruct();
            xData.item.item_id    = UnicodeEncoding.Default.GetBytes(strItemID);
            xData.item.item_count = 1;
            xData.targetid        = (NFNetController.NFToPB(nTargetID));
            xData.position        = (NFNetController.NFToPB(new NFVector3(pos.x, pos.y, pos.z)));

            mxBody.SetLength(0);
            mxSerializer.Serialize(mxBody, xData);

            SendMsg(objectID, NFMsg.EGameMsgID.EGMI_REQ_ITEM_OBJECT, mxBody);
        }