Inheritance: global::ProtoBuf.IExtensible
        private void EGMI_ACK_RECORD_CLEAR(int id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.MultiObjectRecordList xData = NFMsg.MultiObjectRecordList.Parser.ParseFrom(xMsg.MsgData);
            for (int i = 0; i < xData.MultiPlayerRecord.Count; ++i)
            {
                NFMsg.ObjectRecordList objectRecordList = xData.MultiPlayerRecord[i];
                for (int j = 0; j < objectRecordList.RecordList.Count; ++j)
                {
                    NFIObject go = mKernelModule.GetObject(mHelpModule.PBToNF(objectRecordList.PlayerId));
                    if (go == null)
                    {
                        Debug.LogError("error id" + objectRecordList.PlayerId);
                        return;
                    }

                    NFMsg.ObjectRecordBase objectRecordBase = objectRecordList.RecordList[j];
                    string           recordName             = objectRecordBase.RecordName.ToStringUtf8();
                    NFIRecordManager recordManager          = go.GetRecordManager();

                    if (recordManager != null)
                    {
                        NFIRecord record = recordManager.GetRecord(recordName);
                        if (record != null)
                        {
                            record.Clear();
                        }
                    }
                }
            }
        }
Exemple #2
0
        private void EGMI_ACK_OBJECT_RECORD_ENTRY(NFMsg.MsgBase xMsg)
        {
            NFMsg.MultiObjectRecordList xData = new NFMsg.MultiObjectRecordList();
            xData = mxSerializer.Deserialize(new MemoryStream(xMsg.msg_data), null, typeof(NFMsg.MultiObjectRecordList)) as NFMsg.MultiObjectRecordList;

            for (int i = 0; i < xData.multi_player_record.Count; i++)
            {
                NFMsg.ObjectRecordList xObjectRecordList = xData.multi_player_record[i];
                NFGUID xObjectID = NFNetController.PBToNF(xObjectRecordList.player_id);

                ObjectDataBuff xDataBuff;
                if (mxObjectDataBuff.TryGetValue(xObjectID, out xDataBuff))
                {
                    xDataBuff.xRecordList = xObjectRecordList;
                }

                /*
                 * for (int j = 0; j < xObjectRecordList.record_list.Count; j++)
                 * {
                 *      NFMsg.ObjectRecordBase xObjectRecordBase = xObjectRecordList.record_list[j];
                 *      string srRecordName = System.Text.Encoding.Default.GetString(xObjectRecordBase.record_name);
                 *      Debug.Log ("EGMI_ACK_OBJECT_RECORD_ENTRY " + xObjectRecordList.player_id.index + "  " + srRecordName + " Data line: " + xObjectRecordBase.row_struct.Count);
                 *
                 *      for (int k = 0; k < xObjectRecordBase.row_struct.Count; ++k )
                 *      {
                 *              NFMsg.RecordAddRowStruct xAddRowStruct = xObjectRecordBase.row_struct[k];
                 *
                 *              ADD_ROW(xObjectID, System.Text.Encoding.Default.GetString(xObjectRecordBase.record_name), xAddRowStruct);
                 *      }
                 * }
                 */
            }
        }
        private void EGMI_ACK_OBJECT_RECORD_ENTRY(NFMsg.MsgBase xMsg)
        {
            NFMsg.MultiObjectRecordList xData = new NFMsg.MultiObjectRecordList();
            xData = mxSerializer.Deserialize(new MemoryStream(xMsg.msg_data), null, typeof(NFMsg.MultiObjectRecordList)) as NFMsg.MultiObjectRecordList;

            for (int i = 0; i < xData.multi_player_record.Count; i++)
            {
                NFMsg.ObjectRecordList xObjectRecordList = xData.multi_player_record[i];
                NFGUID xObjectID = NFNetController.PBToNF(xObjectRecordList.player_id);

                //Debug.Log ("new record enter Object: " + xObjectID.ToString () );

                ObjectDataBuff xDataBuff;
                if (mxObjectDataBuff.TryGetValue(xObjectID, out xDataBuff))
                {
                    xDataBuff.xRecordList = xObjectRecordList;
                }
            }
        }
Exemple #4
0
        private void EGMI_ACK_OBJECT_RECORD_ENTRY(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.MultiObjectRecordList xData = NFMsg.MultiObjectRecordList.Parser.ParseFrom(xMsg.msg_data);

            for (int i = 0; i < xData.multi_player_record.Count; i++)
            {
                NFMsg.ObjectRecordList xObjectRecordList = xData.multi_player_record[i];
                NFGUID xObjectID = mHelpModule.PBToNF(xObjectRecordList.player_id);

                //Debug.Log ("new record enter Object: " + xObjectID.ToString () );

                ObjectDataBuff xDataBuff;
                if (mxObjectDataBuff.TryGetValue(xObjectID, out xDataBuff))
                {
                    xDataBuff.xRecordList = xObjectRecordList;
                }
            }
        }
        private void OnObjectRecordEntry(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

            NFMsg.MultiObjectRecordList xMultiObjectRecordData = NFMsg.MultiObjectRecordList.Parser.ParseFrom(xMsg.msg_data);

            for (int i = 0; i < xMultiObjectRecordData.multi_player_record.Count; i++)
            {
                NFMsg.ObjectRecordList xObjectRecordList = xMultiObjectRecordData.multi_player_record[i];
                for (int j = 0; j < xObjectRecordList.record_list.Count; j++)
                {
                    NFMsg.ObjectRecordBase xObjectRecordBase = xObjectRecordList.record_list[j];
                    for (int k = 0; k < xObjectRecordBase.row_struct.Count; ++k)
                    {
                        NFMsg.RecordAddRowStruct xAddRowStruct = xObjectRecordBase.row_struct[k];

                        ADD_ROW(mHelpModule.PBToNF(xObjectRecordList.player_id), xObjectRecordBase.record_name.ToStringUtf8(), xAddRowStruct);
                    }
                }
            }
        }
Exemple #6
0
        private void OnObjectRecordEntry(UInt16 id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = new NFMsg.MsgBase();
            xMsg = Serializer.Deserialize <NFMsg.MsgBase>(stream);

            NFMsg.MultiObjectRecordList xMultiObjectRecordData = new NFMsg.MultiObjectRecordList();
            xMultiObjectRecordData = Serializer.Deserialize <NFMsg.MultiObjectRecordList>(new MemoryStream(xMsg.msg_data));

            for (int i = 0; i < xMultiObjectRecordData.multi_player_record.Count; i++)
            {
                NFMsg.ObjectRecordList xObjectRecordList = xMultiObjectRecordData.multi_player_record[i];
                for (int j = 0; j < xObjectRecordList.record_list.Count; j++)
                {
                    NFMsg.ObjectRecordBase xObjectRecordBase = xObjectRecordList.record_list[j];
                    for (int k = 0; k < xObjectRecordBase.row_struct.Count; ++k)
                    {
                        NFMsg.RecordAddRowStruct xAddRowStruct = xObjectRecordBase.row_struct[k];

                        ADD_ROW(mHelpModule.PBToNF(xObjectRecordList.player_id), System.Text.Encoding.Default.GetString(xObjectRecordBase.record_name), xAddRowStruct);
                    }
                }
            }
        }
        private void EGMI_ACK_OBJECT_RECORD_ENTRY(int id, MemoryStream stream)
        {
            NFMsg.MsgBase xMsg = NFMsg.MsgBase.Parser.ParseFrom(stream);

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

            for (int i = 0; i < xData.MultiPlayerRecord.Count; i++)
            {
                NFMsg.ObjectRecordList xObjectRecordList = xData.MultiPlayerRecord[i];
                NFGUID xObjectID = mHelpModule.PBToNF(xObjectRecordList.PlayerId);

                Debug.Log("new record enter Object: " + xObjectID.ToString());

                ObjectDataBuff xDataBuff;
                if (mxObjectDataBuff.TryGetValue(xObjectID, out xDataBuff))
                {
                    xDataBuff.xRecordList = xObjectRecordList;
                    if (xObjectID.IsNull())
                    {
                        AttachObjectData(xObjectID);
                    }
                }
            }
        }