コード例 #1
0
 def __requestToUse(self):
     orderTypeID = self.getOrderIDbyUID(self._orderID)
     result = yield self.fortProvider.sendRequest(
         OrderCtx(orderTypeID, isAdd=False,
                  waitingID='fort/order/activate'))
     if result:
         g_fortSoundController.playActivateOrder(self._orderID)
コード例 #2
0
 def __requestToCreate(self, count):
     orderTypeID = self.getOrderIDbyUID(self._orderID)
     count = int(count)
     result = yield self.fortProvider.sendRequest(
         OrderCtx(orderTypeID, count, waitingID='fort/order/add'))
     if result:
         g_fortSoundController.playCreateOrder()
         order = self.fortCtrl.getFort().getOrder(orderTypeID)
         SystemMessages.g_instance.pushI18nMessage(
             SYSTEM_MESSAGES.FORTIFICATION_ADDORDER,
             count=BigWorld.wg_getIntegralFormat(count),
             time=order.getProductionLeftTimeStr(),
             type=SystemMessages.SM_TYPE.Warning)
     self.destroy()