本文整理匯總了Python中hall.entity.todotask.TodoTaskHelper.translateDailyCheckinStates方法的典型用法代碼示例。如果您正苦於以下問題:Python TodoTaskHelper.translateDailyCheckinStates方法的具體用法?Python TodoTaskHelper.translateDailyCheckinStates怎麽用?Python TodoTaskHelper.translateDailyCheckinStates使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類hall.entity.todotask.TodoTaskHelper
的用法示例。
在下文中一共展示了TodoTaskHelper.translateDailyCheckinStates方法的1個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Python代碼示例。
示例1: doGainNSLoginReward
# 需要導入模塊: from hall.entity.todotask import TodoTaskHelper [as 別名]
# 或者: from hall.entity.todotask.TodoTaskHelper import translateDailyCheckinStates [as 別名]
def doGainNSLoginReward(self, userId, gameId, clientId):
checkinOk, rewardAssetList, _checkinDays = \
halldailycheckin.dailyCheckin.gainCheckinReward(gameId, userId)
rewardChipCount = 0
if checkinOk:
datachangenotify.sendDataChangeNotify(gameId, userId, TYAssetUtils.getChangeDataNames(rewardAssetList))
rewardChipCount = TYAssetUtils.getAssetCount(rewardAssetList, hallitem.ASSET_CHIP_KIND_ID)
states = halldailycheckin.dailyCheckin.getStates(gameId, userId, pktimestamp.getCurrentTimestamp())
mo = MsgPack()
mo.setCmd('gain_nslogin_reward')
mo.setResult('gameId', gameId)
mo.setResult('userId', userId)
mo.setResult('rewardstate', TodoTaskHelper.translateDailyCheckinStates(states))
mo.setResult('success', True)
mo.setResult('chip', userchip.getChip(userId))
mo.setResult('rewardchip', rewardChipCount)
router.sendToUser(mo, userId)