本文整理汇总了Python中toontown.parties.DistributedPartyActivityAI.DistributedPartyActivityAI.toonExitDemand方法的典型用法代码示例。如果您正苦于以下问题:Python DistributedPartyActivityAI.toonExitDemand方法的具体用法?Python DistributedPartyActivityAI.toonExitDemand怎么用?Python DistributedPartyActivityAI.toonExitDemand使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类toontown.parties.DistributedPartyActivityAI.DistributedPartyActivityAI
的用法示例。
在下文中一共展示了DistributedPartyActivityAI.toonExitDemand方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: toonExitDemand
# 需要导入模块: from toontown.parties.DistributedPartyActivityAI import DistributedPartyActivityAI [as 别名]
# 或者: from toontown.parties.DistributedPartyActivityAI.DistributedPartyActivityAI import toonExitDemand [as 别名]
def toonExitDemand(self):
avId = self.air.getAvatarIdFromSender()
if avId not in self.toonsPlaying:
self.air.writeServerEvent('suspicious', avId=avId, issue="Toon tried to exit a party game they're not using!")
return
catches = self.player2catches[avId]
del self.player2catches[avId]
av = self.air.doId2do.get(avId, None)
if not av:
self.air.writeServerEvent('suspicious', avId=avId, issue='Toon tried to award beans while not in district!')
return
if catches > PartyGlobals.CatchMaxTotalReward:
catches = PartyGlobals.CatchMaxTotalReward
self.sendUpdateToAvatarId(avId, 'showJellybeanReward', [catches, av.getMoney(), TTLocalizer.PartyCatchRewardMessage % (catches, catches)])
av.addMoney(catches)
DistributedPartyActivityAI.toonExitDemand(self)