def updateMailInfo(mailId,prop): """更新邮件信息""" sql = util.forEachUpdateProps('tb_mail',prop, {'id':mailId}) count = dbpool.executeSQL(sql) if(count >= 1): return True return False
def updateMailInfo(mailId, prop): """更新邮件信息""" sql = util.forEachUpdateProps('tb_mail', prop, {'id': mailId}) count = dbpool.executeSQL(sql) if (count >= 1): return True return False
def updateCharacterArenaInfo(characterId,props): """更新角色的竞技场信息 """ sqlstr = util.forEachUpdateProps('tb_arena', props,{'characterId':characterId}) count = dbpool.executeSQL(sqlstr) if count >= 1: return True else: return False
def updateCharacterArenaInfo(characterId, props): """更新角色的竞技场信息 """ sqlstr = util.forEachUpdateProps('tb_arena', props, {'characterId': characterId}) count = dbpool.executeSQL(sqlstr) if count >= 1: return True else: return False
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
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