SetObject() public abstract method

public abstract SetObject ( int nRow, int nCol, NFGUID value ) : bool
nRow int
nCol int
value NFGUID
return bool
Esempio n. 1
0
        public override bool SetRecordObject(string strRecordName, int nRow, int nCol, NFGUID obj)
        {
            NFIRecord record = mRecordManager.GetRecord(strRecordName);

            if (null != record)
            {
                record.SetObject(nRow, nCol, obj);
                return(true);
            }

            return(false);
        }
Esempio n. 2
0
        private void EGMI_ACK_RECORD_OBJECT(NFMsg.MsgBase xMsg)
        {
            NFMsg.ObjectRecordObject xData = new NFMsg.ObjectRecordObject();
            xData = mxSerializer.Deserialize(new MemoryStream(xMsg.msg_data), null, typeof(NFMsg.ObjectRecordObject)) as NFMsg.ObjectRecordObject;

            NFIObject        go            = NFCKernelModule.Instance.GetObject(NFNetController.PBToNF(xData.player_id));
            NFIRecordManager recordManager = go.GetRecordManager();
            NFIRecord        record        = recordManager.GetRecord(System.Text.Encoding.Default.GetString(xData.record_name));

            for (int i = 0; i < xData.property_list.Count; i++)
            {
                record.SetObject(xData.property_list[i].row, xData.property_list[i].col, NFNetController.PBToNF(xData.property_list[i].data));
            }
        }
        private void EGMI_ACK_RECORD_OBJECT(int id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.ObjectRecordObject xData = NFMsg.ObjectRecordObject.Parser.ParseFrom(xMsg.MsgData);

            NFIObject go = mKernelModule.GetObject(mHelpModule.PBToNF(xData.PlayerId));

            if (go == null)
            {
                Debug.LogError("error id" + xData.PlayerId);
                return;
            }

            NFIRecordManager recordManager = go.GetRecordManager();
            NFIRecord        record        = recordManager.GetRecord(xData.RecordName.ToStringUtf8());

            for (int i = 0; i < xData.PropertyList.Count; i++)
            {
                record.SetObject(xData.PropertyList[i].Row, xData.PropertyList[i].Col, mHelpModule.PBToNF(xData.PropertyList[i].Data));
            }
        }