예제 #1
0
def UpdateTaskProcess(characterId,taskID,props):
    '''更新任务的进度'''
    sql = "UPDATE tb_task_process SET "
    sql = util.forEachUpdatePropsForIncrement(sql, props)
    sql += " where characterId=%d and taskId =%d" %(characterId,taskID)
    cursor = dbaccess.dbpool.cursor()
    count = cursor.execute(sql)
    dbaccess.dbpool.commit()
    cursor.close()
    if count:
        return True
    return False
예제 #2
0
def updateMainTaskRecord(characterId,props):
    '''更新角色的主线任务记录'''
    sql = "UPDATE tb_task_main_record SET "
    sql = util.forEachUpdatePropsForIncrement(sql, props)
    sql += " where characterId=%d " %(characterId)
    cursor = dbaccess.dbpool.cursor()
    count = cursor.execute(sql)
    dbaccess.dbpool.commit()
    cursor.close()
    if count:
        return True
    return False
예제 #3
0
def updateMainTaskRecord(characterId, props):
    '''更新角色的主线任务记录'''
    sql = "UPDATE tb_task_main_record SET "
    sql = util.forEachUpdatePropsForIncrement(sql, props)
    sql += " where characterId=%d " % (characterId)
    cursor = dbaccess.dbpool.cursor()
    count = cursor.execute(sql)
    dbaccess.dbpool.commit()
    cursor.close()
    if count:
        return True
    return False
예제 #4
0
def UpdateTaskProcess(characterId, taskID, props):
    '''更新任务的进度'''
    sql = "UPDATE tb_task_process SET "
    sql = util.forEachUpdatePropsForIncrement(sql, props)
    sql += " where characterId=%d and taskId =%d" % (characterId, taskID)
    cursor = dbaccess.dbpool.cursor()
    count = cursor.execute(sql)
    dbaccess.dbpool.commit()
    cursor.close()
    if count:
        return True
    return False
예제 #5
0
def updateQuestGoal(questRecordId,questGoalId,props,limitprops= {}):
    '''更新角色任务进度
    @param characterId: int 角色的id
    @param taskId: int 任务的id
    '''
    sql = 'update `tb_task_goal_progress` set'
    sql = util.forEachUpdatePropsForIncrement(sql, props)
    sql += " where questRecordId=%d and questGoalId = %d" %(questRecordId,questGoalId)
    sql = util.produceSQLlimit(sql, limitprops)
    cursor = dbaccess.dbpool.cursor()
    count = cursor.execute(sql)
    dbaccess.dbpool.commit()
    cursor.close()
    if count:
        return True
    return False
예제 #6
0
def updateQuestGoal(questRecordId, questGoalId, props, limitprops={}):
    '''更新角色任务进度
    @param characterId: int 角色的id
    @param taskId: int 任务的id
    '''
    sql = 'update `tb_task_goal_progress` set'
    sql = util.forEachUpdatePropsForIncrement(sql, props)
    sql += " where questRecordId=%d and questGoalId = %d" % (questRecordId,
                                                             questGoalId)
    sql = util.produceSQLlimit(sql, limitprops)
    cursor = dbaccess.dbpool.cursor()
    count = cursor.execute(sql)
    dbaccess.dbpool.commit()
    cursor.close()
    if count:
        return True
    return False