Beispiel #1
0
 def savePlayerpos(self, playerpos, playercategory):
     '''保存球员位置与类型'''
     self.setPlayerpos(playerpos)
     self.setPlayerCategory(playercategory)
     playermode = tb_player_admin.getObj(self.baseInfo.id)
     props = {'PlayerPos': playerpos, 'PlayerCategory': playercategory}
     playermode.update_multi(props)
Beispiel #2
0
	def savePlayerpos(self,playerpos,playercategory):
		'''保存球员位置与类型'''
		self.setPlayerpos(playerpos)
		self.setPlayerCategory(playercategory)
		playermode=tb_player_admin.getObj(self.baseInfo.id)
		props={'PlayerPos':playerpos,'PlayerCategory':playercategory}
		playermode.update_multi(props)
Beispiel #3
0
    def updateSpendPoint(self, spendpoint):
        '''更新球员消耗训练点
		@param spendpoint: int 消耗的训练点
		'''
        self.setSpendPoint(spendpoint)
        playermode = tb_player_admin.getObj(self.baseInfo.id)
        props = {'SpendPoint': spendpoint}
        playermode.update_multi(props)
Beispiel #4
0
	def updateSpendPoint(self,spendpoint):
		'''更新球员消耗训练点
		@param spendpoint: int 消耗的训练点
		'''
		self.setSpendPoint(spendpoint)
		playermode=tb_player_admin.getObj(self.baseInfo.id)
		props={'SpendPoint':spendpoint}
		playermode.update_multi(props)
Beispiel #5
0
    def updateLevel(self):
        '''更新球员当前等级
		'''
        if self._level > self.getMaxLevel(): return False
        while self._exp >= self.getLvExp():
            #self._exp -= self.getLvExp()
            self._level += 1
        playermode = tb_player_admin.getObj(self._owner.baseInfo.getId())
        playermode.update_multi({'level': self._level})
        return True
	def updateLevel(self):
		'''更新球员当前等级
		'''
		if self._level>self.getMaxLevel():return False
		while self._exp >= self.getLvExp():
			#self._exp -= self.getLvExp()
			self._level += 1
		playermode=tb_player_admin.getObj(self._owner.baseInfo.getId())
		playermode.update_multi({'level':self._level})
		return True
Beispiel #7
0
    def updateExp(self, exp):
        '''更新球员经验值
		@param exp:int 经验值
		'''
        if exp == self._exp or exp >= self.getMaxExp():
            return False
        if self._level >= self.getMaxLevel():
            return False
        self._exp = exp
        playermode = tb_player_admin.getObj(self._owner.baseInfo.getId())
        playermode.update_multi({'exp': self._exp})
        return True
	def updateExp(self,exp):
		'''更新球员经验值
		@param exp:int 经验值
		'''
		if exp==self._exp or exp>=self.getMaxExp():
			return False
		if self._level>=self.getMaxLevel():
			return False
		self._exp=exp
		playermode=tb_player_admin.getObj(self._owner.baseInfo.getId())
		playermode.update_multi({'exp':self._exp})
		return True
	def SaveAttribute(self):
		'''保存球员属性'''

		props={}
		props['Shoot']=self.Shoot
		props['Dribbling']=self.Dribbling
		props['Speed']=self.Speed
		props['Pass']=self.Pass
		props['Tackle']=self.Tackle
		props['Tackling']=self.Tackling
		props['_Save']=self._Save
		props['Response']=self.Response
		props['PlayerPower']=self.PlayerPower
		playermode=tb_player_admin.getObj(self._owner.baseInfo.getId())
		playermode.update_multi(props)
		return {'result':True,'message':u""}
Beispiel #10
0
    def SaveAttribute(self):
        '''保存球员属性'''

        props = {}
        props['Shoot'] = self.Shoot
        props['Dribbling'] = self.Dribbling
        props['Speed'] = self.Speed
        props['Pass'] = self.Pass
        props['Tackle'] = self.Tackle
        props['Tackling'] = self.Tackling
        props['_Save'] = self._Save
        props['Response'] = self.Response
        props['PlayerPower'] = self.PlayerPower
        playermode = tb_player_admin.getObj(self._owner.baseInfo.getId())
        playermode.update_multi(props)
        return {'result': True, 'message': u""}