예제 #1
0
def invitedGroup(dynamicId, id, tid):
    '''邀请它人入队
    @param dynamicId: int 客户端的id
    @param id: int 邀请者的id
    @param tid: int 被邀请者的id
    '''
    player = PlayersManager().getPlayerByID(id)
    toplayer = PlayersManager().getPlayerByID(tid)
    if not player:
        return {'result': False, 'message': Lg().g(18)}
    if not toplayer:
        return {'result': False, 'message': Lg().g(91)}
    if player.teamcom.amITeamMember() and toplayer.teamcom.amITeamMember():
        return {'result': False, 'message': Lg().g(251)}
    msg = Lg().g(252) % player.baseInfo.getNickName()
    sendPlayer = toplayer.teamcom.getMyTeamLeader()
    sendList = [sendPlayer.dynamicId]
    pushObjectNetInterface.pushInvitedGroup(id, msg, sendList)
    return {'result': True, 'message': Lg().g(253)}
예제 #2
0
def invitedGroup(dynamicId,id,tid):
    '''邀请它人入队
    @param dynamicId: int 客户端的id
    @param id: int 邀请者的id
    @param tid: int 被邀请者的id
    '''
    player = PlayersManager().getPlayerByID(id)
    toplayer = PlayersManager().getPlayerByID(tid)
    if not player:
        return {'result':False,'message':Lg().g(18)}
    if not toplayer:
        return {'result':False,'message':Lg().g(91)}
    if player.teamcom.amITeamMember() and toplayer.teamcom.amITeamMember():
        return {'result':False,'message':Lg().g(251)}
    msg = Lg().g(252)%player.baseInfo.getNickName()
    sendPlayer = toplayer.teamcom.getMyTeamLeader()
    sendList = [sendPlayer.dynamicId]
    pushObjectNetInterface.pushInvitedGroup(id, msg, sendList)
    return {'result':True,'message':Lg().g(253)}
예제 #3
0
def applyInGroup(id, tid):
    '''申请入队
    @param id: 申请入队者id
    @param tid: 有队伍角色id
    '''
    player = PlayersManager().getPlayerByID(id)  #申请入队角色
    players = PlayersManager().getPlayerByID(tid)  #有队伍角色
    if not player:
        return {'result': False, 'message': Lg().g(18)}
    if not players:
        return {'result': False, 'message': Lg().g(91)}
    if player.teamcom.amITeamMember():
        return {'result': False, 'message': Lg().g(254)}
    if not player.teamcom.amITeamMember():
        return {'result': False, 'message': Lg().g(255)}

    msg = u"%s 申请进入队伍" % player.baseInfo.getNickName()
    sendPlayer = players.teamcom.getMyTeamLeader()
    sendList = [sendPlayer.dynamicId]
    pushObjectNetInterface.pushInvitedGroup(id, msg, sendList)
    return {'result': True, 'message': Lg().g(253)}
예제 #4
0
def applyInGroup(id,tid):
    '''申请入队
    @param id: 申请入队者id
    @param tid: 有队伍角色id
    '''
    player=PlayersManager().getPlayerByID(id)#申请入队角色
    players=PlayersManager().getPlayerByID(tid)#有队伍角色
    if not player:
        return {'result':False,'message':Lg().g(18)}
    if not players:
        return {'result':False,'message':Lg().g(91)}
    if player.teamcom.amITeamMember():
        return {'result':False,'message':Lg().g(254)}
    if not player.teamcom.amITeamMember():
        return {'result':False,'message':Lg().g(255)}
    
    msg = u"%s 申请进入队伍"%player.baseInfo.getNickName()
    sendPlayer = players.teamcom.getMyTeamLeader()
    sendList = [sendPlayer.dynamicId]
    pushObjectNetInterface.pushInvitedGroup(id, msg, sendList)
    return {'result':True,'message':Lg().g(253)}