Exemplo n.º 1
0
def getItemsInPackage_204(dynamicId, request_proto):
    '''获取包裹栏物品信息'''
    argument = getItemsInPackage_pb2.getItemsInPackageRequest()
    argument.ParseFromString(request_proto)
    response = getItemsInPackage_pb2.getItemsInPackageResponse()
    
    dynamicId = dynamicId
    characterId = argument.id
    packCategory = argument.packCategory
    curpage = argument.curpage
    data = packageInfo.getItemsInPackage(dynamicId, characterId, packCategory,curpage)
    
    response.result = data.get('result',False)
    response.message = data.get('message',u'')
    if data.get('data',None):
        info = data.get('data')
        response.data.packCategory = info['packCategory']
        response.data.packageSize = info['packageSize']
        response.data.curpage = info['curpage']
        response.data.maxpage = info['maxpage']
        response.data.totalsize = info['totalsize']
        for _item in info['itemList']:
            packageItemInfo = response.data.packageItemInfo.add()
            packageItemInfo.position = _item['position']
            _item['itemComponent'].SerializationItemInfo(packageItemInfo.itemInfo)
    
    return response.SerializeToString()
def GetInstancePackage_2407(dynamicId, request_proto):
    '''获取殖民背包信息'''
    argument = getItemsInPackage_pb2.getItemsInPackageRequest()
    argument.ParseFromString(request_proto)
    response = getItemsInPackage_pb2.getItemsInPackageResponse()
    
    dynamicId = dynamicId
    characterId = argument.id
    packCategory = argument.packCategory
    curpage = argument.curpage
    data = instance_app.getItemsInFamPackage(dynamicId, characterId)
    response.result = data.get('result',False)
    response.message = data.get('message',u'')
    if data.get('data',None):
        info = data.get('data')
        response.data.packCategory = packCategory
        response.data.packageSize = info['size']
        response.data.curpage = curpage
        response.data.maxpage = 1
        response.data.totalsize = 30
        for _item in info['items']:
            packageItemInfo = response.data.packageItemInfo.add()
            packageItemInfo.position = _item['position']
            _item['itemComponent'].SerializationItemInfo(packageItemInfo.itemInfo)
    
    return response.SerializeToString()

            
Exemplo n.º 3
0
def GetInstancePackage_2407(dynamicId, request_proto):
    '''获取殖民背包信息'''
    argument = getItemsInPackage_pb2.getItemsInPackageRequest()
    argument.ParseFromString(request_proto)
    response = getItemsInPackage_pb2.getItemsInPackageResponse()

    dynamicId = dynamicId
    characterId = argument.id
    packCategory = argument.packCategory
    curpage = argument.curpage
    data = instance_app.getItemsInFamPackage(dynamicId, characterId)
    response.result = data.get('result', False)
    response.message = data.get('message', u'')
    if data.get('data', None):
        info = data.get('data')
        response.data.packCategory = packCategory
        response.data.packageSize = info['size']
        response.data.curpage = curpage
        response.data.maxpage = 1
        response.data.totalsize = 30
        for _item in info['items']:
            packageItemInfo = response.data.packageItemInfo.add()
            packageItemInfo.position = _item['position']
            _item['itemComponent'].SerializationItemInfo(
                packageItemInfo.itemInfo)

    return response.SerializeToString()
Exemplo n.º 4
0
def getItemsInPackage_204(dynamicId, request_proto):
    '''获取包裹栏物品信息'''
    argument = getItemsInPackage_pb2.getItemsInPackageRequest()
    argument.ParseFromString(request_proto)
    response = getItemsInPackage_pb2.getItemsInPackageResponse()

    dynamicId = dynamicId
    characterId = argument.id
    packCategory = argument.packCategory
    curpage = argument.curpage
    data = packageInfo.getItemsInPackage(dynamicId, characterId, packCategory,
                                         curpage)

    response.result = data.get('result', False)
    response.message = data.get('message', u'')
    if data.get('data', None):
        info = data.get('data')
        response.data.packCategory = info['packCategory']
        response.data.packageSize = info['packageSize']
        response.data.curpage = info['curpage']
        response.data.maxpage = info['maxpage']
        response.data.totalsize = info['totalsize']
        for _item in info['itemList']:
            packageItemInfo = response.data.packageItemInfo.add()
            packageItemInfo.position = _item['position']
            _item['itemComponent'].SerializationItemInfo(
                packageItemInfo.itemInfo)

    return response.SerializeToString()