コード例 #1
0
ファイル: bountySvc.py プロジェクト: R4M80MrX/eve-1
 def GetKillRights(self, toIDs):
     toIDs = [
         toID for toID in toIDs if toID is not None
         and util.IsCharacter(toID) and util.IsOwner(toID)
     ]
     validIDs = [session.charid, session.corpid]
     if session.allianceid is not None:
         validIDs.append(session.allianceid)
     return self.killRightTracker.GetKillRights(toIDs, *validIDs)
コード例 #2
0
ファイル: bountySvc.py プロジェクト: R4M80MrX/eve-1
    def _DoBallsAdded(self, slimItems):
        ownersToQuery = set()
        charIDs = set()
        validItemIDs = set()
        for ball, slim in slimItems:
            if slim.categoryID not in (const.categoryShip,
                                       const.categoryStructure):
                continue
            if slim.charID is not None and util.IsOwner(slim.charID):
                charIDs.add(slim.charID)
            if slim.corpID is not None and util.IsOwner(slim.corpID):
                ownersToQuery.add(slim.corpID)
                validItemIDs.add(slim.itemID)
            if slim.allianceID is not None and util.IsOwner(slim.allianceID):
                ownersToQuery.add(slim.allianceID)
                validItemIDs.add(slim.itemID)

        self.LogInfo('_DoBallsAdded fetching possible bounties for',
                     len(validItemIDs), 'entities with', len(ownersToQuery),
                     'seperate owners')
        if ownersToQuery or charIDs:
            self.FetchBountiesAndKillRightsFromServer(ownersToQuery, charIDs)
            sm.ChainEvent('ProcessBountyInfoUpdated', validItemIDs)