Ejemplo n.º 1
0
 def updatePlayerDBInfo(self):
     '''更新角色在数据库中的数据'''
     pass
     pid = self.cid
     pmmode = tb_character_admin.getObj(pid)
     mapping = {'score': self.score, "coin": self.coin}
     pmmode.update_multi(mapping)
Ejemplo n.º 2
0
 def updatePlayerDBInfo(self):
     '''更新角色在数据库中的数据'''
     pass
     pid = self.cid
     pmmode = tb_character_admin.getObj(pid)
     mapping = {'score':self.score,"coin":self.coin}
     pmmode.update_multi(mapping)
Ejemplo n.º 3
0
 def initPlayerInfo(self):
     '''初始化角色信息'''
     pid = self.cid
     pmmode = tb_character_admin.getObj(pid)
     data = pmmode.get("data")
     if not data:
         log.err("Inint_player _" + str(self.baseInfo.id))
     self.nickname = data['nickname']  #角色昵称
     self.score = data['score']  #角色积分
     self.coin = data['coin']  #角色的金币
Ejemplo n.º 4
0
 def initPlayerInfo(self):
     '''初始化角色信息'''
     pid = self.cid
     pmmode = tb_character_admin.getObj(pid)
     data = pmmode.get("data")
     if not data:
         log.err( "Inint_player _"+str(self.baseInfo.id))
     self.nickname = data['nickname'] #角色昵称
     self.score = data['score'] #角色积分
     self.coin = data['coin'] #角色的金币