コード例 #1
0
 def recvMemberAdded(self, memberInfo, inviterId, inviterName):
     avatarId, avatarName, rank, isOnline, bandManagerId, bandId = memberInfo
     if avatarId != localAvatar.getDoId():
         if inviterId == localAvatar.getDoId():
             base.talkAssistant.receiveGuildUpdateMessage(OTPLocalizer.GuildInviterFriendInvitedP, inviterId, PLocalizer.You, avatarId, avatarName)
         elif inviterId:
             base.talkAssistant.receiveGuildUpdateMessage(OTPLocalizer.GuildInviterFriendInvited, inviterId, inviterName, avatarId, avatarName)
     GuildManager.recvMemberAdded(self, memberInfo, inviterId, inviterName)
コード例 #2
0
 def recvMemberAdded(self, memberInfo, inviterId, inviterName):
     (avatarId, avatarName, rank, isOnline, bandManagerId, bandId) = memberInfo
     if avatarId != localAvatar.getDoId():
         if inviterId == localAvatar.getDoId():
             base.talkAssistant.receiveGuildUpdateMessage(OTPLocalizer.GuildInviterFriendInvitedP, inviterId, PLocalizer.You, avatarId, avatarName)
         elif inviterId:
             base.talkAssistant.receiveGuildUpdateMessage(OTPLocalizer.GuildInviterFriendInvited, inviterId, inviterName, avatarId, avatarName)
         
     
     GuildManager.recvMemberAdded(self, memberInfo, inviterId, inviterName)
コード例 #3
0
 def recvMemberRemoved(self, avatarId, senderId, avatarName, senderName):
     if avatarId != localAvatar.getDoId():
         if senderId == localAvatar.getDoId():
             base.talkAssistant.receiveGuildUpdateMessage(OTPLocalizer.GuildInviterFriendKickedOutP, senderId, PLocalizer.You, avatarId, avatarName)
         elif senderId == avatarId:
             base.talkAssistant.receiveGuildUpdateMessage(OTPLocalizer.GuildInviterFriendsNoMore, senderId, senderName, 0, '')
         elif senderId:
             base.talkAssistant.receiveGuildUpdateMessage(OTPLocalizer.GuildInviterFriendKickedOut, senderId, senderName, avatarId, avatarName)
     messenger.send('kickedFromGuild-%s' % avatarId)
     GuildManager.recvMemberRemoved(self, avatarId, senderId, avatarName, senderName)
コード例 #4
0
 def recvMemberRemoved(self, avatarId, senderId, avatarName, senderName):
     if avatarId != localAvatar.getDoId():
         if senderId == localAvatar.getDoId():
             base.talkAssistant.receiveGuildUpdateMessage(OTPLocalizer.GuildInviterFriendKickedOutP, senderId, PLocalizer.You, avatarId, avatarName)
         elif senderId == avatarId:
             base.talkAssistant.receiveGuildUpdateMessage(OTPLocalizer.GuildInviterFriendsNoMore, senderId, senderName, 0, '')
         elif senderId:
             base.talkAssistant.receiveGuildUpdateMessage(OTPLocalizer.GuildInviterFriendKickedOut, senderId, senderName, avatarId, avatarName)
         
     
     messenger.send('kickedFromGuild-%s' % avatarId)
     GuildManager.recvMemberRemoved(self, avatarId, senderId, avatarName, senderName)
コード例 #5
0
    def recvMemberUpdateRank(self, avatarId, senderId, avatarName, senderName,
                             rank, promote):
        doShow = 1
        if avatarId == localAvatar.getDoId():
            avatarName = PLocalizer.LowerYou
        elif senderId == localAvatar.getDoId():
            senderName = PLocalizer.LowerYou

        if promote:
            if senderId == localAvatar.getDoId():
                senderName = PLocalizer.You

            if rank == GUILDRANK_GM:
                if senderId == localAvatar.getDoId():
                    message = OTPLocalizer.GuildInviterFriendPromotedGMP
                else:
                    message = OTPLocalizer.GuildInviterFriendPromotedGM
            elif senderId == localAvatar.getDoId():
                message = OTPLocalizer.GuildInviterFriendPromotedP
            else:
                message = OTPLocalizer.GuildInviterFriendPromoted
        elif senderId == localAvatar.getDoId():
            senderName = PLocalizer.You

        if self.id2Rank.get(avatarId) == GUILDRANK_GM:
            doShow = 0
            if senderId == localAvatar.getDoId():
                message = OTPLocalizer.GuildInviterFriendDemotedGMP
            else:
                message = OTPLocalizer.GuildInviterFriendDemotedGM
        elif senderId == localAvatar.getDoId():
            message = OTPLocalizer.GuildInviterFriendDemotedP
        else:
            message = OTPLocalizer.GuildInviterFriendDemoted
        if doShow:
            base.talkAssistant.receiveGuildUpdateMessage(
                message, senderId, senderName, avatarId, avatarName,
                [PLocalizer.GuildRankNames[rank]])

        GuildManager.recvMemberUpdateRank(self, avatarId, senderId, avatarName,
                                          senderName, rank, promote)
コード例 #6
0
 def recvMemberUpdateRank(self, avatarId, senderId, avatarName, senderName, rank, promote):
     doShow = 1
     if avatarId == localAvatar.getDoId():
         avatarName = PLocalizer.LowerYou
     elif senderId == localAvatar.getDoId():
         senderName = PLocalizer.LowerYou
     
     if promote:
         if senderId == localAvatar.getDoId():
             senderName = PLocalizer.You
         
         if rank == GUILDRANK_GM:
             if senderId == localAvatar.getDoId():
                 message = OTPLocalizer.GuildInviterFriendPromotedGMP
             else:
                 message = OTPLocalizer.GuildInviterFriendPromotedGM
         elif senderId == localAvatar.getDoId():
             message = OTPLocalizer.GuildInviterFriendPromotedP
         else:
             message = OTPLocalizer.GuildInviterFriendPromoted
     elif senderId == localAvatar.getDoId():
         senderName = PLocalizer.You
     
     if self.id2Rank.get(avatarId) == GUILDRANK_GM:
         doShow = 0
         if senderId == localAvatar.getDoId():
             message = OTPLocalizer.GuildInviterFriendDemotedGMP
         else:
             message = OTPLocalizer.GuildInviterFriendDemotedGM
     elif senderId == localAvatar.getDoId():
         message = OTPLocalizer.GuildInviterFriendDemotedP
     else:
         message = OTPLocalizer.GuildInviterFriendDemoted
     if doShow:
         base.talkAssistant.receiveGuildUpdateMessage(message, senderId, senderName, avatarId, avatarName, [
             PLocalizer.GuildRankNames[rank]])
     
     GuildManager.recvMemberUpdateRank(self, avatarId, senderId, avatarName, senderName, rank, promote)