本文整理匯總了Python中Quests.getRewardsInTier方法的典型用法代碼示例。如果您正苦於以下問題:Python Quests.getRewardsInTier方法的具體用法?Python Quests.getRewardsInTier怎麽用?Python Quests.getRewardsInTier使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類Quests
的用法示例。
在下文中一共展示了Quests.getRewardsInTier方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: setRewardIndex
# 需要導入模塊: import Quests [as 別名]
# 或者: from Quests import getRewardsInTier [as 別名]
def setRewardIndex(self, tier, rewardIds, rewardHistory):
self.reset()
for tierNum in range(tier):
for rewardId in Quests.getRewardsInTier(tierNum):
reward = Quests.getReward(rewardId)
reward.countReward(self)
self.notify.debug('Assigning reward %d' % rewardId)
print 'rewardHistory: ', rewardHistory
for rewardId in rewardHistory:
if rewardId in Quests.getRewardsInTier(tier):
if rewardIds.count(rewardId) != 0:
print 'before: ', rewardIds
rewardIds.remove(rewardId)
self.notify.debug('Ignoring reward %d' % rewardId)
print 'after: ', rewardIds
else:
reward = Quests.getReward(rewardId)
reward.countReward(self)
self.notify.debug('Assigning reward %d' % rewardId)
self.notify.debug('Remaining rewardIds %s' % rewardIds)
self.maxHp = min(ToontownGlobals.MaxHpLimit, self.maxHp)