本文整理汇总了Python中messenger_common_chat2.messageArgs函数的典型用法代码示例。如果您正苦于以下问题:Python messageArgs函数的具体用法?Python messageArgs怎么用?Python messageArgs使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了messageArgs函数的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。
示例1: __sendAction
def __sendAction(self, actionID, reqID, args = None):
player = BigWorld.player()
if player:
player.base.messenger_onActionByClient_chat2(actionID, reqID, args or messageArgs())
return True
else:
LOG_ERROR('Player is not defined')
return False
示例2: requestCredentials
def requestCredentials(self, reset = 0):
provider = self.provider()
actionID = _ACTIONS.GET_VOIP_CREDENTIALS
(success, reqID,) = provider.doAction(actionID, messageArgs(int32Arg1=reset), True)
if reqID:
self.pushRq(reqID, actionID)
if success:
provider.setActionCoolDown(actionID, _LIMITS.VOIP_CREDENTIALS_REQUEST_COOLDOWN_SEC)
示例3: findUsers
def findUsers(self, namePattern, searchOnlineOnly = None):
provider = self.provider()
if searchOnlineOnly is None:
searchOnlineOnly = False
success, reqID = provider.doAction(_ACTIONS.FIND_USERS_BY_NAME, messageArgs(strArg1=namePattern, int32Arg1=self.__limits.getMaxResultSize(), int64Arg1=searchOnlineOnly), response=True)
if reqID:
self.pushRq(reqID, _ACTIONS.FIND_USERS_BY_NAME)
if success:
cooldown = self.__limits.getRequestCooldown()
provider.setActionCoolDown(_ACTIONS.FIND_USERS_BY_NAME, cooldown)
return (success, reqID)
示例4: create4Reload
def create4Reload(self, isCassetteClip, timeLeft, quantity):
name = 'RELOADINGGUN'
args = None
if timeLeft > 0:
floatArg1 = timeLeft
int32Arg1 = 0
if isCassetteClip:
if quantity > 0:
name = 'RELOADING_CASSETE'
int32Arg1 = quantity
args = messageArgs(int32Arg1=int32Arg1, floatArg1=floatArg1)
elif quantity == 0:
name = 'RELOADING_UNAVAILABLE'
elif isCassetteClip:
name = 'RELOADING_READY_CASSETE'
args = messageArgs(int32Arg1=quantity)
else:
name = 'RELOADING_READY'
if name in BATTLE_CHAT_COMMANDS_BY_NAMES:
decorator = _OutCmdDecorator(name, args)
else:
decorator = None
return decorator
示例5: doAction
def doAction(self, actionID, args = None, response = False, skipCoolDown = False):
player = BigWorld.player()
(success, reqID,) = (False, 0)
if player:
if self.__coolDown.isInProcess(actionID):
if not skipCoolDown:
g_messengerEvents.onServerErrorReceived(createCoolDownError(actionID))
elif response:
reqID = self.__idGen.next()
player.base.messenger_onActionByClient_chat2(actionID, reqID, args or messageArgs())
success = True
else:
LOG_ERROR('Player is not defined')
return (success, reqID)
示例6: broadcastArgs
def broadcastArgs(self, text, *args):
return messageArgs(strArg1=text, int32Arg1=args[0] if args else 0)
示例7: __init__
def __init__(self, name, args = None):
super(_OutCmdDecorator, self).__init__(args or messageArgs(), getClientID4BattleChannel(BATTLE_CHANNEL.TEAM.name))
self._name = name
示例8: createByCellIdx
def createByCellIdx(self, cellIdx):
decorator = None
if _MINIMAP_CMD_ID:
decorator = _OutCmdDecorator('ATTENTIONTOCELL', messageArgs(int32Arg1=cellIdx))
return decorator
示例9: createByNameTarget
def createByNameTarget(self, name, targetID):
decorator = None
if name in BATTLE_CHAT_COMMANDS_BY_NAMES:
decorator = _OutCmdDecorator(name, messageArgs(int32Arg1=targetID))
return decorator
示例10: __init__
def __init__(self, args = None, tail = None):
super(_ParsingResult, self).__init__()
self.id = 0
self.args = args or messageArgs()
self.tail = tail or []