Exemple #1
0
    def setPackage(self, size=12):
        '''读取数据库设置角色包裹
		@param size:int 包裹的大小
		'''
        self._package = Package.Package(size)
        itemlist = tb_item_admin.getAllPkByFk(self._owner.baseInfo.id)
        itemobjlist = tb_item_admin.getObjList(itemlist)
        for itemmode in itemobjlist:
            itemId = int(itemmode._name.split(':')[1])
            item = Item(id=itemId)
            itemPackInfo = itemmode.get('data')
            item.initItemInstance(itemPackInfo)
            self._package.putItemInPackage(item)
Exemple #2
0
    def setPackage(self ,size = 12):
        """读取数据库设置角色包裹
        @param size: int 包裹的大小
        """
        self._package = Package.Package(size)
        itemlist = tbitemadmin.getAllPkByFk(self._owner.baseInfo.id)
        itemobjlist = tbitemadmin.getObjList(itemlist)
#        itemsPackInfo = db_package.getAllItemsByCharacterId(self._owner.baseInfo.id)
        for itemmode in itemobjlist:
            itemId = int(itemmode._name.split(':')[1])
            item = Item(id =itemId)
            itemPackInfo = itemmode.get('data')
            item.initItemInstance(itemPackInfo)
            self._package.putItemInPackage(item)