Exemple #1
0
 def handleToonsWon(self, toons):
     extraMerits = [0, 0, 0, 0, 0]
     amount = ToontownGlobals.MintCogBuckRewards[self.level.mintId]
     index = ToontownGlobals.cogHQZoneId2deptIndex(self.level.mintId)
     extraMerits[index] = amount
     for toon in toons:
         recovered, notRecovered = self.air.questManager.recoverItems(
             toon, self.suitsKilled, self.getTaskZoneId())
         self.toonItems[toon.doId][0].extend(recovered)
         self.toonItems[toon.doId][1].extend(notRecovered)
         meritArray = self.air.promotionMgr.recoverMerits(
             toon,
             self.suitsKilled,
             self.getTaskZoneId(),
             getMintCreditMultiplier(self.getTaskZoneId()),
             extraMerits=extraMerits)
         if toon.doId in self.helpfulToons:
             self.toonMerits[toon.doId] = addListsByValue(
                 self.toonMerits[toon.doId], meritArray)
         else:
             self.notify.debug('toon %d not helpful list, skipping merits' %
                               toon.doId)
         if self.bossBattle:
             self.toonParts[toon.doId] = self.air.cogSuitMgr.recoverPart(
                 toon, 'fullSuit', self.suitTrack, self.getTaskZoneId(),
                 toons)
             self.notify.debug('toonParts = %s' % self.toonParts)
    def handleToonsWon(self, toons):
        # toons just beat the boss
        extraMerits = [0, 0, 0, 0]
        amount = ToontownGlobals.MintCogBuckRewards[self.level.mintId]
        index = ToontownGlobals.cogHQZoneId2deptIndex(self.level.mintId)
        extraMerits[index] = amount

        for toon in toons:
            # Append the recovered and not recovered items to their respective lists
            recovered, notRecovered = self.air.questManager.recoverItems(
                toon, self.suitsKilled, self.getTaskZoneId())
            self.toonItems[toon.doId][0].extend(recovered)
            self.toonItems[toon.doId][1].extend(notRecovered)

            # the new merit list must be added by value to the cumulative list
            meritArray = self.air.promotionMgr.recoverMerits(
                toon,
                self.suitsKilled,
                self.getTaskZoneId(),
                getMintCreditMultiplier(self.getTaskZoneId()),
                extraMerits=extraMerits)
            if toon.doId in self.helpfulToons:
                self.toonMerits[toon.doId] = addListsByValue(
                    self.toonMerits[toon.doId], meritArray)
            else:
                self.notify.debug("toon %d not helpful list, skipping merits" %
                                  toon.doId)
 def handleToonsWon(self, toons):
     extraMerits = [0,
      0,
      0,
      0]
     amount = ToontownGlobals.MintCogBuckRewards[self.level.mintId]
     index = ToontownGlobals.cogHQZoneId2deptIndex(self.level.mintId)
     extraMerits[index] = amount
     for toon in toons:
         recovered, notRecovered = self.air.questManager.recoverItems(toon, self.suitsKilled, self.getTaskZoneId())
         self.toonItems[toon.doId][0].extend(recovered)
         self.toonItems[toon.doId][1].extend(notRecovered)
         meritArray = self.air.promotionMgr.recoverMerits(toon, self.suitsKilled, self.getTaskZoneId(), getMintCreditMultiplier(self.getTaskZoneId()), extraMerits=extraMerits)
         if toon.doId in self.helpfulToons:
             self.toonMerits[toon.doId] = addListsByValue(self.toonMerits[toon.doId], meritArray)
         else:
             self.notify.debug('toon %d not helpful list, skipping merits' % toon.doId)