Пример #1
0
 def run(self):
     if not self.isSubscribed:
         self.__addListeners()
         self.__pIdx = g_tutorialWeaver.weave(
             pointcut=aspects.AmmoQuantityPointcut,
             aspects=(aspects.AmmoQuantityAspect(self), ))
         self.isSubscribed = True
     if self._stateFlag is None:
         self._stateFlag = self._tutorial.getFlags().isActiveFlag(
             self._stateFlagID)
     super(PlayerVehicleNoAmmoTrigger, self).run()
     return
Пример #2
0
 def run(self):
     if not self.isSubscribed:
         player = BigWorld.player()
         if hasattr(player, '_PlayerAvatar__ammo'):
             ammo = player._PlayerAvatar__ammo.copy()
             self.__ammoLayout = dict(map(lambda item: (item[0], item[1]), ammo.itervalues()))
         self.__pIdx = g_tutorialWeaver.weave(pointcut=aspects.AmmoQuantityPointcut, aspects=[aspects.AmmoQuantityAspect(self)])
         self.isSubscribed = True
     if self._stateFlag is None:
         self._stateFlag = self._tutorial.getFlags().isActiveFlag(self._stateFlagID)
     super(PlayerVehicleNoAmmoTrigger, self).run()
     return