def receiveBound(self,step):
     '''领取奖励
     @param step: int 步骤
     '''
     if self.schedule['bound_%d'%step]:
         return {'result':False,'message':Lg().g(287)}
     boundinfo = dbSchedule.SCHEDULE_BOUND.get(step)
     if not boundinfo:
         return {'result':False,'message':Lg().g(464)}
     activityrequired = boundinfo.get('vitality_required',100)
     if activityrequired>self.schedule.get('activity'):
         return {'result':False,'message':Lg().g(456)}
     itembound = boundinfo.get('item_bound')
     if self._owner.pack._package._PropsPagePack.findSparePositionNum()<1:
         return {'result':False,'message':Lg().g(16)}
     self._owner.pack.putNewItemsInPackage(itembound,1)
     self.schedule['bound_%d'%step] = 1
     dbSchedule.updateSchedule(self._owner.baseInfo.id, {'bound_%d'%step:1})
     return {'result':True,'message':Lg().g(288)}
 def receiveBound(self, step):
     '''领取奖励
     @param step: int 步骤
     '''
     if self.schedule['bound_%d' % step]:
         return {'result': False, 'message': Lg().g(287)}
     boundinfo = dbSchedule.SCHEDULE_BOUND.get(step)
     if not boundinfo:
         return {'result': False, 'message': Lg().g(464)}
     activityrequired = boundinfo.get('vitality_required', 100)
     if activityrequired > self.schedule.get('activity'):
         return {'result': False, 'message': Lg().g(456)}
     itembound = boundinfo.get('item_bound')
     if self._owner.pack._package._PropsPagePack.findSparePositionNum() < 1:
         return {'result': False, 'message': Lg().g(16)}
     self._owner.pack.putNewItemsInPackage(itembound, 1)
     self.schedule['bound_%d' % step] = 1
     dbSchedule.updateSchedule(self._owner.baseInfo.id,
                               {'bound_%d' % step: 1})
     return {'result': True, 'message': Lg().g(288)}
 def noticeSchedule(self,scheduleType,goal = 1):
     '''进度通知
     @param scheduleType: int 进度类型
     '''
     schedule = dbSchedule.SCHEDULE_CONFIG.get(scheduleType)
     if not schedule:
         return 
     if self.schedule.get('schedule_%d'%scheduleType)>=schedule.get('schedule_goal',1):
         return
     scheduletag = 'schedule_%d'%scheduleType
     self.schedule[scheduletag] +=goal
     if self.schedule[scheduletag]>schedule.get('schedule_goal',1):
         self.schedule[scheduletag] = schedule.get('schedule_goal',1)
     props = {}
     props[scheduletag] = self.schedule[scheduletag]
     if self.schedule[scheduletag]>=schedule.get('schedule_goal',1):
         activityadd = schedule.get('schedule_activity',0)
         self.schedule['activity'] += activityadd
         props['activity'] = self.schedule['activity']
     dbSchedule.updateSchedule(self._owner.baseInfo.id, props)
 def noticeSchedule(self, scheduleType, goal=1):
     '''进度通知
     @param scheduleType: int 进度类型
     '''
     schedule = dbSchedule.SCHEDULE_CONFIG.get(scheduleType)
     if not schedule:
         return
     if self.schedule.get('schedule_%d' % scheduleType) >= schedule.get(
             'schedule_goal', 1):
         return
     scheduletag = 'schedule_%d' % scheduleType
     self.schedule[scheduletag] += goal
     if self.schedule[scheduletag] > schedule.get('schedule_goal', 1):
         self.schedule[scheduletag] = schedule.get('schedule_goal', 1)
     props = {}
     props[scheduletag] = self.schedule[scheduletag]
     if self.schedule[scheduletag] >= schedule.get('schedule_goal', 1):
         activityadd = schedule.get('schedule_activity', 0)
         self.schedule['activity'] += activityadd
         props['activity'] = self.schedule['activity']
     dbSchedule.updateSchedule(self._owner.baseInfo.id, props)