Ejemplo n.º 1
0
    def sendPlayerWhisperToonTaskSpeedChat(self, taskId, toNpcId, toonProgress, msgIndex, receiverId):
        error = None

        base.cr.speedchatRelay.sendSpeedchatToonTask(receiverId, taskId, toNpcId, toonProgress, msgIndex)
        #message = SCDecoders.decodeSCCustomMsg(messageIndex)
        message = TTSCDecoders.decodeTTSCToontaskMsg(
            taskId, toNpcId, toonProgress, msgIndex)

        if self.logWhispers:
            receiverName = self.findName(receiverId, 1)

            newMessage = TalkMessage(self.countMessage(), #messageNumber
                            self.stampTime(), #timeStamp
                            message, #message Body
                            localAvatar.doId, #senderAvatarId
                            localAvatar.getName(), #senderAvatarName
                            localAvatar.DISLid, #senderAccountId
                            localAvatar.DISLname, #senderAccountName
                            None, #receiverAvatarId
                            None, #receiverAvatarName
                            receiverId, #receiverAccountId
                            receiverName, #receiverAccountName
                            TALK_ACCOUNT, #talkType
                            None) #extraInfo

            self.historyComplete.append(newMessage)
            self.addToHistoryDoId(newMessage, localAvatar.doId)
            self.addToHistoryDISLId(newMessage, base.cr.accountDetailRecord.playerAccountId)
            messenger.send("NewOpenMessage", [newMessage])
        return error
Ejemplo n.º 2
0
 def sendPlayerWhisperToonTaskSpeedChat(self, taskId, toNpcId, toonProgress, msgIndex, receiverId):
     error = None
     base.cr.speedchatRelay.sendSpeedchatToonTask(receiverId, taskId, toNpcId, toonProgress, msgIndex)
     message = TTSCDecoders.decodeTTSCToontaskMsg(taskId, toNpcId, toonProgress, msgIndex)
     if self.logWhispers:
         receiverName = self.findName(receiverId, 1)
         newMessage = TalkMessage(self.countMessage(), self.stampTime(), message, localAvatar.doId, localAvatar.getName(), localAvatar.DISLid, localAvatar.DISLname, None, None, receiverId, receiverName, TALK_ACCOUNT, None)
         self.historyComplete.append(newMessage)
         self.addToHistoryDoId(newMessage, localAvatar.doId)
         self.addToHistoryDISLId(newMessage, base.cr.accountDetailRecord.playerAccountId)
         messenger.send('NewOpenMessage', [newMessage])
     return error
Ejemplo n.º 3
0
 def translateMessage(self, messageType, indexArray, senderDISLName):
     message = SpeedchatRelayUD.translateMessage(self, messageType,
                                                 indexArray, "Bob")
     if message:
         return message
     elif messageType == SpeedchatRelayGlobals.TOONTOWN_QUEST:
         #message = SCDecoders.decodeTTSCToontaskMsg(taskId, toNpcId, toonProgress, msgIndex)
         message = TTSCDecoders.decodeTTSCToontaskMsg(
             indexArray[0], indexArray[1], indexArray[2], indexArray[3])
         return message
     else:
         return None