def __syncActionsWithQuests(self): self.__actions2quests.clear() self.__quests2actions.clear() quests = self.__cache['quests'] actions = [ item for item in self.__cache['actions'] ] self.__actions2quests = {k:[] for k in actions} for questID, questData in quests.iteritems(): groupId = questData.getGroupID() linkedActionID = getLinkedActionID(groupId, actions) if linkedActionID is not None: self.__actions2quests[linkedActionID].append(questID) self.__convertQuests2actions() return
def __syncActionsWithQuests(self): """After invalidation of EventsCache, we should sync links between Actions and BattleQuests """ self.__actions2quests.clear() self.__quests2actions.clear() quests = self.__cache['quests'] actions = [item for item in self.__cache['actions']] self.__actions2quests = {k: [] for k in actions} for questID, questData in quests.iteritems(): groupId = questData.getGroupID() linkedActionID = getLinkedActionID(groupId, actions) if linkedActionID is not None: self.__actions2quests[linkedActionID].append(questID) self.__convertQuests2actions() return
def getLinkedAction(self, actions): return getLinkedActionID(self.getID(), actions)
def getLinkedAction(self, actions): """ Gets linked action ID """ return getLinkedActionID(self.getID(), actions)