Ejemplo n.º 1
0
 def addBrotherInfo(self, brotherInfo):
     brotherid = idtool.allocId()
     brotherInfo.bid = brotherid
     self.allBrotherList[brotherInfo.bid] = brotherInfo
     playerInfo = brotherInfo.getPlayerInfo()
     DbService.getGuildService().addBrother(brotherid, playerInfo[0].uid,
                                            playerInfo[1].uid,
                                            playerInfo[2].uid)
Ejemplo n.º 2
0
 def addBrotherList(self, player1, player2, player3):
     brotherid = idtool.allocId()
     brother = BrotherCtrl()
     brother.bid = brotherid
     brother.addBrotherMember(player1, player2, player3)
     #brother.extra = ''
     self.allBrotherList[brother.bid] = brother
     DbService.getGuildService().addBrother(brotherid, player1.uid,
                                            player2.uid, player3.uid)
     return brotherid
Ejemplo n.º 3
0
def createNewMail(player, type, title, msg, listAtt = None):
    mail = Mail()
    mail.id = idtool.allocId()
    mail.type = type
    if player:
        mail.sender = playerToMailPlayer(player)
    else:
        mail.sender = None
    mail.title = title
    mail.msg = msg
    mail.sendTime = ffext.getTime()
    if listAtt == None:
        listAtt = []
    mail.listAttach = listAtt
    return mail
Ejemplo n.º 4
0
    def allocMarryTotalInfo(self, player1, player2):
        if player1.gender == Base.Gender.FEMAIL:
            tmp = player1
            player1 = player2
            player2 = tmp
        marryId = idtool.allocId()
        marryTotalInfo = MarryTotalInfo(marryId)
        marryTotalInfo.coupleData[0].setPlayerMarryInfo(player1)
        marryTotalInfo.coupleData[1].setPlayerMarryInfo(player2)

        player1.marriageCtrl.marryId = marryId
        player1.marriageCtrl.marryTotalInfo = marryTotalInfo

        player2.marriageCtrl.marryId = marryId
        player2.marriageCtrl.marryTotalInfo = marryTotalInfo
        self.allMarryInfo[marryId] = marryTotalInfo
        return marryTotalInfo
Ejemplo n.º 5
0
def buildMarryRoom(room, id1, id2):
    room.roomId = idtool.allocId()
    room.uid1 = id1
    room.uid2 = id2
    return True