def changeTankmanPassport(self, invengoryID, firstNameID, lastNameID, iconID): tankman = g_itemsCache.items.getTankman(int(invengoryID)) processor = TankmanChangePassport(tankman, firstNameID, lastNameID, iconID) result = yield processor.request() if len(result.userMsg): SystemMessages.g_instance.pushI18nMessage(result.userMsg, type=result.sysMsgType)
def changeTankmanPassport(self, invengoryID, firstNameID, firstNameGroup, lastNameID, lastNameGroup, iconID, iconGroup): def checkFlashInt(value): if value == -1: return None return value firstNameID = checkFlashInt(firstNameID) lastNameID = checkFlashInt(lastNameID) iconID = checkFlashInt(iconID) tankman = g_itemsCache.items.getTankman(int(invengoryID)) processor = TankmanChangePassport(tankman, firstNameID, firstNameGroup, lastNameID, lastNameGroup, iconID, iconGroup) result = yield processor.request() if len(result.userMsg): SystemMessages.g_instance.pushI18nMessage(result.userMsg, type=result.sysMsgType)
def changeTankmanPassport(self, inventoryID, firstNameID, firstNameGroup, lastNameID, lastNameGroup, iconID, iconGroup): items = self.itemsCache.items tankman = items.getTankman(inventoryID) if tankman.descriptor.isFemale: passportChangeCost = items.shop.passportFemaleChangeCost else: passportChangeCost = items.shop.passportChangeCost currentGold = self.itemsCache.items.stats.gold if currentGold < passportChangeCost and isIngameShopEnabled(): showBuyGoldForCrew(passportChangeCost) return def checkFlashInt(value): return None if value == -1 else value firstNameID = checkFlashInt(firstNameID) lastNameID = checkFlashInt(lastNameID) iconID = checkFlashInt(iconID) tankman = self.itemsCache.items.getTankman(int(inventoryID)) result = yield TankmanChangePassport(tankman, firstNameID, firstNameGroup, lastNameID, lastNameGroup, iconID, iconGroup).request() if result.userMsg: SystemMessages.pushI18nMessage(result.userMsg, type=result.sysMsgType)
def changeTankmanPassport(self, inventoryID, firstNameID, firstNameGroup, lastNameID, lastNameGroup, iconID, iconGroup): def checkFlashInt(value): return None if value == -1 else value firstNameID = checkFlashInt(firstNameID) lastNameID = checkFlashInt(lastNameID) iconID = checkFlashInt(iconID) tankman = self.__getTankmanByInvID(int(inventoryID)) result = yield TankmanChangePassport(tankman, firstNameID, firstNameGroup, lastNameID, lastNameGroup, iconID, iconGroup).request() if result.userMsg: SystemMessages.pushI18nMessage(result.userMsg, type=result.sysMsgType)
def changeTankmanPassport(self, invengoryID, firstNameID, firstNameGroup, lastNameID, lastNameGroup, iconID, iconGroup): def checkFlashInt(value): if value == -1: return None else: return value firstNameID = checkFlashInt(firstNameID) lastNameID = checkFlashInt(lastNameID) iconID = checkFlashInt(iconID) tankman = g_itemsCache.items.getTankman(int(invengoryID)) result = yield TankmanChangePassport(tankman, firstNameID, firstNameGroup, lastNameID, lastNameGroup, iconID, iconGroup).request() if len(result.userMsg): SystemMessages.g_instance.pushI18nMessage(result.userMsg, type=result.sysMsgType)