當前位置: 首頁>>代碼示例>>Python>>正文


Python DistributedPartyActivityAI.toonExitDemand方法代碼示例

本文整理匯總了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)
開發者ID:Toonerz,項目名稱:Toontown-World-Online-Leak,代碼行數:18,代碼來源:DistributedPartyCatchActivityAI.py


注:本文中的toontown.parties.DistributedPartyActivityAI.DistributedPartyActivityAI.toonExitDemand方法示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。