NovaBryan/EVE_Dump
Log | Files | 📦 下载最新源码 (.zip) | Refs | README

contentProviderAgentFinder.py (2388B)


      1 #Embedded file name: C:\BuildAgent\work\20d73f1b24eed06e\eve\release\V24.01\eve\client\script\ui\shared\agencyNew\contentProviders\contentProviderAgentFinder.py
      2 from eve.client.script.ui.shared.agencyNew import agencyFilters, agencyConst
      3 from eve.client.script.ui.shared.agencyNew.contentGroups import contentGroupConst
      4 from eve.client.script.ui.shared.agencyNew.contentProviders.contentProviderAgents import ContentProviderAgents
      5 from eve.common.lib import appConst
      6 
      7 class ContentProviderAgentFinder(ContentProviderAgents):
      8     contentGroup = contentGroupConst.contentGroupAgentFinder
      9 
     10     def CheckDivisionFilterCriteria(self, agent):
     11         if agent.agentTypeID == appConst.agentTypeAura:
     12             return False
     13         filterValue = agencyFilters.GetFilterValue(self.contentGroup, agencyConst.FILTERTYPE_AGENTDIVISION)
     14         if filterValue == agencyConst.FILTERVALUE_ANY:
     15             return True
     16         elif filterValue == appConst.agentTypeCareerAgent:
     17             return agent.agentTypeID == appConst.agentTypeCareerAgent
     18         elif filterValue == appConst.agentTypeStorylineMissionAgent:
     19             return agent.agentTypeID in (appConst.agentTypeStorylineMissionAgent, appConst.agentTypeGenericStorylineMissionAgent)
     20         elif filterValue == appConst.agentTypeEpicArcAgent:
     21             return agent.agentTypeID == appConst.agentTypeEpicArcAgent
     22         elif filterValue == appConst.agentTypeFactionalWarfareAgent:
     23             return agent.agentTypeID == appConst.agentTypeFactionalWarfareAgent
     24         elif filterValue == appConst.agentTypeHeraldry:
     25             return agent.agentTypeID == appConst.agentTypeHeraldry
     26         elif filterValue == appConst.corpDivisionSecurity and agent.agentTypeID == appConst.agentTypeFactionalWarfareAgent:
     27             return False
     28         else:
     29             return agent.divisionID == filterValue
     30 
     31     def CheckDivisionValidCriteria(self, agent):
     32         if agencyFilters.GetFilterValue(self.contentGroup, agencyConst.FILTERTYPE_AGENTISLOCATOR):
     33             return agent.isLocatorAgent
     34         else:
     35             divisionID = agencyFilters.GetFilterValue(self.contentGroup, agencyConst.FILTERTYPE_AGENTDIVISION)
     36             if divisionID in (appConst.agentTypeCareerAgent, appConst.agentTypeFactionalWarfareAgent):
     37                 return True
     38             return super(ContentProviderAgentFinder, self).CheckDivisionValidCriteria(agent)