feat: purchasing glyphs & UI customisations
This commit is contained in:
		
							parent
							
								
									a8ea8d1364
								
							
						
					
					
						commit
						6eaa1d8959
					
				@ -49,6 +49,9 @@ export const handlePurchase = async (purchaseRequest: IPurchaseRequest, accountI
 | 
				
			|||||||
        case "Boosters":
 | 
					        case "Boosters":
 | 
				
			||||||
            inventoryChanges = await handleBoostersPurchase(internalName, accountId);
 | 
					            inventoryChanges = await handleBoostersPurchase(internalName, accountId);
 | 
				
			||||||
            break;
 | 
					            break;
 | 
				
			||||||
 | 
					        case "Interface":
 | 
				
			||||||
 | 
					            inventoryChanges = await handleCustomizationPurchase(internalName, accountId);
 | 
				
			||||||
 | 
					            break;
 | 
				
			||||||
        default:
 | 
					        default:
 | 
				
			||||||
            const errorMessage = `unknown store category: ${storeCategory} not implemented or new`;
 | 
					            const errorMessage = `unknown store category: ${storeCategory} not implemented or new`;
 | 
				
			||||||
            logger.error(errorMessage);
 | 
					            logger.error(errorMessage);
 | 
				
			||||||
@ -167,8 +170,9 @@ const handleTypesPurchase = async (typesName: string, accountId: string) => {
 | 
				
			|||||||
    const typeCategory = getStoreItemTypesCategory(typesName);
 | 
					    const typeCategory = getStoreItemTypesCategory(typesName);
 | 
				
			||||||
    logger.debug(`type category ${typeCategory}`);
 | 
					    logger.debug(`type category ${typeCategory}`);
 | 
				
			||||||
    switch (typeCategory) {
 | 
					    switch (typeCategory) {
 | 
				
			||||||
 | 
					        case "AvatarImages":
 | 
				
			||||||
        case "SuitCustomizations":
 | 
					        case "SuitCustomizations":
 | 
				
			||||||
            return await handleSuitCustomizationsPurchase(typesName, accountId);
 | 
					            return await handleCustomizationPurchase(typesName, accountId);
 | 
				
			||||||
        // case "Recipes":
 | 
					        // case "Recipes":
 | 
				
			||||||
        //     break;
 | 
					        //     break;
 | 
				
			||||||
        case "Sentinels":
 | 
					        case "Sentinels":
 | 
				
			||||||
@ -193,7 +197,7 @@ const handleSentinelPurchase = async (sentinelName: string, accountId: string) =
 | 
				
			|||||||
    };
 | 
					    };
 | 
				
			||||||
};
 | 
					};
 | 
				
			||||||
 | 
					
 | 
				
			||||||
const handleSuitCustomizationsPurchase = async (customizationName: string, accountId: string) => {
 | 
					const handleCustomizationPurchase = async (customizationName: string, accountId: string) => {
 | 
				
			||||||
    const customization = await addCustomization(customizationName, accountId);
 | 
					    const customization = await addCustomization(customizationName, accountId);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return {
 | 
					    return {
 | 
				
			||||||
 | 
				
			|||||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user