예제 #1
0
def updateMailInfo(mailId,prop):
    """更新邮件信息"""
    sql = util.forEachUpdateProps('tb_mail',prop, {'id':mailId})
    count = dbpool.executeSQL(sql)
    if(count >= 1):
        return True
    return False
예제 #2
0
def updateMailInfo(mailId, prop):
    """更新邮件信息"""
    sql = util.forEachUpdateProps('tb_mail', prop, {'id': mailId})
    count = dbpool.executeSQL(sql)
    if (count >= 1):
        return True
    return False
예제 #3
0
def updateCharacterArenaInfo(characterId,props):
    """更新角色的竞技场信息
    """
    sqlstr = util.forEachUpdateProps('tb_arena', props,{'characterId':characterId})
    count = dbpool.executeSQL(sqlstr)

    if count >= 1:
        return True
    else:
        return False
예제 #4
0
def updateCharacterArenaInfo(characterId, props):
    """更新角色的竞技场信息
    """
    sqlstr = util.forEachUpdateProps('tb_arena', props,
                                     {'characterId': characterId})
    count = dbpool.executeSQL(sqlstr)

    if count >= 1:
        return True
    else:
        return False
예제 #5
0
def updatePlayerDB(player):
    """更新角色的数据库信息"""
    characterId = player.baseInfo.id
    props = {'level':player.level.getLevel(),'coin':player.finance.getCoin(),
             'exp':player.level.getExp(),'hp':player.attribute.getHp()}
    sqlstr = util.forEachUpdateProps('tb_character',props, {'id':characterId})
    count = dbpool.executeSQL(sqlstr)
    if count >= 1:
        return True
    else:
        log.err(sqlstr)
        return False
예제 #6
0
def updatePlayerDB(player):
    """更新角色的数据库信息"""
    characterId = player.baseInfo.id
    props = {
        'level': player.level.getLevel(),
        'coin': player.finance.getCoin(),
        'exp': player.level.getExp(),
        'hp': player.attribute.getHp()
    }
    sqlstr = util.forEachUpdateProps('tb_character', props,
                                     {'id': characterId})
    count = dbpool.executeSQL(sqlstr)
    if count >= 1:
        return True
    else:
        log.err(sqlstr)
        return False