Пример #1
0
    public void RequirePropertyObject(NFrame.NFGUID objectID, string strPropertyName, NFIDataList.TData newVar)
    {
        NFMsg.ObjectPropertyObject xData = new NFMsg.ObjectPropertyObject();
        xData.player_id = NFBinarySendLogic.NFToPB(objectID);

        NFMsg.PropertyObject xPropertyObject = new NFMsg.PropertyObject();
        xPropertyObject.property_name = System.Text.Encoding.Default.GetBytes(strPropertyName);
        xPropertyObject.data          = NFBinarySendLogic.NFToPB(newVar.ObjectVal());
        xData.property_list.Add(xPropertyObject);

        MemoryStream stream = new MemoryStream();

        Serializer.Serialize <NFMsg.ObjectPropertyObject>(stream, xData);
        Debug.Log("send upload Object");
        NFStart.Instance.GetFocusSender().SendMsg(objectID, NFMsg.EGameMsgID.EGMI_ACK_PROPERTY_OBJECT, stream);
    }
Пример #2
0
    public void RequireRecordObject(NFrame.NFGUID self, string strRecordName, int nRow, int nCol, NFIDataList.TData newVar)
    {
        NFMsg.ObjectRecordObject xData = new NFMsg.ObjectRecordObject();
        xData.player_id   = NFBinarySendLogic.NFToPB(self);
        xData.record_name = System.Text.Encoding.Default.GetBytes(strRecordName);

        NFMsg.RecordObject xRecordObject = new NFMsg.RecordObject();
        xData.property_list.Add(xRecordObject);
        xRecordObject.row  = nRow;
        xRecordObject.col  = nCol;
        xRecordObject.data = NFBinarySendLogic.NFToPB(newVar.ObjectVal());

        MemoryStream stream = new MemoryStream();

        Serializer.Serialize <NFMsg.ObjectRecordObject>(stream, xData);
        Debug.Log("send upload record object");
        SendMsg(self, NFMsg.EGameMsgID.EGMI_ACK_RECORD_OBJECT, stream);
    }