Exemplo n.º 1
0
 def dropSkills(self, dropSkillCostIdx):
     tankman = self.itemsCache.items.getTankman(self.tmanInvID)
     proc = TankmanDropSkills(tankman, dropSkillCostIdx)
     result = yield proc.request()
     if result.userMsg:
         SystemMessages.pushMessage(result.userMsg, type=result.sysMsgType)
     if result.success:
         self.onWindowClose()
         self.fireEvent(
             events.SkillDropEvent(
                 events.SkillDropEvent.SKILL_DROPPED_SUCCESSFULLY))
Exemplo n.º 2
0
 def dropSkills(self, dropSkillCostIdx):
     """
     Drops all tankman skill using @dropSkillCostIdx modificator
     @param dropSkillCostIdx: tankman experience modificator index
     """
     tankman = g_itemsCache.items.getTankman(self.tmanInvID)
     proc = TankmanDropSkills(tankman, dropSkillCostIdx)
     result = yield proc.request()
     if len(result.userMsg):
         SystemMessages.g_instance.pushMessage(result.userMsg, type=result.sysMsgType)
     if result.success:
         self.onWindowClose()
         self.fireEvent(events.SkillDropEvent(events.SkillDropEvent.SKILL_DROPPED_SUCCESSFULLY))
Exemplo n.º 3
0
 def dropSkills(self, dropSkillCostIdx):
     tankman = self.itemsCache.items.getTankman(self.tmanInvID)
     dropSkillCost = self.itemsCache.items.shop.dropSkillsCost[
         dropSkillCostIdx].get(Currency.GOLD, 0)
     currentGold = self.itemsCache.items.stats.gold
     if currentGold < dropSkillCost and isIngameShopEnabled():
         showBuyGoldForCrew(dropSkillCost)
         return
     proc = TankmanDropSkills(tankman, dropSkillCostIdx)
     result = yield proc.request()
     if result.userMsg:
         SystemMessages.pushMessage(result.userMsg, type=result.sysMsgType)
     if result.success:
         self.onWindowClose()
         self.fireEvent(
             events.SkillDropEvent(
                 events.SkillDropEvent.SKILL_DROPPED_SUCCESSFULLY))