def sendChatByMode(self,
                    msgType,
                    textId,
                    questInt=0,
                    taskNum=0,
                    questFlag=0):
     messenger.send('sentSpeedChat')
     if msgType == SPEEDCHAT_EMOTE:
         base.talkAssistant.sendOpenSpeedChat(msgType, textId)
         return
     if msgType == GMCHAT:
         gmHandler = SpeedChatGMHandler.SpeedChatGMHandler()
         base.talkAssistant.sendOpenTalk(gmHandler.getPhrase(textId))
         return
     if self.mode == 'PlayerWhisper':
         if questFlag:
             base.talkAssistant.sendPlayerWhisperQuestSpeedChat(
                 questInt, msgType, taskNum, self.whisperId)
         else:
             base.talkAssistant.sendPlayerWhisperSpeedChat(
                 msgType, textId, self.whisperId)
     else:
         if self.mode == 'AvatarWhisper':
             if questFlag:
                 pass
             else:
                 base.talkAssistant.sendAvatarWhisperSpeedChat(
                     msgType, textId, self.whisperId)
         else:
             if self.mode == 'GuildChat':
                 if questFlag:
                     base.talkAssistant.sendGuildSCQuestChat(
                         msgType, questInt, taskNum)
                 else:
                     base.talkAssistant.sendGuildSpeedChat(msgType, textId)
             else:
                 if self.mode == 'CrewChat':
                     if questFlag:
                         base.talkAssistant.sendPartySCQuestChat(
                             msgType, questInt, taskNum)
                     else:
                         base.talkAssistant.sendPartySpeedChat(
                             msgType, textId)
                 else:
                     if self.mode == 'ShipPVP':
                         if questFlag:
                             base.talkAssistant.sendShipPVPCrewSCQuestChat(
                                 questInt, msgType, taskNum)
                         else:
                             base.talkAssistant.sendShipPVPCrewSpeedChat(
                                 msgType, textId)
                     else:
                         if questFlag:
                             base.talkAssistant.sendSCQuestChat(
                                 msgType, questInt, taskNum)
                         else:
                             base.talkAssistant.sendOpenSpeedChat(
                                 msgType, textId)
示例#2
0
 def __init__(self, textId):
     SCTerminal.__init__(self)
     gmHandler = SpeedChatGMHandler.SpeedChatGMHandler()
     self.textId = textId
     self.text = gmHandler.getPhrase(textId)
 def addGMSpeedChat(self):
     if not self.gmHandler:
         self.gmHandler = SpeedChatGMHandler.SpeedChatGMHandler()
         self.structure.insert(0, self.gmHandler.getStructure())
         self.speedChat.rebuildFromStructure(self.structure)