本文整理汇总了Python中hall.entity.todotask.TodoTaskHelper.makeZhuanyunTodoTaskNew方法的典型用法代码示例。如果您正苦于以下问题:Python TodoTaskHelper.makeZhuanyunTodoTaskNew方法的具体用法?Python TodoTaskHelper.makeZhuanyunTodoTaskNew怎么用?Python TodoTaskHelper.makeZhuanyunTodoTaskNew使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类hall.entity.todotask.TodoTaskHelper
的用法示例。
在下文中一共展示了TodoTaskHelper.makeZhuanyunTodoTaskNew方法的1个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: makeTodoTaskZhuanyun_
# 需要导入模块: from hall.entity.todotask import TodoTaskHelper [as 别名]
# 或者: from hall.entity.todotask.TodoTaskHelper import makeZhuanyunTodoTaskNew [as 别名]
def makeTodoTaskZhuanyun_(gameId, userId, clientId, benefitsSend, userBenefits, roomId):
from hall.entity import hallproductselector
if ftlog.is_debug():
ftlog.debug('hallpopwnd.makeTodoTaskZhuanyun gameId=', gameId,
'userId=', userId,
'clientId=', clientId,
'benefitsSend=', benefitsSend,
'userBenefits=', userBenefits.__dict__,
'roomId=', roomId)
clientOs, _clientVer, _ = strutil.parseClientId(clientId)
clientOs = clientOs.lower()
if clientOs != 'winpc':
return TodoTaskHelper.makeZhuanyunTodoTaskNew(gameId, userId, clientId,
benefitsSend, userBenefits, roomId)
product, _ = hallproductselector.selectLessbuyProduct(gameId, userId, clientId, roomId)
if not product:
return None
user_diamond = pkuserdata.getAttr(userId, 'diamond')
if user_diamond >= int(product.priceDiamond):
chip = product.getMinFixedAssetCount(hallitem.ASSET_CHIP_KIND_ID)
show_str = u'运气不好,来个转运礼包!%s元得%s万金币。' % (product.price, chip)
buy_type = 'consume'
btn_txt = u'兑换'
else:
show_str = u'运气不好~,买点金币战个痛快吧!'
buy_type = 'charge'
btn_txt = u'去充值'
orderShow = TodoTaskOrderShow.makeByProduct(show_str, '', product, buy_type)
orderShow.setParam('sub_action_btn_text', btn_txt)
return orderShow