示例#1
0
def deleteRole(dynamicId, userId, characterId, password):
    '''删除角色
    @param dynamicId: int 客户端的ID
    @param userId: int 用户端ID
    @param characterId: int 角色的ID
    @param password: str 用户的密码
    '''
    user = UsersManager().getUserByDynamicId(dynamicId)
    if not user.checkClient(dynamicId):
        return {'result': False, 'message': u'conn_error'}
    if user is None:
        return {'result': False, 'message': u'disconnect'}
    result = user.deleteCharacter(characterId, password)
    return result
示例#2
0
def deleteRole(dynamicId, userId, characterId,password):
    '''删除角色
    @param dynamicId: int 客户端的ID
    @param userId: int 用户端ID
    @param characterId: int 角色的ID
    @param password: str 用户的密码
    '''
    user=UsersManager().getUserByDynamicId(dynamicId)
    if not user.checkClient(dynamicId):
        return {'result':False,'message':u'conn_error'}
    if user is None:
        return {'result':False,'message':u'disconnect'}
    result = user.deleteCharacter(characterId,password)
    return result
示例#3
0
def deleteRole(dynamicId, userId, characterId, password):
    """删除角色
    @param dynamicId: int 客户端的ID
    @param userId: int 用户端ID
    @param characterId: int 角色的ID
    @param password: str 用户的密码
    """
    user = UsersManager().getUserByDynamicId(dynamicId)
    if not user.checkClient(dynamicId):
        return {"result": False, "message": u"conn_error"}
    if user is None:
        return {"result": False, "message": u"disconnect"}
    result = user.deleteCharacter(characterId, password)
    return result
示例#4
0
def activeNewPlayer(dynamicId, userId, nickName, profession):
    '''创建角色
    arguments=(userId,nickName,profession)
    userId用户ID
    nickName角色昵称
    profession职业选择
    '''
    user = UsersManager().getUserByDynamicId(dynamicId)
    if not user:
        return {'result': False, 'message': u'conn_error'}
    if not user.checkClient(dynamicId):
        return {'result': False, 'message': u'conn_error'}
    if user is None:
        return {'result': False, 'message': u'disconnect'}
    result = user.creatNewCharacter(nickName, profession)
    return result
示例#5
0
def activeNewPlayer(dynamicId,userId,nickName,profession):
    '''创建角色
    arguments=(userId,nickName,profession)
    userId用户ID
    nickName角色昵称
    profession职业选择
    '''
    user=UsersManager().getUserByDynamicId(dynamicId)
    if not user:
        return {'result':False,'message':u'conn_error'}
    if not user.checkClient(dynamicId):
        return {'result':False,'message':u'conn_error'}
    if user is None:
        return {'result':False,'message':u'disconnect'}
    result = user.creatNewCharacter(nickName, profession)
    return result
示例#6
0
def activeNewPlayer(dynamicId, userId, nickName, profession):
    """创建角色
    arguments=(userId,nickName,profession)
    userId用户ID
    nickName角色昵称
    profession职业选择
    """
    user = UsersManager().getUserByDynamicId(dynamicId)
    if not user:
        return {"result": False, "message": u"conn_error"}
    if not user.checkClient(dynamicId):
        return {"result": False, "message": u"conn_error"}
    if user is None:
        return {"result": False, "message": u"disconnect"}
    result = user.creatNewCharacter(nickName, profession)
    return result