コード例 #1
0
 def _doUnlockItem(self, unlockCtx, costCtx, plugins):
     result = yield unlock.UnlockItemProcessor(unlockCtx.vehCD, unlockCtx.unlockIdx, plugins=plugins).request()
     item = self.itemsCache.items.getItemByCD(unlockCtx.unlockCD)
     if result.success:
         costCtx['xpCost'] = BigWorld.wg_getIntegralFormat(costCtx['xpCost'])
         costCtx['freeXP'] = BigWorld.wg_getIntegralFormat(costCtx['freeXP'])
         showUnlockMsg('unlock_success', item, msgType=SystemMessages.SM_TYPE.PowerLevel, **costCtx)
     elif result.userMsg:
         showUnlockMsg(result.userMsg, item)
コード例 #2
0
def doUnlockItem(parentID, unlockIdx):
    yield unlock.UnlockItemProcessor(parentID, unlockIdx, plugins=[]).request()