def __getMissionAward(self, eventID):
     quest = self.__eventsCache.getPersonalMissions().getAllQuests()[int(
         eventID)]
     bonus = quest.getTankmanBonus()
     if quest.needToGetReward() and bonus.tankman is not None:
         showTankwomanAward(quest.getID(),
                            first(bonus.tankman.getTankmenData()))
     return
 def __getPersonalMissionAward(self, callback):
     bonus = self._quest.getTankmanBonus()
     needToGetTankman = self._quest.needToGetAddReward(
     ) and not bonus.isMain or self._quest.needToGetMainReward(
     ) and bonus.isMain
     if needToGetTankman and bonus.tankman is not None:
         showTankwomanAward(self._quest.getID(),
                            first(bonus.tankman.getTankmenData()))
         result = None
     else:
         result = yield quests_proc.PMGetReward(self._quest).request()
     callback(result)
     return
    def __getAward(self, quest, callback):
        yield lambda callback: callback(True)
        result = None
        tankman, isMainBonus = quest.getTankmanBonus()
        needToGetTankman = quest.needToGetAddReward() and not isMainBonus or quest.needToGetMainReward() and isMainBonus
        if needToGetTankman and tankman is not None:
            for tmanData in tankman.getTankmenData():
                quests_events.showTankwomanAward(quest.getID(), tmanData)
                break

        else:
            result = yield quests_proc.PotapovQuestsGetRegularReward(quest).request()
        callback(result)
def getPersonalMissionAward(quest, callback):
    from gui.server_events.events_dispatcher import showTankwomanAward
    tankman, isMainBonus = quest.getTankmanBonus()
    needToGetTankman = quest.needToGetAddReward() and not isMainBonus or quest.needToGetMainReward() and isMainBonus
    if needToGetTankman and tankman is not None:
        for tmanData in tankman.getTankmenData():
            showTankwomanAward(quest.getID(), tmanData)
            break

        result = None
    else:
        result = yield getPersonalMissionsRewardProcessor()(quest).request()
    callback(result)
    return
Exemple #5
0
    def __getAward(self, quest, callback):
        yield lambda callback: callback(True)
        result = None
        tankman, isMainBonus = quest.getTankmanBonus()
        needToGetTankman = quest.needToGetAddReward(
        ) and not isMainBonus or quest.needToGetMainReward() and isMainBonus
        if needToGetTankman and tankman is not None:
            for tmanData in tankman.getTankmenData():
                quests_events.showTankwomanAward(quest.getID(), tmanData)
                break

        else:
            result = yield quests_proc.PotapovQuestsGetRegularReward(
                quest).request()
        callback(result)
def getPotapovQuestAward(quest, callback):
    """ Display special tankwoman award window.
    """
    from gui.server_events.events_dispatcher import showTankwomanAward
    tankman, isMainBonus = quest.getTankmanBonus()
    needToGetTankman = quest.needToGetAddReward() and not isMainBonus or quest.needToGetMainReward() and isMainBonus
    if needToGetTankman and tankman is not None:
        for tmanData in tankman.getTankmenData():
            showTankwomanAward(quest.getID(), tmanData)
            break

        result = None
    else:
        result = yield getPotapovQuestsRewardProcessor()(quest).request()
    callback(result)
    return