Beispiel #1
0
 def __shouldShowErrorMessage(self, actionID, args=None):
     command = _ACTIONS.battleChatCommandFromActionID(actionID)
     if command is None:
         return False
     else:
         currTime = BigWorld.time()
         targetID = args['int32Arg1']
         sndrBlockReason = areSenderCooldownsActive(currTime, self.__battleCmdCooldowns, actionID, targetID)
         return sndrBlockReason.cooldownType != CHAT_COMMAND_COOLDOWN_TYPE_IDS.TIMEFRAME_DATA_COOLDOWN if sndrBlockReason is not None else False
Beispiel #2
0
 def __isCooldownInProcess(self, actionID, args=None):
     command = _ACTIONS.battleChatCommandFromActionID(actionID)
     if command:
         currTime = BigWorld.time()
         targetID = args['int32Arg1']
         sndrBlockReason = areSenderCooldownsActive(currTime, self.__battleCmdCooldowns, actionID, targetID)
         return command.name not in CHAT_COMMANDS_THAT_IGNORE_COOLDOWNS and sndrBlockReason is not None
     else:
         return self.__coolDown.isInProcess(actionID)
Beispiel #3
0
 def __getCooldownTime(self, actionID, args=None):
     command = _ACTIONS.battleChatCommandFromActionID(actionID)
     if command:
         currTime = BigWorld.time()
         targetID = args['int32Arg1']
         sndrBlockReason = areSenderCooldownsActive(currTime, self.__battleCmdCooldowns, actionID, targetID)
         cdTime = round(sndrBlockReason.cooldownEnd - currTime, 1) if sndrBlockReason is not None else 0
         return cdTime
     else:
         self.__coolDown.getTime(actionID)
         return