示例#1
0
        public void RequestPresenceFields(bool isGameAccountEntityId, [In] bgs.types.EntityId entityId, [In] PresenceFieldKey[] fieldList)
        {
            QueryRequest queryRequest = new QueryRequest();

            bnet.protocol.EntityId entityId1 = new bnet.protocol.EntityId();
            entityId1.SetHigh(entityId.hi);
            entityId1.SetLow(entityId.lo);
            queryRequest.SetEntityId(entityId1);
            PresenceFieldKey[] presenceFieldKeyArray = fieldList;
            for (int i = 0; i < (int)presenceFieldKeyArray.Length; i++)
            {
                PresenceFieldKey presenceFieldKey = presenceFieldKeyArray[i];
                FieldKey         fieldKey         = new FieldKey();
                fieldKey.SetProgram(presenceFieldKey.programId);
                fieldKey.SetGroup(presenceFieldKey.groupId);
                fieldKey.SetField(presenceFieldKey.fieldId);
                fieldKey.SetIndex(presenceFieldKey.index);
                queryRequest.AddKey(fieldKey);
            }
            this.m_rpcConnection.QueueRequest(this.m_presenceService.Id, 4, queryRequest, (RPCContext context) => this.RequestPresenceFieldsCallback(new bgs.types.EntityId(entityId), context), 0);
        }
示例#2
0
        public void RequestPresenceFields(bool isGameAccountEntityId, [In] bgs.types.EntityId entityId, [In] PresenceFieldKey[] fieldList)
        {
            QueryRequest queryRequest = new QueryRequest();

            bnet.protocol.EntityId entityId2 = new bnet.protocol.EntityId();
            entityId2.SetHigh(entityId.hi);
            entityId2.SetLow(entityId.lo);
            queryRequest.SetEntityId(entityId2);
            foreach (PresenceFieldKey presenceFieldKey in fieldList)
            {
                FieldKey fieldKey = new FieldKey();
                fieldKey.SetProgram(presenceFieldKey.programId);
                fieldKey.SetGroup(presenceFieldKey.groupId);
                fieldKey.SetField(presenceFieldKey.fieldId);
                fieldKey.SetIndex(presenceFieldKey.index);
                queryRequest.AddKey(fieldKey);
            }
            this.m_rpcConnection.QueueRequest(this.m_presenceService.Id, 4u, queryRequest, delegate(RPCContext context)
            {
                this.RequestPresenceFieldsCallback(new bgs.types.EntityId(entityId), context);
            }, 0u);
        }